docker-invoiceplane icon indicating copy to clipboard operation
docker-invoiceplane copied to clipboard

Added missing Package for PDF export and made PDF templates accessible from outside the container

Open FreakyBytes opened this issue 7 years ago • 6 comments

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 avatar Jul 26 '18 21:07 FreakyBytes

@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

sameersbn avatar Jul 30 '18 16:07 sameersbn

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 avatar Jul 30 '18 16:07 sameersbn

@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. :)

FreakyBytes avatar Aug 03 '18 07:08 FreakyBytes

Just voicing my interest in getting the templates customisable :+1: Hoping to see this merged soon.

noplanman avatar Aug 29 '18 22:08 noplanman

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:

noplanman avatar Aug 30 '18 11:08 noplanman

@sameersbn Are you still maintaining this image? Does it work flawlessy for you as is?

noplanman avatar Mar 08 '19 11:03 noplanman