Hi, I've cleaned up the code and updated the README. Due to the limitations with the dynamic addition of table rows, and due to the not so pretty looking PDF (this could be a problem with LibreOffice and/or Evince!) I think this project should *not *be an Isis Addon but just a sample project that could be used as a reference for needs in the future.
Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, Dec 1, 2014 at 9:01 AM, Dan Haywood <[email protected]> wrote: > Nice stuff, Martin... thanks for doing this. > > It'd be nice if you could update the README so that we can get an idea of > what the "user experience" is in terms of defining a PDF template. I've > built several of these mail merge modules for Isis and Naked Objects over > the years, and the .docx implementation that I did had the least friction > in terms of ongoing maintenance. To use isis-module-pdf, it'd be helpful > to see what sort of tools the developer would use in order to build the > template. > > Cheers > Dan > > > On 30 November 2014 at 19:18, Martin Grigorov <[email protected]> > wrote: > > > Hi, > > > > I've cloned isis-module-docx and reworked some parts of it to generate > PDF > > with Apache PDFBox: https://github.com/martin-g/isis-module-pdf > > The ugly part is that you have to predefine all input placeholders for > > collection items, e.g. the order lines in the demo. I wasn't able to > find a > > way to dynamically generate the table. That's why the table in the .docx > > that I export as a template PDF has 6 predefined rows ... :-/ > > > > The module is not finished. If there is interest I will clean it up and > > contribute to Isis Addons. > > > > Martin Grigorov > > Wicket Training and Consulting > > https://twitter.com/mtgrigorov > > > > On Wed, Nov 26, 2014 at 5:43 PM, Jeroen van der Wal <[email protected] > > > > wrote: > > > > > Sorry, the library being used is docx4j [1] > > > > > > [1] http://www.docx4java.org/trac/docx4j > > > > > > On Wed, Nov 26, 2014 at 5:39 PM, Jeroen van der Wal < > [email protected] > > > > > > wrote: > > > > > > > Hi there, > > > > > > > > A good entry point would be isis-module-docx from Isisaddons which > is a > > > > wrapper around Apache POI. > > > > > > > > Cheers, > > > > > > > > Jeroen > > > > > > > > > > > > [1] https://github.com/isisaddons/isis-module-docx > > > > > > > > > > > > > > > > On Wed, Nov 26, 2014 at 4:22 PM, Martin Grigorov < > [email protected] > > > > > > > wrote: > > > > > > > >> Hi, > > > >> > > > >> I am not aware of an addon that gives you this functionality out of > > the > > > >> box. > > > >> But you may want to implement it yourself: > > > >> - add an action method that receives the entity/object as a > parameter > > > >> - use any Java library that is capable to produce pdf/doc files out > of > > > the > > > >> entity (e.g. http://poi.apache.org, https://pdfbox.apache.org, > > > >> https://code.google.com/p/flying-saucer/) > > > >> - I am not sure about this step: you need to stream the document > back > > to > > > >> the browser. Maybe returning Blob would do it automatically ?! > > > >> > > > >> Martin Grigorov > > > >> Wicket Training and Consulting > > > >> https://twitter.com/mtgrigorov > > > >> > > > >> On Wed, Nov 26, 2014 at 5:07 PM, Resto Tesis <[email protected] > > > > > >> wrote: > > > >> > > > >> > Hello everyone !! > > > >> > > > > >> > We ask them if you can use ISIS to print a .doc or .pdf file. What > > we > > > >> need > > > >> > is to perform some service that allows us to print data, such as > > > >> billing or > > > >> > ticket for customers of a restaurant. > > > >> > > > > >> > Greetings and thanks, hope to answer !! > > > >> > > > > >> > Resto-Thesis > > > >> > > > > >> > > > > > > > > > > > > > >
