1

Not sure if this is the right platform for this, but here goes :) Throughout my career I have been generating reports for users, and most of the times it always started from a Word template (.dot/.dotm) handed to us by a user, containing all the required/wanted layout/logos/texts, which we then edited to insert correct bookmarks in the right places, and filled up using a combination of XML and VBA :)

Once this work was done, the user could then edit the .dot-files herself (e.g. replace the logo, edit the fixed address).

Now I am yet again facing this same problem, and I am wondering what the current state or alternatives are. I generally do not like to work with Word/VBA (yet another dependancy -- I create websites using ruby on rails).

Generally/currently it is pretty easy to convert html to pdf/word or create pdf/word documents directly, but I am wondering if there is a way for a layman to describe "templates"/layouts and to use that template to generate reports (programmatically) (preferably without the use of Word Automation).

So, the requirement is to generate printable reports, where a user can specify/supply her own template, without having to program, and can manipulate text/content/images.

Things I can think of (but not sure if they exist)

  • if such a thing exists: define PDF Templates and then programmatically fill them with data?
  • a way to edit HTML pages/snippets, so a user could interactively edit a report in HTML (e.g. add logos/footer/header) and then save the HTML as a "template" for the report

Any ideas/suggestions?

3
  • There are many templaing engines for doing what you are looking for. From something like velocity to the classic m4 that's nearly 40 years old (yes, that's actually a macro pre-processor but with the proper writing of macros, it can do what you want too).
    – user40980
    Jan 25, 2016 at 14:28
  • 1
    There are plenty of tools out there that can turn HTML into PDF which might suit your needs, but that's more of a software recommendation which is off-topic for this site.
    – JDT
    Jan 25, 2016 at 14:31
  • Probably it is not clear, but for me the question is not "how to generate documents", but I am looking for a pretty mainstream solution where a non-programmer can create and maintain "templates" (in a wysiwyg way, e.g. as easy as Word), which can then be used to create reports programmatically.
    – nathanvda
    Jan 25, 2016 at 16:47

0

Browse other questions tagged or ask your own question.