Xslfo

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

Xslfo

daniele.stroppa
Xslfo

Hello,

I'm writing an application that creates a chart (using the OPS chart processor) and then needs to export his chart to pdf. I'm using a xslt processor to get the xsl-fo document out of the chart-info tag generated by the chart processor and the output of that processor looks like the following:

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:p="http://www.orbeon.com/oxf/pipeline">

    <fo:layout-master-set>
        <fo:simple-page-master master-name="A4-landscape" page-height="21cm" page-width="29.7cm">
            <fo:region-body border="medium ridge silver" margin="0.2in" padding="0.1in"/>
        </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="A4-landscape">
        <fo:flow flow-name="xsl-region-body">
            <fo:block>
                <fo:external-graphic src="url(http://localhost/ops/chartDisplay?filename=jfreechart-24390.png)" content-type="content-type:image/png"/>

            </fo:block>
            <fo:block color="gray" font-family="monospace" text-align="right" font-size="10pt">Created by: Atkins</fo:block>

        </fo:flow>
    </fo:page-sequence>
</fo:root>

When I then pass this document to a xslfo converter I get this error: 

Error while creating area : Error with image URL: Server returned HTTP response code: 500 for URL: http://localhost/ops/chartDisplay?filename=jfreechart-24390.png and no base URL is specified

Has anyone tried to do something similar and is able to advise me on this subject?

Thanks all

regards

Daniele Stroppa
Graduate Software Engineer - Information Solutions Consultancy
Intelligent Transport Systems
Atkins Highways and Transportation

Woodcote Grove, Ashley Road, Espom, Surrey, KT18 5BW
Tel: +44 (0)1372 756726
Mob: +44 (0)7981 670012
E-mail: [hidden email]
www.atkinsglobal.com/its



This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding.



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Xslfo

Alessandro  Vernet
Administrator
Daniele,

I never tried to generate a chart with the chart processor and then
reference it from XSL:FO. First, can you access
http://localhost/ops/chartDisplay?filename=jfreechart-24390.png from
your browser?

If you can access it from the browser, but that FOP can't, I suspect
that this is because the /chartDisplay servlet checks that user that
requests the chart is the same as the one who asked for that chart to
be produced. This means that if FOP does not forward cookies while
handling fo:external-graphic, then /chartDisplay will think that the
request comes from a different user, and respond with a 500.

Alex

On 10/4/06, Stroppa, Daniele <[hidden email]> wrote:

>
>
>
> Hello,
>
> I'm writing an application that creates a chart (using the OPS chart
> processor) and then needs to export his chart to pdf. I'm using a xslt
> processor to get the xsl-fo document out of the chart-info tag generated by
> the chart processor and the output of that processor looks like the
> following:
>
> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:oxf="http://www.orbeon.com/oxf/processors"
> xmlns:p="http://www.orbeon.com/oxf/pipeline">
>
>     <fo:layout-master-set>
>         <fo:simple-page-master master-name="A4-landscape" page-height="21cm"
> page-width="29.7cm">
>             <fo:region-body border="medium ridge silver" margin="0.2in"
> padding="0.1in"/>
>         </fo:simple-page-master>
>     </fo:layout-master-set>
>     <fo:page-sequence master-reference="A4-landscape">
>         <fo:flow flow-name="xsl-region-body">
>             <fo:block>
>                 <fo:external-graphic
> src="url(http://localhost/ops/chartDisplay?filename=jfreechart-24390.png)"
> content-type="content-type:image/png"/>
>
>             </fo:block>
>             <fo:block color="gray" font-family="monospace"
> text-align="right" font-size="10pt">Created by: Atkins</fo:block>
>
>         </fo:flow>
>     </fo:page-sequence>
> </fo:root>
>
> When I then pass this document to a xslfo converter I get this error:
>
> Error while creating area : Error with image URL: Server returned HTTP
> response code: 500 for URL:
> http://localhost/ops/chartDisplay?filename=jfreechart-24390.png
> and no base URL is specified
>
> Has anyone tried to do something similar and is able to advise me on this
> subject?
>
> Thanks all
>
> regards
>
> Daniele Stroppa
> Graduate Software Engineer - Information Solutions Consultancy
> Intelligent Transport Systems
> Atkins Highways and Transportation
>
> Woodcote Grove, Ashley Road, Espom, Surrey, KT18 5BW
> Tel: +44 (0)1372 756726
> Mob: +44 (0)7981 670012
> E-mail: [hidden email]
> www.atkinsglobal.com/its
>
>
>
> This email and any attached files are confidential and copyright protected.
> If you are not the addressee, any dissemination of this communication is
> strictly prohibited. Unless otherwise expressly agreed in writing, nothing
> stated in this communication shall be legally binding.
>
> --
> 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
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>

--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet