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

Issue with HTML to PDF Translation - Images Getting Cut Off #249

Open
amanshitta-crossml opened this issue Aug 29, 2023 · 1 comment
Open

Comments

@amanshitta-crossml
Copy link

I am encountering an issue while attempting to translate HTML content into PDF format. The content includes tables and images, but there is a specific problem where images are being cut in half when the content flows onto the next page. I am seeking guidance on how to resolve this issue.

image

@amanshitta-crossml
Copy link
Author

amanshitta-crossml commented Aug 29, 2023

Here's additional information on how I am generating the PDF and the available options for PDF creation.

`pdf_options = {
'page-size': 'Letter',
'margin-top': '1in',
'margin-right': '0.75in',
'margin-bottom': '0.75in',
'margin-left': '0.75in',
'encoding': 'UTF-8',
'header-line': None,
'header-html': 'header.html',
'footer-html': 'footer.html',
'disable-external-links': None,
'quiet': None
}

pdfkit.from_string(html_content, output_file, options=pdf_options)`

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

1 participant