You are not logged in.
Pages: 1
Hi!
I use TGDIPages to create a report and then export it to a PDF-file.
I noticed that papersize and font depends on default printer in Windows. Papersize I found that I could change by calling NewPageLayout(psa4), but I don't know how to affect the font used ? Maybe it's not the font, but "font-scaling" that's the problem. Anyway, the text looks different, and don't appear at the same place, if the default driver is "Generic/Text Only" compared to when another driver is chosen.
I thought I could set the property PrinterName to a desired printer, but realized it was a readonly property. I guess there's a reason for it ?
Which is the best way to solve this ?
Best regards.
Offline
Thanks you! Setting Printers.Printer.PrinterIndex helps.
When having ForceScreenResolution to true it didn't look good.
I considered converting the application to use TPdfDocument or TPdfDocumentGDI instead of TGDIPages. Would they also require setting PrinterIndex ?
Offline
TPdfDocument or TPdfDocumentGDI do not know anything about printers: they produce just some pdf using TPDFCanvas or TMetaFileCanvas methods.
AFAIK the only place when the printer is used is for complex matrix scaling (lometric/himetric/isotropic...) which should be seldom used.
The TPdfDocumentGDI is much to be preferred to TPdfDocument, since its VCLCanvas (to be used with VCLCanvasSize for coordinates computation) is a true VCL TCanvas, so you can share code with your UI.
But TGdiPages is much more convenient to write text reports with tables and pictures.
Offline
Pages: 1