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

Cannot render emojis or data in different languages #256

Open
sammathur004aso opened this issue Jan 8, 2024 · 0 comments
Open

Cannot render emojis or data in different languages #256

sammathur004aso opened this issue Jan 8, 2024 · 0 comments

Comments

@sammathur004aso
Copy link

sammathur004aso commented Jan 8, 2024

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

  1. Use the provided html_to_pdf.py script.
    
  2. Include an HTML content with emojis and text in different languages.
    
  3. Execute the script to convert HTML to PDF.
    
  4. 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.

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