1

We are generating PDF contracts in our product for user-consumption. Sometimes the contracts need to be customized with different layouts to account for additional customer-specific data. We have to somehow do this at scale for many customers, allowing them to send in new template versions.

Requirements:

  • templates must allow variable-row tables for data insertion
  • templates must be able to hide some passages based on data
  • templates must allow addition of large amounts of custom text under a custom layout

Some solutions we've considered:

  • Adobe Acrobat only allows us to insert static fields into a PDF, but doesn't allow variable number of table rows.
  • Microsoft Word may be a solution for dynamically populating/hiding fields with VBA macros...
  • iText can be used to manually construct the PDFs based on customer templates
  • Jaspersoft Studio can be used to define the templates if all customers agree to train someone to use it

Would appreciate any similar experiences in dealing with this type of problem. Thanks.

Shaun Lebron
  • 2,501
  • 28
  • 29
  • Adobe Propaganda would say using XFA, with LiveCycle Designer (which was thrown after Acrobat Pro Windows users for several years, but got unbundled with Acrobat XI). – Max Wyss Jan 15 '15 at 21:09
  • I have developed such a system using PDF forms with Acrobat. It is possible, but requires a bit of planning (and developing). Examples are beyond the scope of this forum, but if there is interest, feel free to contact me in private. – Max Wyss Jan 15 '15 at 21:10
  • IMHO, that is the description of XSL FO. This example shows one of the editors you can use even in browser with all the logic you request: http://www.cloudformatter.com/Nimbus.Editor?http://cdn.xportability.com/Samples/BenefitStatement.html – Kevin Brown Jan 16 '15 at 06:55
  • iText has an addon called XFA Worker that can flatten XFA forms. XFA forms are very dynamic. See the [XFA Worker page on the official iText site](http://itextpdf.com/product/xfa_worker). An alternative could be to use HTML as template and then create the PDF using [XML Worker](http://itextpdf.com/product/xml_worker). – Bruno Lowagie Jan 16 '15 at 08:16
  • If you download the free ebook [The Best iText Questions on StackOverflow](https://leanpub.com/itext_so), you'll find the answers to questions such as [What is the difference between iText, JasperReports and Adobe LC?](http://stackoverflow.com/questions/15492738/difference-between-itext-and-adobe-lc) and [How to generate and design PDFs with iText or iTextSharp?](http://stackoverflow.com/questions/26218444/generate-and-design-pdf-with-itextsharp-or-similar) very interesting. – Bruno Lowagie Jan 16 '15 at 08:18

0 Answers0