Project: | PDF Include project |
Component: | Code |
Category: | feature request |
Priority: | normal |
Assigned: | jice |
Status: | active |
I have a Invoice PF template that I use for generating digital invoices to be e-mailed to our clients.
I have an performance issue, because of the loading of the pdf template.
For every invoice I want to generate, the PDF template is loaded. After issuing a pdf_close, the temp tables containing the template information are cleared and I have to reload the template file.
Is it possible to issue a pdf_close, so the pdf-invoice is written to disk and then continue with the next invoice by using pdf_new?
But WITHOUT having to load the template file again.
Comments
#1
Hi
This would indeed be a very good idea to implement.
For this use case, we could think of a pdf_close2 with new options, like one not to wipe the information about the loaded template, thus being able to reuse it as-is from a new stream (with the same name). This would be the easier way.
first time:
run pdf_new("spdf", ...)
run pdf_open_PDF("spdf", ..., "myTemplate").
...
run pdf_use_PDF_page("spdf", "myTemplate", 1).
...
run pdf_close2("spdf", "keepExternal=myTemplate")
next times:
run pdf_new("spdf", ...)
...
run pdf_use_PDF_page("spdf", "myTemplate", 1).
...
run pdf_close2("spdf", "keepExternal=myTemplate")
plus may be a clean-up procedure at the very end.
I have to think about a way to generalize it a little bit, like using the same template for more than one stream without reparsing it.
Would you be interested by such a feature?
regards
Jice
#2
Well, I would like to see that.
I'm glad you're still maintaining PDFInclude.
#3
Dittos to the yes. This would be a useful feature. I was a bit chapfallen at the overall lack of apparent performance of the reporting output, so anything to improve performance, even of the form filling/form reuse use-cases would be most welcome.
#4
Hi
This has been implemented in v5. It allows to spare a lot of time indeed when generating multiple reports all with the same pdf template.
Contact me privately if you wish more details and the conditions.
regards
JC