Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF generation differences between IronPDF and Chrome browser #5

Open
djimmo opened this issue Jul 31, 2018 · 2 comments
Open

PDF generation differences between IronPDF and Chrome browser #5

djimmo opened this issue Jul 31, 2018 · 2 comments

Comments

@djimmo
Copy link

djimmo commented Jul 31, 2018

Hi IronPDF,

I have also mailed you, but did not receive any answer. I was wondering why there are differences in the PDF generation between IronPDF and Chrome browser. Layout changes when using IronPDF and the css property { page-break-after: always; } behaves differently.

In chrome the { page-break-after: always; } starts a new page on and keeps the margin where this pages is started the same for all subsequent pages. When using IronPDF every new page break the content moves slightly up, so after 10 pages the page breaks don't work anymore. What causes this difference?

I have attached the print from Chrome browser testgood.pdf and also the print from IronPDF testbad.pdf to better illustrate the differences.

Another issue I see to have it that IronPDF is less strict with css styling, what causes this difference? See the following examples: Printed in Chrome: columnwidthgood.pdf and printed with IronPDF:
columnwidthbad.pdf. As you can see the columns are less wide when printing with IronPDF, especially noticable on the 'Afzender naam' field

I hope you can help me fix these slight issues that I am having.

regards,
Djim

@asfarley
Copy link

asfarley commented Jun 2, 2021

I just ran into this myself after purchasing IronPDF. I hope there is a way to deal with page breaks as @djimmo mentioned.

@asfarley
Copy link

asfarley commented Jun 2, 2021

Nevermind, explicitly setting the CSS meda type to print fixed the issue with the page-breaks:

https://stackoverflow.com/questions/59179499/ironpdf-print-to-margin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants