craft.js icon indicating copy to clipboard operation
craft.js copied to clipboard

Save as Pdf

Open Vishnu-rkumar opened this issue 4 years ago • 3 comments

Is there a possible way to save it as pdf file

Vishnu-rkumar avatar Oct 07 '21 04:10 Vishnu-rkumar

Not built in. But here are two ideas on how you could do that.

A) You build your Page Builder with simple components and parse the serialized nodes yourself and use react-pdf to build a PDF.

B) You render the built page with a disabled editor and use PhantomJS to generate a PDF from that page.

ankri avatar Oct 12 '21 07:10 ankri

Puppeteer would be a good alternative for b), too...

For example, I built a micro service to take screenshots of my drafts with puppeteer, to have a preview picture.

ankri avatar Nov 04 '21 17:11 ankri

you can use jsPDF

govind2020 avatar Dec 04 '23 11:12 govind2020