DocumentFormat format = new DocumentFormat("PDF/A", "pdf",
"application/pdf");
Map<String, Object> properties = new HashMap<String, Object>();
properties.put("FilterName", "writer_pdf_Export");
Map<String, Object> filterData = new HashMap<String, Object>();
filterData.put("SelectPdfVersion", 1);
properties.put("FilterData", filterData);
format.setStoreProperties(DocumentFamily.TEXT, properties);
As for setting java.library.path please provide more details on how
you're using ant.
Kind regards
Mirko
On Mar 4, 3:12 pm, Shervin Asgari <shervin.asg...@gmail.com> wrote:
> Hi.
>
> I have been trying to upgrade from 2.2 to 3.0 and have 1,5 problems :-)
> I will come back to the half later.
>
> The first problem is that I haven't found a way to create PDF/A.
> I am trying to convert the code:
>
> *final String PDF_APP= "application/pdf";
> final String PORTABEL_FORMAT = "Portable Document Format";
>
> DocumentFormat customPdfFormat = new DocumentFormat(PORTABEL_FORMAT,
> PDF_APP, "pdf");
> customPdfFormat.setExportFilter(DocumentFamily.TEXT, "writer_pdf_Export");
> Map<String, Integer> pdfOptions = new HashMap<String, Integer>();
> pdfOptions.put("SelectPdfVersion", this.PDFX1A2001); //1
> customPdfFormat.setExportOption(DocumentFamily.TEXT, "FilterData",
> pdfOptions);*
>
> To support the new API, but I am lost as to where to put this FilterData.
> Any hints?
>
> The half problem I have is a bit more complicated. I want to use the new
> features in 3.0 with pipes, however I cannot make it work.
> I am guessing its because I have difficulty setting java.library.path
> because I am using ant and I don't know how to set -Djava.library.path using
> ant.
> **Any ideas?
When it comes to my ant build file. Its a pretty standard build file
generated from seam-gen.
I could post it, but not sure what you are looking for.
We are using ant to compile and pack an EAR and deploy it to our App
Server.
Something like:
<target name="compile" depends="init" description="Compile the Java
source code" unless="eclipse.running">
<javac classpathref="build.classpath" destdir="${jar.dir}" debug="$
{javac.debug}" deprecation="${javac.deprecation}" nowarn="on">
<src path="${src.model.dir}" />
<src path="${src.action.dir}" />
</javac>
</target>
But I guess the most relevant is our jar target
<target name="jar" depends="compile,copyclasses" description="Build
the distribution .jar file">
<copy todir="${jar.dir}">
<fileset dir="${basedir}/resources">
<include name="seam.properties" />
<include name="*.drl" />
</fileset>
</copy>
<copy todir="${jar.dir}/META-INF">
<fileset dir="${basedir}/resources/META-INF">
<include name="ejb-jar.xml" />
<include name="orm.xml" />
</fileset>
</copy>
</target>
Then we have an explode that packs everything in ear and deploys it.
Shervin
Kind regards
Mirko
How do you do it?
Best regards
Shervin
http://stackoverflow.com/search?q=set+java.library.path
Kind regards
Mirko