I am pretty new to Prince. PDF created from the HTML does not match. Text overflow on the second page is shifting to the left, rather than matching the margins from the first page. I am attaching both the HTML and the PDF files.
Forum › How do I...?
Text overflow from the first page is mis-aligned on the second page.
Hi,
It seems that Ctrl-P in both Chrome and Firefox produce output with similar alignment to that of Prince. Perhaps you've encountered a case where the browsers are not themselves consistent?
Mark
It seems that Ctrl-P in both Chrome and Firefox produce output with similar alignment to that of Prince. Perhaps you've encountered a case where the browsers are not themselves consistent?
Mark
PDF file I attached is from prince conversion. If you look at the second page, alignment is off to the left. Yes, the alignment on Chrome and Firefox on the HTML and CTRL-P looks correct. PDF generated from Prince should match the html file.
I've attached output from Chrome, Firefox and Prince for comparison, after making the document a bit longer so that it does actually fragment. All three show the alignment being off to the left after a page break. There aren't any page breaks when viewing it in the browser, but if you were to use a multicol container (in Chrome) then you would see the same effect after a column break. So I think this behaviour is expected.
May I ask what browser you are using, and/or what software you're using to create the HTML (if any)?
May I ask what browser you are using, and/or what software you're using to create the HTML (if any)?
@mcevikce
The "shifting to left" is caused by a left-floating element with the word "Summary" in it. It only appears on the first page, and there it pushes other content to the right. This does not happen on the next pages.
As mark has shown, all browsers do this. And Prince.
If you want the shift to continue, you should us table layout, rather than floats.
The "shifting to left" is caused by a left-floating element with the word "Summary" in it. It only appears on the first page, and there it pushes other content to the right. This does not happen on the next pages.
As mark has shown, all browsers do this. And Prince.
If you want the shift to continue, you should us table layout, rather than floats.
This is because there is a float on the first page pushing the table to the right, but that float is quite short and does not extend to the second page. You could use a different layout, such as putting the labels inside another table column instead of using floats, or you could add a left margin to the table and apply negative margins to the floats.