NYCPHP Meetup

NYPHP.org

[nycphp-talk] FPDF/FPDI template size too small

Aaron Fischer agfische at email.smith.edu
Fri Jul 7 15:29:36 EDT 2006


It turns out that the issue was not related to the FPDI class.  The 
issue appears to be that the web browsers are adding extra margin space 
to the PDF.

When I view and print the PDF locally it renders as expected.  When I 
view and print the PDF through a web browser it adds a wider margin, 
thus slightly shrinking the overall size of the documents and all of 
it's contents!  (Tested on Mac and PC with Firefox, Safari and IE, all 
with the same result.)

Anyone know if there is some setting that I can manipulate that will 
prevent this browser behavior?

This may be an issue that would benefit from the front end list so I'll 
post there as well.

-Aaron


David Mintz wrote:
> 
> I am not sure what if anything you might be doing wrong, but a few months
> ago I gnawed on the demo/example that ships with the Fpdi class until I
> got it to open a PDF doc test_pdf.pdf and generate a new one using
> test_pdf.pdf as a template, with some text inserted in a specific
> position. (this is substantially the same snippet I put out here a few
> weeks ago in response to another question, sorry for the redundancy). If I
> remember correctly, the demo (before I hacked it up) explicitly resets the
> dimensions -- you don't want to do that. HTH.



More information about the talk mailing list