I developed my app in macOS Sierra, but when I moved to production, in Ubuntu 16.04, the size of generated items becomes bigger.
How can i solve this? Some screenshots (biggest is the good one):
macOS Sierra:

Ubuntu 16.04:

I get same issue, then not yet resolved
Same issue here, anybody has a fix/workaround or something in that direction?
While, I was use setOption zoom
PDF::loadHTML($html)->setOption('zoom','1.2822');
The zoom value not sure, but I was adjust it manually. The result between local development (Mac El Capitan) and server (Ubuntu 16.04) is approximately the same.
I done this:
switch(PHP_OS)
{
case 'Linux':
$zoom = '1';
break;
default:
$zoom = '0.8';
}
First, i get the PHP_OS predefined constant, and switch it, and depending on value, i assign a 'zoom level' to $zoom Then, I do:
return PDF::loadHTML($html)->setOption('zoom', $zoom)->inline();
My server's OS is Ubuntu 16.04, and my computer is macOs High Sierra, and the values where 1 for production sever in Ubuntu, and 0.8 for dev computer in macOS. I don't know what value are the correct for Windows, but you can try values.
NOTE: Posible values for PHP_OS are:
Thanks for the answers!
I have fixed it this way for now:
$zoom_factor = (App::environment('production')) ? '1.23' : '1.00';
$pdf = PDF::loadView('pdf.example')->setOption('zoom', $zoom_factor)
Most helpful comment
Thanks for the answers!
I have fixed it this way for now: