PDF text looks slightly odd... weird spacing.

  • Delphi 6, WPTools 5.x, WPDF 2.x

    I didn't notice it originally, but the PDF file we are generating from our ACE Reports using WPDF has some strange looking spacing. Like some things look too close together and the spacing is very tight.

    Heck... it even has a slightly misaligned look... meaning some letters look higher or lower than the letter next to it... ever so slightly.

    Here is the code for this generation:

    Perhaps using the printer as the canvas reference instead of the default display... if this is even part of the issue.

    Thanks in advance.

  • I found the wpDontAdjustTextSpacing mode and turned that on.

    That made the resulting PDF very, very close to what the original report looks like. Unfortunately there were a couple of spots where text overwrote each other. But other than that it looked great... but of course I can't use it like that.

    This is a show stopper if we can't get it to generate a report looking like the original.

    We have upgraded from wPDF 2.x to 3.x this Friday, but looks like WPCubed is closed for the week so we may not get the license key to install it for another week and we need this working asap.

    So any help would be appreciated.

    Greg

  • I have done further testing and still cannot get this weird spacing to stop. When I print this ace report to PrimoPDF or BlueBeamPDF (PDF Printer drivers) they come out perfect.

    I realized WPCubed is shutdown for the week, but hopefully someone will see this and give some feedback.

    I tried the wPDF v3 demo and it didn't make a difference.

    Thanks in advance.

    • Offizieller Beitrag

    Hi,

    please use either the CIdFonts or the "ExactTextPlacement" in Modes.

    The bad fonmt spacing is usually caused by a too low printing resolution. When You print using screenresolution (or create the output data) the convertion to PDF resolution introduces a lot of rounding erros. Those erreos are also visible when a metafile is scaled on Windows.

    So You need to print in a higher resolution.

    If you set CanvasReference to "Printer" the printer resolution is ised for the wPDF canvas.

    Julian

  • 1) So use one of the modes settings (CIdFonts / ExactTextPlacement) AND the CanvasReference to printer at the same time?

    2) If I use the CanvasReference as printer will I have to change calculations because of resolution changes? (This part gets a little confusing at times).

    3) As you know I have a class inherited from TWPPDFPrinter that allows me to call multiple MakePDF for various report types like FastReports, Ace and WPTools. So if I do a begindoc and the canvasreference for the first report is set to screen for wptools, but then I go and print this ace report and have to switch canvasreference to printer will it cause problems doing this between one begindoc / enddoc? Meaning can I switch the canvasreference from one page to the next depending on the report source?