Click here to Skip to main content
15,888,113 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a webpage in which the user can make changes like highlighting an image, adding a comment and so on. What I want is when the user clicks on a submit button a PDF file of the web page with the changes is generated, so that I can send it to the user through email. Any help?

What I have tried:

I tried using dompdf but I faced problem with images and also I didn't know how to include the current SVG image with the highlighting. 
Posted
Updated 9-Jan-21 22:02pm

1 solution

Maybe you can use the API of Online pdf converter: html-to-pdf-file-converters[^]

You can find developer info here: Create your own online file converter[^]

As for Dompdf, on GitHub - dompdf/dompdf: HTML to PDF converter for PHP[^] it says:
Quote:
Embedding "raw" SVG's (<svg><path...>) isn't working yet, you need to either link to an external SVG file, or use a DataURI like this:
etc...
 
Share this answer
 
v3
Comments
Member 15042038 10-Jan-21 4:38am    
These APIs convert the webpage to pdf without the changes the user made.
RickZeeland 10-Jan-21 4:55am    
Was already afraid of that, I added some alternatives on Slant :)
Member 15042038 10-Jan-21 4:58am    
I don't understand what do you mean by: "I added some alternatives on Slant"
RickZeeland 10-Jan-21 5:49am    
That's the link: https://www.slant.co/topics/3535/~best-html-to-pdf-file-converters

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900