TirDeFona Posted November 21, 2010 Share Posted November 21, 2010 Hi all,By default, when you open a PDF invoice the selected view of the PDF seems to be "fill width". I know this setting can be changed at the PDF creation time. I'd like it to be set to "fit to screen" or "fit page", so you can see the whole invoice on your screen instead of those enormous letters and having to scroll or resize it to see all the invoice information.Anyone knows which is the parameter and where to put the code?Thans a lot! Link to comment Share on other sites More sharing options...
TirDeFona Posted November 22, 2010 Author Share Posted November 22, 2010 I have edited the file classes/PDF.phpAbout line 363, find this if (!$multiple) $pdf = new PDF('P', 'mm', 'A4'); $pdf->SetAutoPageBreak(true, 35); $pdf->StartPageGroup(); and insert a new line, with the SetDisplayMode instruction: if (!$multiple) $pdf = new PDF('P', 'mm', 'A4'); $pdf->SetDisplayMode(100); $pdf->SetAutoPageBreak(true, 35); $pdf->StartPageGroup(); In this case, I've set it to '100' because I want it to show the pdf at 100% when openened. Other option is use the fullpage parameter to fit all the doc in the screen. This is the syntax: $pdf->SetDisplayMode(fullpage); More info and options at the FPDF page http://www.fpdf.org/en/doc/setdisplaymode.htmTip: the real parameter doesn't seem to work; that's why I've used 100 (%) instead Link to comment Share on other sites More sharing options...
Recommended Posts