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 Peter <pe...@gmx.de> on 2015/06/16 08:56:26 UTC

How to use FOP with MAVEN?

Hello,

I want to use FOP with Maven, but cannot find any examples searching the
internet.

Exactly, I want to use sth. like this:

src
 |
 +-- main
      |
      +-- xml (for my contents, *.xml)
      |
      +-- resources (containing my xsl:fo-stylesheet, e.g. my.xsl)

How can I activate FOP to use these files for generation of one or more PDF
files?

Extensions:
- How to tell FOP, which files to collect into one distinct PDF document?

Kind regards
Peter


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


Re: How to use FOP with MAVEN?

Posted by Sergiu Dumitriu <se...@gmail.com>.
https://code.google.com/p/fop-maven-plugin/ does that, but it seems to
be closer to an abandoned proof of concept than a mature plugin. You'd
need to build and deploy it yourself, and it seems to require xml+xsl as
input, it doesn't yet allow processing .fo files.

On 06/16/2015 02:56 AM, Peter wrote:
> Hello,
> 
> I want to use FOP with Maven, but cannot find any examples searching the
> internet.
> 
> Exactly, I want to use sth. like this:
> 
> src
>  |
>  +-- main
>       |
>       +-- xml (for my contents, *.xml)
>       |
>       +-- resources (containing my xsl:fo-stylesheet, e.g. my.xsl)
> 
> How can I activate FOP to use these files for generation of one or more PDF
> files?
> 
> Extensions:
> - How to tell FOP, which files to collect into one distinct PDF document?
> 
> Kind regards
> Peter
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 


-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/

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


Re: How to use FOP with MAVEN?

Posted by Michael Wechner <mi...@wyona.com>.
ok :-)

Am 16.06.15 um 11:41 schrieb Peter:
> Hello Michael,
>
> sorry, I don't want to use a Java application at all for transformation, but
> rather a build plugin to just do sth. like this command line:
>
> fop -xml name.xml -xsl name2fo.xsl -pdf name.pdf
> (copied from http://xmlgraphics.apache.org/fop/quickstartguide.html)
>
> It'd probably look like:
>
> <plugin>
>    <artifactId>fop</artifactId>
>    <groupId>???</groupId>
>    <xml>xml/name.xml</xml>
>    <xsl>resources/name2fo.xsl</xsl>
>    <outputType>pdf</outputType>
>    <outputFile>name.pdf</outputFile>
> </plugin>
>
> This is just an idea - not the real code, because I'm asking for that! ;-)
>
> Kind regards
> Peter
>
>
>
> ---------------------------------------------------------------------
> 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: How to use FOP with MAVEN?

Posted by Peter <pe...@gmx.de>.
Hello Michael,

sorry, I don't want to use a Java application at all for transformation, but
rather a build plugin to just do sth. like this command line:

fop -xml name.xml -xsl name2fo.xsl -pdf name.pdf
(copied from http://xmlgraphics.apache.org/fop/quickstartguide.html)

It'd probably look like:

<plugin>
   <artifactId>fop</artifactId>
   <groupId>???</groupId>
   <xml>xml/name.xml</xml>
   <xsl>resources/name2fo.xsl</xsl>
   <outputType>pdf</outputType>
   <outputFile>name.pdf</outputFile>
</plugin>

This is just an idea - not the real code, because I'm asking for that! ;-)

Kind regards
Peter



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


Re: How to use FOP with MAVEN?

Posted by Michael Wechner <mi...@wyona.com>.
Am 16.06.15 um 08:56 schrieb Peter:
> Hello,
>
> I want to use FOP with Maven, but cannot find any examples searching the
> internet.

you mean for example

<dependency groupId="fop" artifactId="fop" version="0.93"
classifier="jdk15"/>

?
>
> Exactly, I want to use sth. like this:
>
> src
>  |
>  +-- main
>       |
>       +-- xml (for my contents, *.xml)
>       |
>       +-- resources (containing my xsl:fo-stylesheet, e.g. my.xsl)
>
> How can I activate FOP to use these files for generation of one or more PDF
> files?

see for example

https://github.com/wyona/yanel/blob/master/src/resources/pdf/src/java/org/wyona/yanel/impl/resources/PDFResource.java

> Extensions:
> - How to tell FOP, which files to collect into one distinct PDF document?

you mean to aggregate XML files and then apply an XSLT and FOP?

HTH

Michael


>
> Kind regards
> Peter
>
>
> ---------------------------------------------------------------------
> 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: How to use FOP with MAVEN?

Posted by Peter <pe...@gmx.de>.
Hi,

tried it using "maven-antrun-plugin".

[cannot post the xml because a problem with gmane web interface :-( ]

The "outfile" parameter is ignored - is this a restriction of "fop" or the
plugin?


Regards
Peter


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