Thanks Mike, I have a problem with pdf size. For some value of @page size Prince generates additional white line on the top of pdf document. Could you help me with that?
I was testing this issue in Adobe Reader and Nitro Reader. The problem is very similar setting given values: @page { margin:0; size: 100mm 1px } @page { margin:0; size: 100mm 2px } @page { margin:0; size: 100mm 3px }
Margin from top on generated PDF is somehow generated randomly. I think it is ok when value of pixels is divisible by 4 e.g for 4px it seems to be ok in Adobe Reader and Nitro. Do you know how we can solve this problem?
It seems that we are rounding page sizes to the nearest point, eg. 1/72", which leads to a slight discrepancy with the size of the content on the page. We will investigate this issue.
That will change the physical size that pixels correspond to, eg. if you specify --css-dpi=72 then px will be exactly equivalent to pt. Specifying 96dpi won't do anything, as that is already the default value.
It depends on how big you want the output to be, and exactly where these numbers are coming from. We can probably change the page size rounding behaviour in a future release of Prince.
@mikeday Are you able to confirm/check whether the issue with rounding page size has been fixed? Whilst testing and using the page dimensions:
size: 84mm 66mm;
When I open the generated PDF in Illustrator the page dimensions are:
Width: 83.96 mm Height: 65.97 mm
If this is the expected behaviour, can you offer an alternative for getting the precise dimensions above? I have already tried using points (238.11pt 187.09 pt) which still gave the same result.