Hi Walter, Have you tried running FOP from the command line? This is the preferred way to run FOP as a stand alone application. If you can invest a little time to set this up you will be rewarded with the ability to fully configure FOP.
If you think you are truly bound to the ant task, then a modest modification to org.apache.fop.tools.anttasks.Fop to parse the properties for the encryption parameters, as suggested by Jeremias. This is handled from the command line arguments by org.apache.fop.cli.CommandLineOptions, which you may want to use for inspiration. Good luck, Peter On Wed, Mar 9, 2011 at 6:09 AM, Walter Kruse <ou_ryp...@hotmail.com> 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 > --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org