Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-4427

Can't pass parameters to pdfbox-app-2.0.13.jar using DITA OT 2.5.4 and Ant version 1.10.1

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Not A Bug
    • Affects Version/s: 2.0.13
    • Fix Version/s: None
    • Component/s: Utilities
    • Labels:
      None
    • Environment:
      Windows

      Description

      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>}}

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              aidan.reilly aidan
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: