Closed Tekki closed 3 years ago
This sounds like it's a known issue with the Chrome engine. In certain circumstances, such as adding headers and footers to a page, it (Chrome) sets up the coordinate system vertically reversed (0 at top, about 3300 units high). Unfortunately, it leaves the PDF's coordinate system in this state, so anything you add to it will be mirrored. The solution is to add a PDF command to your text stream to reset the coordinate system to the standard orientation and size, before adding any more new content.
See in the POD for "Content.pm" a discussion of using $content->add()
to add a cm
command to fix the scaling and orientation. Let me know if it does the job for you.
To add the sample code from the Content.pm docs definitely solves my issue. I found a second case in PDFs with producer 'Microsoft: Print To PDF', where the scale has to be set to approximately 0.75. Thanks a lot for your feedback and your help!
PDF::Builder 3.022, Perl 5.34.0 on Debian
If text is added to a PDF created with one of the following browsers it appears distorted (wrong size, mirrored):
Not affected: Firefox.
How to reproduce:
about:blank