I have a strange problem when trying to create PDF documents.
When I create a css layout and then view it in the printview in HTML it looks just like it should but when I press the pdf button the layout is moved.
I have extracted the html-string passed to the pdf.py utility and can see that there are additional characters in the document.
Here you can see both the printview HTML source and the HTML source which is passed to pdf.py:
Removing the additional characters fixes the layout.
Do you have any idea what could cause this and what I can do to fix this issue?
Just to add: I already checked with the chrome inspector if both spans have the same size and they’re both 140px wide and every inner span should take 10px. The additional chars add some kind of padding which breaks the layout.