Adding Paper formats.


To recognise and use a paper format, Quick Report must know the
paper dimensions, a name to call it, and the printer code
that tells the printer to use these dimensions. This assumes that
the new size you want to use is recognised by a printer.
However, if the printer supports Custom (user defined) paper formats,
then this article also applies.
The printer driver analysis program is here.

Step 1:
Run the driver analysis program to see what numerical code is
required by the printer to set the size. If no code exists because
you've invented the format, use the code for 'Custom' ( the printer
must obviously support this).

We will call this value 'dmpaper_International' and put it in the
translation array as described below.

Step 2: Edit qrprntr.pas.

Add a constant -
       dmpaper_International = <the number from the driver>
For example -    
       dmpaper_International = 56;
       
Step 3: Edit qrprntr.pas.

Now add the paper to the 3 arrays TQRPaperSize, cQRPaperSizeMetrics and
cQRPaperTranslate 


TQRPaperSize = (Default,
                  Letter,
                  LetterSmall,
                  Tabloid,
                  Ledger,
                  Legal,
                  Statement,
                  Executive,
                  A3,
                  A4,
                  A4Small,
                  A5,
                  B4,
                  B5,
                  Folio,
                  Quarto,
                  qr10X14,
                  qr11X17,
                  Note,
                  Env9,
                  Env10,
                  Env11,
                  Env12,
                  Env14,
                  CSheet,
                  DSheet,
                  ESheet,
                  International,    //This is the name of the new type of paper
                  Custom);
then
   { Actual paper sizes for all the known paper types in mm}
   // ****** NOTE that the last element below has changed ********//
   cQRPaperSizeMetrics : array[Letter..International, 0..1] of extended =
      ((215.9, 279.4), { Letter }
       (215.9, 279.4), { Letter small }
       (279.4, 431.8), { Tabloid }
       (431.8, 279.4), { Ledger }
       (215.9, 355.6), { Legal }
       (139.7, 215.9), { Statement }
       (190.5, 254.0), { Executive }
       (297.0, 420.0), { A3 }
       (210.0, 297.0), { A4 }
       (210.0, 297.0), { A4 small }
       (148.0, 210.0), { A5 }
       (250.0, 354.0), { B4 }
       (182.0, 257.0), { B5 }
       (215.9, 330.2), { Folio }
       (215.0, 275.0), { Quarto }
       (254.0, 355.6), { 10X14 }
       (279.4, 431.8), { 11X17 }
       (215.9, 279.0), { Note }
       (98.43, 225.4), { Envelope #9 }
       (104.8, 241.3), { Envelope #10 }
       (114.3, 263.5), { Envelope #11 }
       (101.6, 279.4), { Envelope #12 - might be wrong !! }
       (127.0, 292.1), { Envelope #14 }
       (100.0, 100.0),
       (100.0, 100.0),
       (175.0, 110.0),  {This is for International - same order in array as before}
       (100.0, 100.0));

   { Table for translating TQRPaperSize to values which can be used with the
     printer driver }
   cQRPaperTranslate : array[Default..Custom] of integer =
       (0,
       dmpaper_Letter,
       dmpaper_LetterSmall,
       dmpaper_Tabloid,
       dmpaper_Ledger,
       dmpaper_Legal,
       dmpaper_Statement,
       dmpaper_Executive,
       dmpaper_A3,
       dmpaper_A4,
       dmpaper_A4Small,
       dmpaper_A5,
       dmpaper_B4,
       dmpaper_B5,
       dmpaper_Folio,
       dmpaper_Quarto,
       dmpaper_10X14,
       dmpaper_11X17,
       dmpaper_Note,
       dmpaper_Env_9,
       dmpaper_Env_10,
       dmpaper_Env_11,
       dmpaper_Env_12,
       dmpaper_Env_14,
       dmpaper_CSheet,
       dmpaper_DSheet,
       dmpaper_ESheet,
       dmpaper_International,  { we got this values by looking at the printer codes}
       $100);

 Step 4: Rebuild the libraries.
 See the front page of the website for advice.