Added missing Package for PDF export and made PDF templates accessible from outside the container
Hi,
this PR fixes issues I encountered with the PDF exports due to the missing php-xml package. Further it adds the capability to add and modify PDF/Web templates in a similar way as the upload folder is handled.
fixes #3
@FreakyBytes I am worried if this will cause any issues while upgrading between versions. I think we should rather allow users place their invoice and pdf templates at the templates/invoice and templates/pdf paths in the INVOICEPLANE_DATA_DIR location. The image should then sync the contents of these folders at the respective locations in INVOICEPLANE_INSTALL_DIR
fixes issues I encountered with the PDF exports due to the missing php-xml package
What issue do you notice as a result of this missing package? With the current release I am able to render PDF invoices. Not sure about the issue you are mentioning
@sameersbn Not entirely sure, if I can follow you. The $INVOICEPLANE_DOCUMENT_TEMPLATES variable defaults to $INVOICEPLANE_DATA_DIR/templates, following the mechanism for the uploads directory.
Regarding the issues I experienced: I had some weird issues with the stock image (no modifications, other templates etc.) where I could generate quote pdfs, but got a server error for invoices. This could be fixed by manually installing php-xml in the container, based on clues from the InvoicePlane internal log files.
Unfortunately, did idiot-me not save the logs and I'm currently a bit too busy to recreate the issue. But if you want I can look into this again, after the weekend. :)
Just voicing my interest in getting the templates customisable :+1: Hoping to see this merged soon.
I too was having issues with the PDF rendering, error log stated that Class 'DOMDocument' not found, so after installing php7.2-xml it worked perfectly.
So this is absolutely necessary to have installed :+1:
@sameersbn Are you still maintaining this image? Does it work flawlessy for you as is?