Custom PDF generation

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Custom PDF generation

Nupur Ghatnekar
Hello,

We are using Orbeon for creation and distribution of forms. However, once the form is filled out and submitted by a user, we wish to create our custom PDF. We have a grails application handling which will handle the PDF generation. 

We wanted to find out how do we go about with conversion of the form XML? For the PDF generation we need to have the HTML layout which is not available out of the box in Orbeon. Is there a way in which we can generate this layout (with and without the filled data)?

We are using Orbeon-v4.5. Please let us know if there is a way to solve this issue.

Thanks.

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Custom PDF generation

Erik Bruchez
Administrator
I assume that you have a good reason not to want to use the built-in PDF generation?

The built-in Form Runner PDF generation takes as input the HTML produced by the Form Runner Review page. For example:

    http://demo.orbeon.com/orbeon/fr/orbeon/bookshelf/view/24565d3894e9d156042d60f9a70f3d74

Compare with:

    http://demo.orbeon.com/orbeon/fr/orbeon/bookshelf/pdf/24565d3894e9d156042d60f9a70f3d74

The HTML is then converted to PDF via a library called Flying Saucer. You can see how it's done here:

    https://github.com/orbeon/orbeon-forms/blob/master/src/resources/apps/fr/print/print-pdf-notemplate.xpl

If you really want to do your own, you could retrieve the Review page by URL, and then do your processing on that.

-Erik
Reply | Threaded
Open this post in threaded view
|

Re: Custom PDF generation

Nupur Ghatnekar
Hi Eric,

Thank you for your prompt response. The project went on a bit of slow run. However, we followed your suggestion and parsed the published XML (orbeon_form_definition). The XML is well structured and hence it was easy to parse it. The mapping of binding, resources and view nodes seemed the logical way of tackling the issue.

Thanks for your help!
Appreciate it.

Best,
NupurĀ 


On Sat, May 24, 2014 at 10:19 AM, Erik Bruchez <[hidden email]> wrote:
I assume that you have a good reason not to want to use the built-in PDF
generation?

The built-in Form Runner PDF generation takes as input the HTML produced by
the Form Runner Review page. For example:


http://demo.orbeon.com/orbeon/fr/orbeon/bookshelf/view/24565d3894e9d156042d60f9a70f3d74

Compare with:


http://demo.orbeon.com/orbeon/fr/orbeon/bookshelf/pdf/24565d3894e9d156042d60f9a70f3d74

The HTML is then converted to PDF via a library called Flying Saucer. You
can see how it's done here:


https://github.com/orbeon/orbeon-forms/blob/master/src/resources/apps/fr/print/print-pdf-notemplate.xpl

If you really want to do your own, you could retrieve the Review page by
URL, and then do your processing on that.

-Erik

--
View this message in context: http://discuss.orbeon.com/Custom-PDF-generation-tp4658394p4658402.html
Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Orbeon Forms" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/orbeon/UsZ5VGYOSLo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].



--

Nupur Ghatnekar

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Custom PDF generation

Erik Bruchez
Administrator
Nupur,

Glad you found a solution, and thanks for sharing!

-Erik