bauhausjs / phantom-html2pdf

Node module to generate PDFs from HTML via PhantomJS
MIT License
112 stars 47 forks source link

How do I remove HTML, CSS, JS temporary files #21

Closed lekhnath closed 8 years ago

lekhnath commented 8 years ago

This library internally creates temporary files if we provide contents against 'html' , 'css', 'js' fields in option. But they are not removed after generating pdf file. However it provides a path to pdf's temporary file and also an option 'deleteOnAction' (not working for me though) to remove the temporary pdf file. It would be nice to have a clean method in PDFResult class which removes all the auto-generated temporary files including html, css, js, runnings, pdf.

dustin-H commented 8 years ago

Hi, this lib only creates one temporary pdf-file, which will be automatically removed afterwards. You can control this with deleteOnAction.

You need to delete your input files by your own.

If you think deleting input files is a good feature, please create a PR.

I hope I understood your question correctly. Otherwise please explain it with more detail. Cheers Dustin.

dustin-H commented 8 years ago

Hoping this is solved. Otherwise please reopen.