[ 
https://issues.apache.org/jira/browse/PDFBOX-4427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16740245#comment-16740245
 ] 

aidan commented on PDFBOX-4427:
-------------------------------

thank you Tilman! This worked as you suggested: 

 

{{ <java classname="org.apache.pdfbox.tools.PDFToImage" fork="true" 
failonerror="true"> <classpath> <pathelement 
location="lib/pdfbox-app-2.0.13.jar"/> </classpath> <arg 
value="${output.dir}/@\{src-filename}"/> <arg value="-page 1"/> <arg 
value="-dpi"/> <arg value="${dita-semia.image-convert.dpi}"/> <arg 
value="-imageType"/> <arg value="${dita-semia.image-convert.dest-format}"/> 
</java>}}

> Can't pass parameters to pdfbox-app-2.0.13.jar using DITA OT 2.5.4 and Ant 
> version 1.10.1
> -----------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-4427
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4427
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 2.0.13
>         Environment: Windows
>            Reporter: aidan
>            Priority: Minor
>
> I am trying to incorporate pdfbox PDFToImage into a DITA OT plugin that 
> converts pdf format images into png. it seems that pdfbox-app-2.0.13.jar 
> doesn't accept parameters from ant when i pass them in the build file.
> running the following at the command line works fine: 
> {{java -jar 
> C:\dita-ot-2.5.4-ixiasoft\plugins\org.dita-semia.image-convert\lib\pdfbox-app-2.0.13.jar
>  PDFToImage 
> C:\dita-ot-2.5.4-ixiasoft\plugins\org.dita-semia.image-convert\test\figure-4.pdf
>  -page 1 -dpi 96 -imageType png}}
> Running this in the ant build and the params are ignored, and a jpg is 
> output: 
> {{ <java classname="org.apache.pdfbox.tools.PDFToImage" fork="true" 
> failonerror="true">}}
> {{ <classpath>}}
> {{ <pathelement location="lib/pdfbox-app-2.0.13.jar"/>}}
> {{ </classpath>}}
> {{ <arg value="${output.dir}/@\{src-filename}"/>}}
> {{ <arg value="-outputPrefix @\{dst-filename}"/>}}
> {{ <arg value="-imageType ${dita-semia.image-convert.dest-format}"/>}}
> {{ <arg value="-dpi ${dita-semia.image-convert.dpi}"/>}}
> {{ <arg value="-page 1"/>}}
> {{ </java>}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to