The command-line and Ant task are completely different front-ends to FOP.
The Ant task did not get as much love as the command-line so may not
expose all features offered from the command-line. If you know a bit
about Java it should be fairly easy for you to extend the Ant task to
expose the features you're missing. We'll gladly consider any patch you
post to FOP's Bugzilla.

On 09.03.2011 07:09:37 Walter Kruse wrote:
> 
> I build PDF from DocBook with Ant in Eclipse. All works well.
> 
> I
> want to pass the FOP command line args for -noprint, -nocopy, -noedit
> and -noannotations. I read about this in the FOP docs under
> security/encryption 
> (http://xmlgraphics.apache.org/fop/0.95/pdfencryption.html). However, I 
> cannot seem to find how to do this in my
> Ant build.xml 
> 
> The built-in ant task (http://xmlgraphics.apache.org/fop/0.95/anttask.html) 
> makes provision for indir, outdir
> etc. parameters. How do I include the FOP command-line options though ?
> 
> 
> My target is as follows:
> 
> <target name="build-pdf" depends="depends" 
>         description="Generates PDF files from DocBook XML">
>         <echo message="Running 'build-pdf' at ${timestamp}" />
> 
>         <echo message="******************************************" />
>         <xslt style="${fo.stylesheet}" extension=".fo" 
>             basedir="${source.dir}" destdir="${fo.dir}">
> 
>             <classpath refid="xalan.classpath" />
>             <include name="RubyRecipesForTesters.xml" />
> 
>         </xslt>
>         <taskdef name="fop" classname="org.apache.fop.tools.anttasks.Fop">
> 
>             <classpath>
>                 <fileset dir="${fop.home}/lib">
>                     <include name="*.jar" />
>                 </fileset>
>                 <fileset dir="${fop.home}/build">
> 
>                     <include name="fop.jar" />
>                     <include name="fop-hyph.jar" />
>                 </fileset>
>             </classpath>
>         </taskdef>
> 
>         
> 
>         <fop format="application/pdf" 
> fofile="${fo.dir}/RubyRecipesForTesters.fo"
>             outfile="${target.dir}/RubyRecipesForTesters.pdf"/>
>         <copy file="${target.dir}/RubyRecipesForTesters.pdf" 
> tofile="${publish.dir}/${pub.dir}/RubyRecipesforTesters.pdf"/>
> 
>     </target>
> 
> Thanks in advance
> Walter Kruse
>                                         




Jeremias Maerki


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

Reply via email to