Open GoogleCodeExporter opened 9 years ago
Thanks Andreas,
a test file is much appreciated.
I'd suggest to use a pdf printer like PdfCreator.
Would be the least expensive way to test printing ;)
Original comment by OrphanCat
on 13 May 2014 at 10:32
Attached is a minimum example project containing the following files:
*.dfm, *.dpr, *.pas = the Delphi files
*.html, *.png = the files for the text document
The files for the test document (being one chapter from the user manual of a
small maths program I'm writing, which makes EXCESSIVE use of your wonderful
HTML component) are searched in the same folder as the compiled EXE program.
The program has several printing settings. 'Scale' is used to effectively scale
down the PNG files, so that they fit inside the print area width. When hitting
'Print', NumPrinterPages is displayed, and DIRECTLY afterwards the document is
sent to the printer, sometimes resulting in a DIFFERENT page number.
When using 'PDFCreator' as printer with A5 portrait page size and 600dpi under
Windows 7, results are as follows:
1. Left=20, Right=20, Top=18, Bottom=18, Font=Garamond 10pt, Scale=77:
NumPrinterPages=9, Printout=10
2. Left=20, Right=20, Top=18, Bottom=18, Font=Times New Roman 10pt, Scale=77:
NumPrinterPages=Printout=11, but last page is empty
3. Left=20, Right=20, Top=18, Bottom=18, Font=Minion Pro 10pt, Scale=77:
NumPrinterPages=11, Printout=12
4. Left=20, Right=20, Top=18, Bottom=18, Font=Tahoma 10pt, Scale=77:
NumPrinterPages=11, Printout=12
When using 'PDF Creator' as printer with A4 portrait page size and 600dpi under
Windows 7, results are as follows:
5. Left=40, Right=20, Top=20, Bottom=20, Font=Times New Roman 12pt, Scale=100:
NumPrinterPages=8, Printout=9
6. Left=40, Right=20, Top=20, Bottom=20, Font=Courier New 12pt, Scale=100:
NumPrinterPages=10, Printout=11
7. Left=38, Right=20, Top=20, Bottom=20, Font=Times New Roman 12pt, Scale=100:
NumPrinterPages=8, Printout=9
8. Left=25, Right=20, Top=20, Bottom=20, Font=Minion Pro 12pt, Scale=100:
NumPrinterPages=8, Printout=9
Try with other settings as follows:
9. Select a font and some margin settings, so that the printout's last page is,
say, roughly 30-40% filled.
10. Decrease the horizontal margin by 1mm, and check, whether NumPrinterPages
also decreases. If not, cancel PDF Creator. If yes, print to PDF and check,
whether the page count is larger than NumPrinterPages.
I hope the problem can be reproduced this way - thanks.
Original comment by weidner....@t-online.de
on 18 May 2014 at 7:05
Attachments:
Original issue reported on code.google.com by
weidner....@t-online.de
on 13 May 2014 at 9:13