How to use xsl-fo converter

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

How to use xsl-fo converter

julien-29

Hello

I want to use xsl-fo converter, but in the documentation there isn't the
description of parameters of this processor.
So how to indicate my xsl-fo page, and the data to convert ?

Thank you.


--
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: How to use xsl-fo converter

Erik Bruchez
Administrator
You don't really need to use this processor: if your page view outputs  
an XSL-FO document, the default epilogue pipeline will automatically  
send your document to the XSL-FO converter.

-Erik

On Mar 3, 2008, at 2:43 AM, julien wrote:

>
> Hello
>
> I want to use xsl-fo converter, but in the documentation there isn't  
> the
> description of parameters of this processor.
> So how to indicate my xsl-fo page, and the data to convert ?
>
> Thank you.

--
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: Re: How to use xsl-fo converter

Marcus-2
Hi,
i found that thread about xsl-fo.
Any new documentation on this? On your homepage is still an old notice
about fop 0.20.5
And i wonderd, if it would be possible to use XEP instead of FOP,
because i tried to experiment a bit with both and XEP results are much
better.
Its easier to generate a better looking pdf, but actually i don't know
how i could perform that with orbeon.
Is FOP the only choice or would it be possible to have both and choose
by config?
There is still no docs about xslfo in Orbeon - will there be one in the
near future?

Thanks,
kind regards, Marcus



Erik Bruchez schrieb:

> You don't really need to use this processor: if your page view outputs
> an XSL-FO document, the default epilogue pipeline will automatically
> send your document to the XSL-FO converter.
>
> -Erik
>
> On Mar 3, 2008, at 2:43 AM, julien wrote:
>
>>
>> Hello
>>
>> I want to use xsl-fo converter, but in the documentation there isn't the
>> description of parameters of this processor.
>> So how to indicate my xsl-fo page, and the data to convert ?
>>
>> Thank you.
>
> --
> 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: Re: Re: How to use xsl-fo converter

Erik Bruchez
Administrator
Marcus,

> i found that thread about xsl-fo.
> Any new documentation on this? On your homepage is still an old  
> notice about fop 0.20.5

We include fop-0_93.jar now. Latest version seems to be 0.94 on the  
Apache site.

> There is still no docs about xslfo in Orbeon - will there be one in  
> the near future?

Doc is on the Apache web site ;-)

   http://xmlgraphics.apache.org/fop/

The Orbeon XSL-FO processor contains 3 lines of code: the input doc is  
passed to FOP, and that's it. Just have your page produce XSL-FO and  
the processor will kick in. I am not sure there is much more to  
document.

> And i wonderd, if it would be possible to use XEP instead of FOP,  
> because i tried to experiment a bit with both and XEP results are  
> much better.
> Its easier to generate a better looking pdf, but actually i don't  
> know how i could perform that with orbeon.
> Is FOP the only choice or would it be possible to have both and  
> choose by config?

Out of the box, I would say no since we haven't tried it. But  
obviously somebody could try to figure out how to integrate with XEP.

-Erik

--
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: Re: Re: Re: How to use xsl-fo converter

Marcus-2
Hi Erik,
thanks for the notice.
Another question i got while searching the threads is, about embedding
external fonts.
Someone asked if that is possible - anything new about that?

But as i guess, i have to look through your code myself and find out
what else i can configurate and perhaps how to extend the processor.
When i have more time for this maybe i fimd time to try out XEP and keep
you informed, if i found any solutions.
Regards, Marcus



Erik Bruchez schrieb:

> Marcus,
>
>> i found that thread about xsl-fo.
>> Any new documentation on this? On your homepage is still an old
>> notice about fop 0.20.5
>
> We include fop-0_93.jar now. Latest version seems to be 0.94 on the
> Apache site.
>
>> There is still no docs about xslfo in Orbeon - will there be one in
>> the near future?
>
> Doc is on the Apache web site ;-)
>
>   http://xmlgraphics.apache.org/fop/
>
> The Orbeon XSL-FO processor contains 3 lines of code: the input doc is
> passed to FOP, and that's it. Just have your page produce XSL-FO and
> the processor will kick in. I am not sure there is much more to document.
>
>> And i wonderd, if it would be possible to use XEP instead of FOP,
>> because i tried to experiment a bit with both and XEP results are
>> much better.
>> Its easier to generate a better looking pdf, but actually i don't
>> know how i could perform that with orbeon.
>> Is FOP the only choice or would it be possible to have both and
>> choose by config?
>
> Out of the box, I would say no since we haven't tried it. But
> obviously somebody could try to figure out how to integrate with XEP.
>
> -Erik
>
> --
> 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: Re: Re: Re: Re: How to use xsl-fo converter

Erik Bruchez
Administrator
Marcus,

At the moment, we don't do anything particular to support embedded  
fonts. It would be great if you had a chance to look at it!

-Erik

On Jan 20, 2009, at 4:22 PM, Marcus wrote:

> Hi Erik,
> thanks for the notice.
> Another question i got while searching the threads is, about  
> embedding external fonts.
> Someone asked if that is possible - anything new about that?
>
> But as i guess, i have to look through your code myself and find out  
> what else i can configurate and perhaps how to extend the processor.
> When i have more time for this maybe i fimd time to try out XEP and  
> keep you informed, if i found any solutions.
> Regards, Marcus
>
>
>
> Erik Bruchez schrieb:
>> Marcus,
>>
>>> i found that thread about xsl-fo.
>>> Any new documentation on this? On your homepage is still an old  
>>> notice about fop 0.20.5
>>
>> We include fop-0_93.jar now. Latest version seems to be 0.94 on the  
>> Apache site.
>>
>>> There is still no docs about xslfo in Orbeon - will there be one  
>>> in the near future?
>>
>> Doc is on the Apache web site ;-)
>>
>>  http://xmlgraphics.apache.org/fop/
>>
>> The Orbeon XSL-FO processor contains 3 lines of code: the input doc  
>> is passed to FOP, and that's it. Just have your page produce XSL-FO  
>> and the processor will kick in. I am not sure there is much more to  
>> document.
>>
>>> And i wonderd, if it would be possible to use XEP instead of FOP,  
>>> because i tried to experiment a bit with both and XEP results are  
>>> much better.
>>> Its easier to generate a better looking pdf, but actually i don't  
>>> know how i could perform that with orbeon.
>>> Is FOP the only choice or would it be possible to have both and  
>>> choose by config?
>>
>> Out of the box, I would say no since we haven't tried it. But  
>> obviously somebody could try to figure out how to integrate with XEP.
>>
>> -Erik
>>
>> --
>> 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
--
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: Re: Re: Re: Re: Re: How to use xsl-fo converter

Marcus-2
Hi,
just some news about this thread:

1. XEP won't fit to this project, while it is a comercial processor and
afaik couldn't be shipped with OpenSource.
Maybe I'm wrong, cause I'm not so fit in those right-things. If it would
be possible, I'll see, if i will have some time in the future to take a
look at that.

2. FOP Version: the actuall Version shipped with Orbeon is 0.93. The
latest stable release is 0.95.
I updated it myself and noticed some bug-fixes with rendering tables and
feel more comfortabl with that version. Maybe you guys wnat to change
also to 0.95

3. Embedding custom fonts - i hope to find a way to do that. Perhaps the
ones who tried that in earlier times reading this and my be willing to
help me?
Would be great.

So much to keep you informed about those points.
Regards, Marcus



Erik Bruchez schrieb:
> Marcus,
>
> At the moment, we don't do anything particular to support embedded
> fonts. It would be great if you had a chance to look at it!
>
> -Erik
>
> On Jan 20, 2009, at 4:22 PM, Marcus wrote:
>



--
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: Re: Re: Re: Re: Re: How to use xsl-fo converter

Marcus-2
In reply to this post by Erik Bruchez
Hi,
two other questions:
1. Where can i find the source code or how can i write my own version of
xslfo processor to experiment with embedding external fonts?
2. If i want to use the XSLFOSerializer inside my XPL how would that
processor calling look like? OK, I know that when my XPL-View is
producing a xslfo-File it will go to the Serializer by the standard
page-flow, but i explicit want to call it myself?

Thanks, regards,
Marcus



--
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: Re: Re: Re: Re: Re: Re: How to use xsl-fo converter

Alessandro Vernet
Administrator
Marcus,

For information on how to get the source for Orbeon Forms and compile  
it yourself, see:

http://www.orbeon.com/ops/doc/integration-development

You can look up which class implements a processor in processors.xml.

Alex

On Jan 21, 2009, at 8:27 AM, Marcus wrote:

> Hi,
> two other questions:
> 1. Where can i find the source code or how can i write my own  
> version of xslfo processor to experiment with embedding external  
> fonts?
> 2. If i want to use the XSLFOSerializer inside my XPL how would that  
> processor calling look like? OK, I know that when my XPL-View is  
> producing a xslfo-File it will go to the Serializer by the standard  
> page-flow, but i explicit want to call it myself?
>
> Thanks, regards,
> Marcus
>
>
> --
> 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 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet



--
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: Re: Re: Re: Re: Re: How to use xsl-fo converter

Marcus-2
In reply to this post by Erik Bruchez
Hi Erik,

I#m just looking into this right now but have one problem.
Hope you can help me?

OK, i updated to FOP to Version 0.95, added some newer libs and my
layout problems were solved, so 0.95 seems to be the better choice cause
of some new improvments and bugfixes.
Also it seems to make embedding custom fonts a bit easier, while one has
not to creat special metric files for every font - whatever those are!?

Refering to the FOP Page it should be possible to embed fonts and to
make other custom configuration with an external config-file.
So i have to change the xslfo-processor code and include the external
config-file.
My new code looks like this, but i don't know how to set to right path
and where to put my config-file relativly to my app.

XSLFO-Proc:
...
    protected void readInput(PipelineContext context, ProcessorInput
input, Config config, OutputStream outputStream) {
        try {
            FopFactory fopFactory = FopFactory.newInstance();

            // Read Config-File to Setup FOP
            DefaultConfigurationBuilder cfgBuilder = new
DefaultConfigurationBuilder();
            Configuration cfg = cfgBuilder.buildFromFile(new
File("fop_userconfig.xml"));
            fopFactory.setUserConfig(cfg);

            // Setup FOP to output PDF
            Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF,
outputStream);

            // Send data to FOP
            readInputAsSAX(context, INPUT_DATA, fop.getDefaultHandler());
        } catch (Exception e) {
            throw new OXFException(e);
        }
    }
}

Don't know if that will work, but as long as i can't read my
config-file, i'm not able to test more on this.
When i got everything to work, perhaps i can send you the files and you
may include it into your code, if other are interessted.
Thanks,
regards, Marcus







Erik Bruchez schrieb:

> Marcus,
>
> At the moment, we don't do anything particular to support embedded
> fonts. It would be great if you had a chance to look at it!
>
> -Erik
>
> On Jan 20, 2009, at 4:22 PM, Marcus wrote:
>
>> Hi Erik,
>> thanks for the notice.
>> Another question i got while searching the threads is, about
>> embedding external fonts.
>> Someone asked if that is possible - anything new about that?
>>
>> But as i guess, i have to look through your code myself and find out
>> what else i can configurate and perhaps how to extend the processor.
>> When i have more time for this maybe i fimd time to try out XEP and
>> keep you informed, if i found any solutions.
>> Regards, Marcus
>>
>>
>>
>> Erik Bruchez schrieb:
>>> Marcus,
>>>
>>>> i found that thread about xsl-fo.
>>>> Any new documentation on this? On your homepage is still an old
>>>> notice about fop 0.20.5
>>>
>>> We include fop-0_93.jar now. Latest version seems to be 0.94 on the
>>> Apache site.
>>>
>>>> There is still no docs about xslfo in Orbeon - will there be one in
>>>> the near future?
>>>
>>> Doc is on the Apache web site ;-)
>>>
>>>  http://xmlgraphics.apache.org/fop/
>>>
>>> The Orbeon XSL-FO processor contains 3 lines of code: the input doc
>>> is passed to FOP, and that's it. Just have your page produce XSL-FO
>>> and the processor will kick in. I am not sure there is much more to
>>> document.
>>>
>>>> And i wonderd, if it would be possible to use XEP instead of FOP,
>>>> because i tried to experiment a bit with both and XEP results are
>>>> much better.
>>>> Its easier to generate a better looking pdf, but actually i don't
>>>> know how i could perform that with orbeon.
>>>> Is FOP the only choice or would it be possible to have both and
>>>> choose by config?
>>>
>>> Out of the box, I would say no since we haven't tried it. But
>>> obviously somebody could try to figure out how to integrate with XEP.
>>>
>>> -Erik
>>>
>>> --
>>> 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
>
> --
> 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: Re: Re: Re: Re: Re: How to use xsl-fo converter

Marcus-2
In reply to this post by Erik Bruchez
Hi Erik, me again,

