Creating PDF

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

Creating PDF

jhietala
Hi,

I am trying to find an simple way to generate PDF using xforms. I have tried to study the way the Form Builder/Runner generates PDF, but this way seems very complicated due to the nature of custom components (view, section and grids) it uses. Another example is in Government forms, but this example uses PDF template as an basis and reads the instance data from database.

Can anybody make an example how PDF generation can be done runtime from already filled form data? This would be much appreciated!

Br,
Janne
Reply | Threaded
Open this post in threaded view
|

Re: Creating PDF

Erik Bruchez
Administrator
Janne,

The examples you found, Form Runner and Govt Forms, is what we have at  
the moment for inspiration. Ideally you would use Form Runner and its  
built-in PDF generation, this way you wouldn't have to reinvent the  
wheel.

-Erik

On Dec 9, 2008, at 6:46 PM, jhietala wrote:

>
> Hi,
>
> I am trying to find an simple way to generate PDF using xforms. I  
> have tried
> to study the way the Form Builder/Runner generates PDF, but this way  
> seems
> very complicated due to the nature of custom components (view,  
> section and
> grids) it uses. Another example is in Government forms, but this  
> example
> uses PDF template as an basis and reads the instance data from  
> database.
>
> Can anybody make an example how PDF generation can be done runtime  
> from
> already filled form data? This would be much appreciated!
>
> Br,
> Janne
> --
> View this message in context: http://www.nabble.com/Creating-PDF-tp20920972p20920972.html
> Sent from the ObjectWeb OPS - Users mailing list archive at  
> Nabble.com.
>
>
> --
> You receive this message as a subscriber of the [hidden email]  
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Creating PDF

jhietala
Thanks for answers already!

In my case I am actually using orbeon which is part of Intalio. In this environment we use Intalio Designer to define the xforms. This is why I am reinventing the wheel =) There is lots of binding and default models which Intalio creates automaticly. It might be possible to make some modifications to Form Builder, that it would generate all the stuff Intalio needs and just export the .xform file to Intalio Designer and attach it to the project.

For now I am looking an generic way to have also PDF conversion available for all xforms created by Intalio Designer.

Could you describe the steps required in XPL to generate PDF (for example how Form Runner does this)?


I've figured out this far:

First get-components.xpl is called. I am not sure what this exactly does.

Then unroll-form.xpl is called, which calls Form Runner components / xslt transformations.

I currently in a point that I can produce an PDF but I have problem getting the instance data to it.

Basically I am using oxf:url-generator to get the xform using Intalio URL parameter. The submission instance input should contain the actual instance data, but I am not sure how to combine this with the xform. After this I am calling epilogue to process the form to xhtml and then feed it to flyingsaucer processor.


Br,

Janne

Erik Bruchez wrote
Janne,

The examples you found, Form Runner and Govt Forms, is what we have at  
the moment for inspiration. Ideally you would use Form Runner and its  
built-in PDF generation, this way you wouldn't have to reinvent the  
wheel.

-Erik

On Dec 9, 2008, at 6:46 PM, jhietala wrote:

>
> Hi,
>
> I am trying to find an simple way to generate PDF using xforms. I  
> have tried
> to study the way the Form Builder/Runner generates PDF, but this way  
> seems
> very complicated due to the nature of custom components (view,  
> section and
> grids) it uses. Another example is in Government forms, but this  
> example
> uses PDF template as an basis and reads the instance data from  
> database.
>
> Can anybody make an example how PDF generation can be done runtime  
> from
> already filled form data? This would be much appreciated!
>
> Br,
> Janne
> --
> View this message in context: http://www.nabble.com/Creating-PDF-tp20920972p20920972.html
> Sent from the ObjectWeb OPS - Users mailing list archive at  
> Nabble.com.
>
>
> --
> You receive this message as a subscriber of the ops-users@ow2.org  
> mailing list.
> To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
> For general help: mailto:sympa@ow2.org?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the ops-users@ow2.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
For general help: mailto:sympa@ow2.org?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Creating PDF

jhietala
In reply to this post by jhietala
I have managed to develope XPL similar to Form Runner, which generates first an nice looking xhtml and then create PDF using FlyinSaucer based on xhtml.

Next problem is getting the instance data to show up on the form. Instance data of the form is submitted for the PDF processor. In examples (ie form runner) the default model is replaced with the instance to get actual data in the form. This works fine with the XHTML output, but when PDF is processed, there are no values in the fields.

So my next question would be, how to get the actual instance data to PDF?