We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now


Formatted Printing

Medium Priority
Last Modified: 2013-12-25
I have created a Web Site that loads in text from a UNIX server and displays it to the Clients browser (that is the extremely simple desc).  Anyway, the text being imported uses the first character of each line as a FORMATTING code.  So when being printed through UNIX, the pages are formatted elegantly. I am using VB Script to parse through each line... so when I hit page 2, I can easily change the font and color and it appears nicely in the browser.  HOWEVER, I cannot PRINT elegantly.  Page 2 ends up on page 4, etc.  I have already done some research and found that "Printer Extensions" are currently being discussed/developed for future "Internet Standard HTML releases" (which is not soon).  So my question is can anyone recommend an easy way of getting my text file printed and formatted the way I would like?
Watch Question

Sadly, although controls for pages' appearance have increased in the past year, there have been little control over the printing.

Your best bet is to get Adobe Acrobat and put your pages in that format.  Of course, that pretty much eliminates your dynamic abilities, since I'm not sure if PDF's are that easy to create inside programs.  Other than that, you might want to perfect the printing style on one browser and recommend that people wishing to print use that browser.  Or wait until HTML 4....  :)  Good luck.


Thanks for the answer but that doesn't solve my problem.  How do you create a PDF file - that would solve it...  Any help?

You will need to get Adobe Acrobat (full version,not just the reader).  I think that it costs around $40 - $50 (but don't quote me).  Go to http://www.adobe.com for more info.


There is no easy way to do this - Hose had the right idea. I know it doesn't help but that is the truth.



unicomtech - I cannot reward your answer as it is a comment.  I do not believe that there is no easy way to do this...  I do believe that there is no easy way for myself and the people who have read this so far.  So I will leave this question open.  Hopefully someone else has already gone through this and can provide more help...  Otherwise, I will be taking sgeiger's advice and purchasing the full Adobe Acrobat.

Thanks all.

MLHAMMEL, before you go out and buy Acrobat, I would be interested in looking at the HTML code that is produced.  Can you post the address to this page?



Unfortunately, my web sites are protected by a firewall.  However, I could e-mail you the source of the file I am printing out.


martike - I greatly appreciate that you have taken the time to read my question but this is not an answer - you have supplied a comment.  As stated in the question, not only do I totally understand that printer formatting codes for html do not exist, I have the WWW Printer Extension specs (proposed new elements) document explaining how it should work in the future.  The problem is I need a solution now and the only one who has steered my in an appropriate direction is sgeiger.  He thinks that I can control the document printing if I use Adobe Acrobat.  Another possible solution provided my a co-worker is Cold Fusion - Crystal Reports.  So again, thanks for your time and effort.  

Mark, I would not go with the crystal reports.  Although it is a good application, adobe has an advantage.  They provide a reader for free.  So anyone can read the file if they have access to the page and if they have adobe reader.  Crystal is good, but I don't know if they have a free reader.  So from a cost stand point and time stand point adobe is better, you can download the reader in a matter of minutes.  There are many sites that use this format.  In fact that was how I got my tax forms last year.  And it prints very nicely, which is the solution you are aiming for.



good ideas...

It really sucks that HTML can't send page breaks to the printer!

I think there should be a way to disperse the points to each person who has commented on this matter.

I dunno about IE, but you can very easily simulate page breaks in Netscape by creating tables with height=100%.  This will reformat on screen to make the table take up the available browser window, and print one table on a page.  

Just try:

<body bgcolor="#FFFFFF" text="#000000">

<table height=100%>

<table height=100%>
      <tr><td>Foo 2</td></tr>


Embed tables, use the <pre> tag, or shoot straight HTML in there for all your formatting.  

Be warned that if the content of the table is more than a page, the wrap will not be controllable.  Leave nice margins.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.