Q: PDF from png and html invoices.
I have two services I could use this for, wanted to confirm this system will work.
1. One part of my website generates a php/html page that looks like an invoice, but is retained in html format. Could I use this to retain my process but automatically generate them for customers in pdf form instead?
2. Another part of my site pulls a .png file certificate template, uses an .php page to pull the student info, adds the appropriate class title, student named etc, and then generates a new .png template for the user to download with their information. Could I use this api to turn this same process into pdf generation for that process still using the png templates?
markupgo
Dec 8, 2024A: Hi LEO-Network,
1- Yes, you can use this API to convert your HTML invoices to PDF. You just need to call our `/pdf` endpoint with the HTML content in the request body. Please check this link for more information: https://markupgo.com/docs/api/pdf#post-pdf-from-html
2- The same endpoint can be used for this purpose as well.
Besides, you can also create a template with placeholders for the student info, class title, student name, etc. and then replace these placeholders with the actual values before converting the HTML to PDF. Please check this tutorial for template-based PDF generation:
https://markupgo.com/blog/html-to-pdf-invoice
https://markupgo.com/blog/reusable-templates