Skip to content

Conversation

@bjrmatos
Copy link
Collaborator

this PR implements what i say in this issue.

for now, i've only removed the temporal pdf file (since it is the file that causes more troubles and the most important part of this module), we can discuss if we should remove the others files (templates) here, or after rendering, or implement other technique for template sharing, personally i would vote for the remove other files after rendering.

IMPORTANT NOTE: the temp pdf file is only removed if the user has been consumed the file, if the file it is not consumed, the pdf file will stay on disk, let me know if you would like me to implement the remove of the file even if it is not consumed (after conversion's callback execution), i have not do this because maybe there are edge cases when the pdf stream is used after the conversion's callback execution, but we can add to docs that we always clean up the pdf file, so the user will know that it has to consume the file in conversion's callback, not later because it will be removed.

@bjrmatos bjrmatos mentioned this pull request Jan 13, 2017
@bjrmatos
Copy link
Collaborator Author

i've ended up implementing the remove of the file even when is not consumed, let me know what you think.

@pofider
Copy link
Owner

pofider commented Jan 16, 2017

Thank you for this very nice implementation. I'm not very good in node.js streams so it is hard for me to give some valuable comments. I've summarized approaches for dealing with temp files here, so we can choose what will be implemented or merged

#44 (comment)

@peterdeme
Copy link
Contributor

What's the state of this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants