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 Service #140

Open
techsavvyash opened this issue Jun 28, 2024 · 6 comments · May be fixed by #155
Open

PDF Generation Service #140

techsavvyash opened this issue Jun 28, 2024 · 6 comments · May be fixed by #155
Assignees

Comments

@techsavvyash
Copy link
Member

techsavvyash commented Jun 28, 2024

Description

PDF Creation microservice.

Research around how can we go about generating PDFs.
examples:

  1. Sending in HTML templates using HBS, EJS etc. templating engines.
  2. .... figure out what can be other ways

2 Parts:

  1. Generating PDFs/Implementation of the generation techniques-- customizable (support multiple templating engines,

We should also have support for bulk PDF generation.
Ideally this should be a JSON based config where where in we send the information using a spec (basically the content + template) and then get bulk links of uploaded PDFs back.

The response should also support streaming raw PDFs instead of uploaded links

Future scope

  • Add an SDK to it
  • Add a CLI to it
  • Add a frontend where the user can visually modify the template and generate PDFs
@techsavvyash
Copy link
Member Author

References:

@drohan2536
Copy link

@techsavvyash
Copy link
Member Author

techsavvyash commented Jul 4, 2024

Current update:

  • able to generate PDFs using template

Next Steps:

  • Check for robustness
    • tables etc, and other tags
    • CSS
    • multiple pages
    • unicode characters - languages like hindi, chinese, odia, japanese etc. etc.
  • Benchmark timings
  • Compare tools with respect to timings

Features

  • Template based PDF generation
  • Template saving
  • end point for generation with the body as JSON of information and templateID
  • ensure scaling
    • Make sure it is fast
      • Research around market standard times
  • API for bulk generation in batches
  • Can respond with a link to a storage service (minIO by default)
  • can send application/pdf as a HTTP response
  • Have support to send PDFs as emails etc.
  • Maybe add support for multiple other templating engine or frontend frameworks like htmx, vue, svelte, astro etc.

@techsavvyash
Copy link
Member Author

techsavvyash commented Jul 5, 2024

  • bulk generation
  • JSON data support
  • CSV support
  • 4s for 50 PDFs

Next Steps

  • Convert to TS
  • Convert manual things to test cases -- figure out a way to test the generated PDF for correctness

@techsavvyash techsavvyash linked a pull request Jul 6, 2024 that will close this issue
@shivankurchavan
Copy link

https://github.com/gotenberg/gotenberg

tool for converting html to pdfs
has no support for html templates

@shivankurchavan
Copy link

https://docs.google.com/document/d/1OHMoig_5YdWqysAK0tur3IUsEUHzUbDY0KRF75BZOuM/edit

document for tracking service development

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

Successfully merging a pull request may close this issue.

3 participants