PDF Template Question/Idea

I have an application that is used to track jobs for residential construction work. This application produces several documents using PDF templates that all have the same header information (customer name, job number, project manager, job address, etc.) Is there a way to create a PDF template that contains the header information and embed it in all of these templates? Currently, I am putting the same information in the same format in all of the templates. When the client wants a change to the format or information included, I have to change all of the documents. Has anyone ever done anything like this? Am I missing something in Mendix?
3 answers

It's simple: create one document template with only the header and overlay it over the generated documents (without the headers) with a simple Java action.

I've used this Jar several times for similar purposes and it works just fine: http://pdfbox.apache.org/apidocs/org/apache/pdfbox/Overlay.html


I had a similar problem. I defined a HTMLHeader string attribuut for the entity and build the HTML string in an after commit trigger. I show this HTMLheader string an all relevant templates with property "Render XHTML" turned on . When the customer wants changes I only have to change the way I build the HTML string.

Might be an Acceptable workaround for you too.


There is no way to do this currently. We have some ideas for improvement of the document generator, making it more like how you design pages in Mendix 5. But at this stage they are just ideas. If enough people want this I'm sure we can move it up in priority. Expect the Mendix Idea forum soon, then you can vote on such ideas.