Hi,
Simply we can say the browser uses 96 PPI and we internally use 72 PPI.
72 PPI in PDF means that e.g. A4 paper dimension is 595x842 pixels. So if the conversion to PDF is done, this example CSS rule is applied for A4 paper:
@media (width: 595px) { body { background-color: coral; } }
Moreover we use
smart scaling algorithm to fit more content to the page, so some HTML elements can change their dimensions. You can disable this algorithm by
setSmartScalingMode('disabled').
I'd recommend you to try another modes of setSmartScalingMode and setRenderingMode.
E.g. you can get the same PDF as in a browser's window with a specific width. Example code in PHP using the browser's width equal to 1200 px.
$client->setRenderingMode('viewport');
$client->setViewport(1200, 1000);
$client->setSmartScalingMode('viewport-fit');
$client->setNoMargins(true);
Notes:
1. we speak about DPI instead of PPI sometimes as we consider PDF as a printable format
2. there are some useful topics for reading:
--
http://www.judyofthewoods.net/money/pixels_resolution_dpi.html--
https://graphicdesign.stackexchange.com/questions/199/point-vs-pixel-what-is-the-difference#answer-12644