remove pdf temp file #49
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 pdfstreamis used after theconversion'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 inconversion's callback, not later because it will be removed.