Create PDF with option 'Fit to page'?

How can we create PDF that open ‘fit to page’?
This option allows the receiver to see the entire first page of the PDF, not only the sender & receivers postal address.

Other PDF programs let the creator choose which initial format/size the PDF should use to show.
Do you know, how we can achieve this in Dolibarr//TCPDF?

Until someone tell us how to achieve it with a GUI option, I use this quick & dirty hack.

Open the file

\dolibarr\www\dolibarr\htdocs\includes\tcpdf\tcpdf.php
search for this code snippet in version 3.6.2:

Add this line $out .= ' /FitWindow true';to finally look like this:if (isset($vp['NumCopies'])) { $out .= ' /NumCopies '.intval($vp['NumCopies']); } $out .= ' /FitWindow true'; $out .= ' >>'; return $out;

SORRY, but this forum software don’t let me fix some typos in my own answer

Until someone tell us how to achieve it with a GUI option, I use this quick & dirty hack.

Open the file

\dolibarr\www\dolibarr\htdocs\includes\tcpdf\tcpdf.php
search for this code snippet in version 3.6.2: if (isset($vp['NumCopies'])) { $out .= ' /NumCopies '.intval($vp['NumCopies']); } $out .= ' >>'; return $out;
Add this line $out .= ' /FitWindow true';to finally look like this:if (isset($vp['NumCopies'])) { $out .= ' /NumCopies '.intval($vp['NumCopies']); } $out .= ' /FitWindow true'; $out .= ' >>'; return $out;