Can a PDF of what is displayed in the browser be generated via the XFORM used to generate the HTML by the Orbeon engine?

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

Re: Re: FW: Re: RE: Re: Trying to generate a PDF from my xform similar to the way the Form Runner does it

bsteuhl
Here is some code.  If you need some help with submissions and/or xsl-fo, my services are not expensive.
 
Hope this helps.
 

 

    <p:param name="instance" type="input"/>
 

 <p:processor name="oxf:xslt">
  <p:input name="data" href="#instance"/>
  <p:input name="config" href="finalCC.xsl"/>
  <p:output name="data" id="pdf"/>
 </p:processor>
 
 <p:processor name="oxf:xslfo-converter">
        <p:input name="config">
            <config/>
        </p:input>
        <p:input name="data" href="#pdf"/>
        <p:output name="data" id="converted"/>
    </p:processor>
 
 
 <p:processor name="oxf:http-serializer">
                <p:input name="config">
                    <config>
                        <header>
                            <name>Cache-Control</name>
                            <value>post-check=0, pre-check=0</value>
                        </header>
                        <header>
                            <name>Content-Disposition</name>
                            <value>attachment; filename=document.pdf</value>
                        </header>
                        <!-- NOTE: XSL-FO converter specifies application/pdf content-type -->
                    </config>
                </p:input>
                <p:input name="data" href="#converted"/>
            </p:processor>

</p:config>

 

Brian Steuhl
website: http://BTMSoftwareSolutions.com
business email: [hidden email]
cell: 908-421-0742

home office: 732-961-3187
RSS Feed To My Blog:

Business Process Modeling - BTMSoftwareSolutions.com




From: mar [via Orbeon Forms (ops-users)] <[hidden email]>
To: bsteuhl <[hidden email]>
Sent: Mon, March 1, 2010 1:23:28 PM
Subject: RE: Re: FW: Re: RE: Re: Trying to generate a PDF from my xform similar to the way the Form Runner does it

Brian,

I've got 150 forms that need to be printed WYSIWYG (with current
instance data) (and the forms change on a regular basis) so I would like
a more generalized pdf print function that works like the one in form
runner (my forms don't/will not be made to run in form runner). However,
could you send me an example of your xpl that "calls two processors -
xsl and fop. I will take a look at it and try things that way on a
couple of forms to see if there if there might be a way to make a
generalization.

Thanks.

Martin

-----Original Message-----
From: bsteuhl [mailto:[hidden email]]
Sent: Sunday, February 28, 2010 8:50 PM
To: [hidden email]
Subject: [ops-users] Re: FW: Re: RE: Re: Trying to generate a PDF from
my xform similar to the way the Form Runner does it


Martin,

Any success?  I print PDF files using FOP and xpl/xslt (not within Form
Runner).

Basically click print button which calls submission.  Submission sends
instance data to xpl (page-flow.xml file).  The xpl calls two processors
- xsl and fop.  PDF is generated.  You have to be able to create an
xsl-fo document to do this.

Hope that gives you another alternative.

Brian Steuhl
http://BTMSoftwareSolutions.com

--
View this message in context:
http://n4.nabble.com/Can-a-PDF-of-what-is-displayed-in-the-browser-be-ge
nerated-via-the-XFORM-used-to-generate-the-HTML-b-tp1471489p1573135.html
Sent from the Orbeon Forms (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



View message @ http://n4.nabble.com/Can-a-PDF-of-what-is-displayed-in-the-browser-be-generated-via-the-XFORM-used-to-generate-the-HTML-b-tp1471489p1574030.html
To unsubscribe from Re: FW: Re: RE: Re: Trying to generate a PDF from my xform similar to the way the Form Runner does it, click here.


12