HTML to PDF back to HTML

222 Views Asked by At

Trying to wrap my head around this one.

2 part question...

  1. Is this possible - I am trying to create a HTML page with certain elements editable (class="editme" contentEditable). Once they click save I want to take that page and convert/save it to pdf while preserving the tags, especially the editme tags. Then I want to be able to later load that pdf back into the HTML for editing and as mentioned look for the tags so I can correctly layout the page.

  2. My preference is for JS but are there any libraries or open APIs out there that can help achieve this? I am looking at mozilla/pdf.js and I looked at MrRio/jsPDF which doesn't support css. I'll need layout, styles, and html tag intact.

As noted I used and tested pdf.js. This fails bc it only converts PDF to SVG or Canvas to view not to HTML per se. It also does not do any format to PDF. jsPDF doesn't handle styles(css) so it is dead to me until it does.

0

There are 0 best solutions below