-
Notifications
You must be signed in to change notification settings - Fork 333
Open
Description
PDF conversion issue: Emojis and language rendering problems
Description
When converting HTML to PDF using pdfkit, emojis appear as black boxes or square brackets, and there are difficulties in rendering different languages properly. This issue impacts the visual fidelity of the converted PDF.
Steps to Reproduce
-
Use the provided html_to_pdf.py script.
-
Include an HTML content with emojis and text in different languages.
-
Execute the script to convert HTML to PDF.
-
Observe the output PDF, [output_pdfkit.pdf](https://github.com/JazzCore/python-pdfkit/files/13856753/output_pdfkit.pdf).
html_to_pdf.py
html_content = "<html><body><h1>Hello, PDF! 😊</h1></body></html>"
pdfkit_output_path = "output_pdfkit.pdf"
pdfkit.from_string(html_content, output_pdf_path)
Expected Behavior
Emojis and text in various languages should be correctly rendered in the generated PDF, maintaining visual fidelity with the original HTML.
Actual Behavior
Emojis appear as black boxes or square brackets, and there are rendering issues with different languages, as evidenced by the attached output_pdfkit.pdf.
Metadata
Metadata
Assignees
Labels
No labels