•  
      code_for_government #482402
    New Feature development
    Academic Bank of Credits
    Improve or Rebuild HTML to PDF Conversion Script with Multilingual Font Support (Especially Hindi) - Academic Bank of Credits
    Empty
    Active
    Python
    Medium
    Empty
    We already have a working HTML to PDF conversion script available at the following repository:

    Repo Url - https://openforge.gov.in/plugins/git/abc-collabwithgov/HtmlToPdf

    While it handles basic HTML well, it fails to consistently render non-English text, especially Hindi and other Indic scripts, due to font encoding or missing font rendering issues.

    This task is intended to either improve the existing script or build a fresh, robust version that can reliably generate PDFs from HTML while maintaining full support for multilingual content, including Unicode, Indic scripts, RTL languages, and custom fonts.
    CLI or Python function-based interface

    Support for embedded fonts

    Language-agnostic handling (multilingual content)

    Option to load remote fonts or use locally embedded fonts

    Provide usage documentation and sample inputs

    Clear error handling and logging
    A Python script or tool that:

    Converts HTML to PDF reliably

    Renders Hindi and other non-English text without corruption

    Accepts external fonts via configuration or environment

    Includes sample HTML input, fonts, and expected PDF output

    Comes with an updated README with usage instructions

    Clone the Repository: Start by cloning the project’s repository. Create a Branch: Use Git to create your branch for the task. Generate a Pull Request: After completing your audit, submit your findings by generating a pull request.

    Empty
    2025-05-15 13:59
    2026-01-31

    Organization Type: Government Publisher Name : Academic Bank of Credits (Digital India Corporation)

    Sanjay Patel (sanjay_patel)
    Empty
    Empty
    #482402

    Follow-ups

    User avatar

    I would suggest using puppeteer package to create pdf's using html template. Puppeteer literally used headless browser environment to paint html page, all languages, all kind of custom fonts, image formats are supported, so just create as any kind of complex page with html and css (external css is also supported, prefer using internal css to save some laod time or avoid other issues like network failuares.) and save the pdf version of it.

    Feel free to connect if you think this works.

    User avatar

    Hello Team,

    I'm interested in contributing to this HTML to PDF conversion task with multilingual font support, particularly for Hindi and Indic scripts.

    My relevant experience:

    • Strong Python development background with FastAPI, data pipelines, and backend architecture
    • Experience with document generation and data processing systems
    • Built ETL pipelines handling various data formats (CSV, JSON, XML)
    • Developed scalable systems supporting thousands of concurrent transactions
    • Oracle Cloud Infrastructure Data Science Professional certified

    I would like to audit the existing codebase and implement proper UTF-8 encoding and font embedding to resolve the rendering issues for Hindi and other Indic scripts. I've already requested repository access.

    GitHub ID: hemakrishna7406 LinkedIn: linkedin.com/in/hemakrishna7406

    Looking forward to contributing to this government initiative!

    Best regards, Hema Krishna B.V

    User avatar

    Hi, Please find this git url https://github.com/GaneshKandu/gmakepdf/tree/main As Easy as Possible.

    Just install pip install gmakepdf

    and use in code

    from gmakepdf import html_file_to_pdf, html_to_pdf
    # Output file
    output_file = "test.pdf"
    
    # Generate PDF
    html_file_to_pdf("demo.html", "demo.pdf")
    
    print(f"PDF created successfully: {output_file}")
    
    content = "Hi."
    
    binary = html_to_pdf(content)
    
    with open("output.pdf", "wb") as f:  # 'wb' = write binary
        f.write(binary)
    
    print("PDF written successfully!")
    

    can be use anywhere just to install

    User avatar
    Nikhil Raj (nikhilraj)2025-12-30 20:41

    Hi Team,

    I would like to take this up. I have reviewed the requirement regarding the HTML-to-PDF conversion failure for Indic scripts. I plan to investigate the current font embedding method and test alternative libraries or configuration changes (ensuring proper UTF-8 encoding and font path linking) to resolve the rendering issues.

    Please assign this to me and provide repository access. GitHub ID: thenikhilraj

    User avatar

    Hello Team, I’m interested in contributing to this task. I’ve built multilingual systems in my own projects, Setu and Fino-Add-Wise, where I handled Unicode and Indic language content in real usage scenarios. I’m comfortable reviewing the existing Python script and improving font embedding and HTML to PDF rendering reliability. GitHub: Ramharsh-aidev

    User avatar

    Hi, I am interested Please let me know how to get contributor access to the repository so I can start.

    User avatar

    Hello Team, I’m interested in contributing to this task. I have experience working with Python-based document pipelines, Unicode handling, and PDF/report generation. I can help audit and improve the current HTML-to-PDF pipeline to ensure proper rendering of Hindi and other Indic scripts with embedded fonts.

    Please let me know how to get contributor access to the repository so I can start.

    User avatar
    • Repository URL
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar

    Hi, I am interested Please assign me the "Improve or Rebuild HTML to PDF Conversion Script with Multilingual Font Support (Especially Hindi) - Academic Bank of Credits" task for the Academic Bank of Credits. My GitHub username is zubekhan01st. Excited to contribute!

    Thanks, Zuber Khan

    User avatar
    • Descriptions
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    • What You’ll Do
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    • Expected Outcome
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    • Repository URL
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes