You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Dietrich Streifert <di...@visionet.de> on 2012/06/05 16:23:27 UTC

help using fop-pdf-images plug-in in an embedded fop

Hello everybody!

I'm currently trying to enhance an XML-RPC-java server with an embedded fop,
similar implemented like here:

http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleFO2PDF.java?view=markup

(Referenced from here: http://xmlgraphics.apache.org/fop/1.0/embedding.html)

I've tried adding fop-pdf-images-2.0.0.jar to the classpath of the
XML-RPC-java-server but this does not work.

I suspect that the fop plugin auto discover mechanism using the files in
META-INF/services/org.apache.fop.render.ImageHandler only works if fop is
run via commandline (eg. FOP.main) but not if fop is embedded within another
process.

Has anybody managed to get the fop-pdf-images plugin (
http://www.jeremias-maerki.ch/download/fop/pdf-images/ ) working within an
embedded environment?

Thank you for your help.

Regards
Dietrich




-- 
View this message in context: http://old.nabble.com/help-using-fop-pdf-images-plug-in-in-an-embedded-fop-tp33964386p33964386.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: SOLVED! help using fop-pdf-images plug-in in an embedded fop

Posted by Dietrich Streifert <di...@visionet.de>.
Thank you Alexios! Indeed very helpfull informations!

Meanwhile I SOLVED MY PROBLEM!

It was indeed the clobbering of the META-INF files due to the unjar/rejar
build method described above.

I rewrote the build.xml to create a classpath entry in the Manifest file
which includes all needed jars.

And then it simply started working!

This is surely worth creating a bug entry in the ILIAS bug tracker.

Regards
Dietrich



Alexios Giotis wrote:
> 
> Hi Dietrich,
> 
> 
> On Jun 6, 2012, at 9:51 AM, Dietrich Streifert wrote:
> 
>> 
>> Hi Alexios,
>> 
>> Thank you for your reply!
>> 
>> Do you remember a few keywords of the thread subject you mentioned? This
>> would be helpfull.
> 
> The thread starts here:
> http://markmail.org/message/snngnv57v7vejyqu
> 
> It focuses on font issues, it will not help making the plugin discoverable
> but in
> the 9 messages there was some general information that I found useful when
> generating big output PDF files.
> 
> 

-- 
View this message in context: http://old.nabble.com/help-using-fop-pdf-images-plug-in-in-an-embedded-fop-tp33964386p33968507.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: help using fop-pdf-images plug-in in an embedded fop

Posted by Alexios Giotis <al...@gmail.com>.
Hi Dietrich,


On Jun 6, 2012, at 9:51 AM, Dietrich Streifert wrote:

> 
> Hi Alexios,
> 
> Thank you for your reply!
> 
> Do you remember a few keywords of the thread subject you mentioned? This
> would be helpfull.

The thread starts here:
http://markmail.org/message/snngnv57v7vejyqu

It focuses on font issues, it will not help making the plugin discoverable but in
the 9 messages there was some general information that I found useful when
generating big output PDF files.



> 
> Some more informations where I try to integrate the fop-pdf-images plug-in:
> 
> It is a XML-RPC-server which, among other functions (lucene index and search
> etc.), does the transformation of an xml-fo file to pdf. 
> 
> In order to have all needed libraries (jars) within the resulting server
> jar, the build.xml file unrars all needed jars (including fop, xmlgraphics,
> batik, avalon,...) into a temporary directory and packs them afterwards into
> a single jar. 
> 
> As some jars include additional files within the META-INF directory (eg. the
> services directory), all those files get mixed up in the resulting META-INF
> directory and are (potentially) overwritten by subsequent files with the
> same name during the unrar process.
> 
> As you said that simply adding the fop-pdf-images.jar to the classpath of
> your JBoss application with the embedded fop worked, I now suspect that the
> above build method (unraring all and pack again) breaks the plug-in
> mechanism.
> 
> To blame (or not?) the used software: it is the java ilServer from the ILIAS
> e-Lerning platform (http://www.ilias.de).
> 
> If anyone has a comment: you're very welcome!
> 
> Regards
> Dietrich
> 
> 
> Hi Dietrich,
> 
> The FOP pdf images plugin works well for me when using FOP as an embedded
> library that runs inside an application server (JBoss). It only required to
> put the fop-pdf-images.jar in the classpath, no code changes. With big
> volumes (thousands of pages per output PDF), we have noticed that it takes
> time to open in Adobe Reader and to rip it on production printing servers.
> In the past few months, there was an interesting thread with technical
> information related to why this is happening. If you don't have big volumes,
> it is working really well.
> 
> Alexios Giotis
> 
> 
> 
> -- 
> View this message in context: http://old.nabble.com/help-using-fop-pdf-images-plug-in-in-an-embedded-fop-tp33964386p33968246.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: help using fop-pdf-images plug-in in an embedded fop

Posted by Dietrich Streifert <di...@visionet.de>.
Hi Alexios,

Thank you for your reply!

Do you remember a few keywords of the thread subject you mentioned? This
would be helpfull.

Some more informations where I try to integrate the fop-pdf-images plug-in:

It is a XML-RPC-server which, among other functions (lucene index and search
etc.), does the transformation of an xml-fo file to pdf. 

In order to have all needed libraries (jars) within the resulting server
jar, the build.xml file unrars all needed jars (including fop, xmlgraphics,
batik, avalon,...) into a temporary directory and packs them afterwards into
a single jar. 

As some jars include additional files within the META-INF directory (eg. the
services directory), all those files get mixed up in the resulting META-INF
directory and are (potentially) overwritten by subsequent files with the
same name during the unrar process.

As you said that simply adding the fop-pdf-images.jar to the classpath of
your JBoss application with the embedded fop worked, I now suspect that the
above build method (unraring all and pack again) breaks the plug-in
mechanism.

To blame (or not?) the used software: it is the java ilServer from the ILIAS
e-Lerning platform (http://www.ilias.de).

If anyone has a comment: you're very welcome!

Regards
Dietrich


Hi Dietrich,

The FOP pdf images plugin works well for me when using FOP as an embedded
library that runs inside an application server (JBoss). It only required to
put the fop-pdf-images.jar in the classpath, no code changes. With big
volumes (thousands of pages per output PDF), we have noticed that it takes
time to open in Adobe Reader and to rip it on production printing servers.
In the past few months, there was an interesting thread with technical
information related to why this is happening. If you don't have big volumes,
it is working really well.

Alexios Giotis



-- 
View this message in context: http://old.nabble.com/help-using-fop-pdf-images-plug-in-in-an-embedded-fop-tp33964386p33968246.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: help using fop-pdf-images plug-in in an embedded fop

Posted by Alexios Giotis <al...@gmail.com>.
Hi Dietrich,

The FOP pdf images plugin works well for me when using FOP as an embedded library that runs inside an application server (JBoss). It only required to put the fop-pdf-images.jar in the classpath, no code changes. With big volumes (thousands of pages per output PDF), we have noticed that it takes time to open in Adobe Reader and to rip it on production printing servers. In the past few months, there was an interesting thread with technical information related to why this is happening. If you don't have big volumes, it is working really well.

Alexios Giotis


On Jun 5, 2012, at 5:23 PM, Dietrich Streifert wrote:

> 
> Hello everybody!
> 
> I'm currently trying to enhance an XML-RPC-java server with an embedded fop,
> similar implemented like here:
> 
> http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleFO2PDF.java?view=markup
> 
> (Referenced from here: http://xmlgraphics.apache.org/fop/1.0/embedding.html)
> 
> I've tried adding fop-pdf-images-2.0.0.jar to the classpath of the
> XML-RPC-java-server but this does not work.
> 
> I suspect that the fop plugin auto discover mechanism using the files in
> META-INF/services/org.apache.fop.render.ImageHandler only works if fop is
> run via commandline (eg. FOP.main) but not if fop is embedded within another
> process.
> 
> Has anybody managed to get the fop-pdf-images plugin (
> http://www.jeremias-maerki.ch/download/fop/pdf-images/ ) working within an
> embedded environment?
> 
> Thank you for your help.
> 
> Regards
> Dietrich
> 
> 
> 
> 
> -- 
> View this message in context: http://old.nabble.com/help-using-fop-pdf-images-plug-in-in-an-embedded-fop-tp33964386p33964386.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org