Fabrice Harari International WinDev Consultant

Home         About Fabrice         WinDev Files        Products        Fabrice's blog         Consulting        Contact Fabrice        Links

My status

Random errors: what can cause them

Printing in the margins:
Nearly every printer has a technical margin on at least some of the paper sides. What am I talking about? A technical margin is a space on the side of the paper where the printer can not print, by construction. It's basically the space reserved for the printer to handle the paper and move it.

 

{AmazonLinks}

A few years ago, you could find some rare printers (laser and inkjet) with 0 technical margins... The result was that you were able to print a page black in it's entirety... Today, there is generally a technical margin on each side of the paper, for several reasons:
  • Building printers with a technical margin simplify the mechanical problem and allows to sell them cheaper
  • The need for a zero technical margin has nearly disappeared: programs are now working under windows, with printer drivers able to dynamically 'fit' your print job into the available space, and background images have replaced using preprinted paper for all administrative tasks or nearly all of them
  • The few people still using preprinted paper are generally doing so with several layers of paper and need to use the old and noisy impact printers anyway

Now that you know what I'm talking about, what is the problem?

When you design a report, or when you code it using iPrint instruction, be really careful not to print in the physical margins... If you do so, you will end up with unpredictable behavior when you print. It's unpredictable because different depending of your printer driver (yes, even the revision of one driver can make a difference) and also of your operating system. It seems that some printer driver have built in safety and ignore the print order in the margin, others are interpreting them erroneously (ever seen 200 blank pages being ejected between two of your report pages?), and in some cases you will even have a bad and hard crash (it seems that Windows XP really doesn't like this kind of things)...

So what can you do to prevent that?

If you are printing using the report editor, leave big enough margins all around your report to accommodate ANY printer (yes, you ARE loosing real estate)...

If you want to use all the available space all the time, you will need to code you report by hand using iPrint instructions (no, it's not that hard, and I even have a file available on the subject, with a complete methodology and class that you can reuse coming soon on this web site)... In that case, you can start your job by:

  • Testing that there is a printer declared on the system (see Printing on no printer)
  • Calculating the physical margin on each side of the paper
  • Then print only inside those physical margins, and assigning the available real estate on the fly to the columns/area that needs it the most

 

Google
 
Web www.fabriceharari.com
Links:


Last modified Friday, March 17, 2006 12:09 PM central time