ok, i have made some new steps, but still an url problem :-)
So, here is my actuall XSLFOSerializer:
...
    protected void readInput(PipelineContext context, ProcessorInput
input, Config config, OutputStream outputStream) {
        try {
            FopFactory fopFactory = FopFactory.newInstance();

            // Read COnfig-File to Setup FOP
            ExternalContext externalContext = (ExternalContext)
context.getAttribute(PipelineContext.EXTERNAL_CONTEXT);
            String configurationFile =
externalContext.getRealPath("WEB-INF/resources/config/fop_userconfig.xml");
            DefaultConfigurationBuilder cfgBuilder = new
DefaultConfigurationBuilder();
            Configuration cfg = cfgBuilder.buildFromFile(new
File(configurationFile));
            fopFactory.setUserConfig(cfg);

            // Setup FOP to output PDF
            Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF,
outputStream);

            // Send data to FOP
            readInputAsSAX(context, INPUT_DATA, fop.getDefaultHandler());
        } catch (Exception e) {
            throw new OXFException(e);
        }
    }
...

That seems to work,
but the paths in my config-file look terrible.
I tried to use the oxf:/config/.... urls, but they don't work. Perhaps
any step i need to get my config-file through before i can use it with
such paths?

Here is my actuall config, were i include external fonts! As you can see
I ship them also together with my app,
and tried to use
<font metrics-url="oxf:/config/fonts/ttf_freesans.xml" kerning="yes"
embed-url="oxf:/config/fonts/FreeSans.ttf">
which would be the best way to keep my app independend! Can i make those
paths work inside my config file and urls to be rewritten?

<fop version="1.0" >
    <renderers>
        <renderer mime="application/pdf">
            <filterList>
                <!-- provides compression using zlib flate (default is
on) -->
                <value>flate</value>
            </filterList>
            <fonts>
                <font metrics-url="file:///c:/Program Files/Tomcat
5.5/webapps/kkbib/WEB-INF/resources/config/fonts/ttf_freesans.xml"
kerning="yes" embed-url="file:///c:/Program Files/Tomcat
5.5/webapps/kkbib/WEB-INF/resources/config/fonts/FreeSans.ttf">
                    <font-triplet name="FreeSans" style="normal"
weight="normal"/>
                    <font-triplet name="FreeSansMT" style="normal"
weight="normal"/>
                </font>
                <font metrics-url="file:///c:/Program Files/Tomcat
5.5/webapps/kkbib/WEB-INF/resources/config/fonts/ttf_freesansbold.xml"
kerning="yes" embed-url="file:///c:/Program Files/Tomcat
5.5/webapps/kkbib/WEB-INF/resources/config/fonts/FreeSansBold.ttf">
                    <font-triplet name="FreeSans" style="normal"
weight="bold"/>
                    <font-triplet name="FreeSansMT" style="normal"
weight="bold"/>
                </font>
            </fonts>
        </renderer>
    </renderers>      
</fop>


Kind regards,
Marcus






Erik Bruchez schrieb:

> Marcus,
>
> At the moment, we don't do anything particular to support embedded
> fonts. It would be great if you had a chance to look at it!
>
> -Erik
>
> On Jan 20, 2009, at 4:22 PM, Marcus wrote:
>
>> Hi Erik,
>> thanks for the notice.
>> Another question i got while searching the threads is, about
>> embedding external fonts.
>> Someone asked if that is possible - anything new about that?
>>
>> But as i guess, i have to look through your code myself and find out
>> what else i can configurate and perhaps how to extend the processor.
>> When i have more time for this maybe i fimd time to try out XEP and
>> keep you informed, if i found any solutions.
>> Regards, Marcus
>>
>>
>>
>> Erik Bruchez schrieb:
>>> Marcus,
>>>
>>>> i found that thread about xsl-fo.
>>>> Any new documentation on this? On your homepage is still an old
>>>> notice about fop 0.20.5
>>>
>>> We include fop-0_93.jar now. Latest version seems to be 0.94 on the
>>> Apache site.
>>>
>>>> There is still no docs about xslfo in Orbeon - will there be one in
>>>> the near future?
>>>
>>> Doc is on the Apache web site ;-)
>>>
>>>  http://xmlgraphics.apache.org/fop/
>>>
>>> The Orbeon XSL-FO processor contains 3 lines of code: the input doc
>>> is passed to FOP, and that's it. Just have your page produce XSL-FO
>>> and the processor will kick in. I am not sure there is much more to
>>> document.
>>>
>>>> And i wonderd, if it would be possible to use XEP instead of FOP,
>>>> because i tried to experiment a bit with both and XEP results are
>>>> much better.
>>>> Its easier to generate a better looking pdf, but actually i don't
>>>> know how i could perform that with orbeon.
>>>> Is FOP the only choice or would it be possible to have both and
>>>> choose by config?
>>>
>>> Out of the box, I would say no since we haven't tried it. But
>>> obviously somebody could try to figure out how to integrate with XEP.
>>>
>>> -Erik
>>>
>>> --
>>> 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
>
> --
> 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