Posted by
Erik Bruchez on
URL: https://discuss.orbeon.com/Can-a-PDF-of-what-is-displayed-in-the-browser-be-generated-via-the-XFORM-used-to-generate-the-HTML-b-tp1471489p1576008.html
Brian,
I had a quick look at your code.
The reason it fails is the following:
* pdf-view.xpl calls convert.xpl
* convert.xpl does not retrieve a source form, but a form fully
processed by the XForms engine, including URL rewriting
* this means that you have in there URLs like <script
src="/orbeon/ops/yui/yahoo/yahoo.js" type="text/javascript"/>
* you then feed this in turn to print-pdf-notemplate.xpl
* print-pdf-notemplate.xpl runs the XForms epilogue on this (probably
doesn't do much since there is no XForms anymore)
* then oxf:xhtml-to-pdf runs, which will try to rewrite again
resources starting with /orbeon/
* so you get/orbeon/orbeon/*, which fails
Right now, oxf:xhtml-to-pdf assumes that URLs in the input document
have not yet been rewritten. So you should probably try to feed
oxf:xhtml-to-pdf with such an input.
Form Runner does things differently: it doesn't retrieve an HTML page
that has already gone through URL rewriting, but instead runs a source
XForms page through the XForms engine, and captures its output before
it has been rewritten.
-Erik
On Mon, Mar 1, 2010 at 10:23 AM, Schwartzman, Martin
<
[hidden email]> wrote:
> 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>
>
--
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