简体   繁体   中英

Using Adobe Acrobat 9 in command line to covert from pdf to png using export function

I am trying to use the command line to convert a pdf to png using the export function of adobe acrobat 9. Anyone know how to do this?

A program I am writing in Java will need to run this command.

Thanks for the help.

Other than this paltry detail, there's no documentation on Acrobat's command line... if there's anything more to document.

I suggest you go with Ghostscript instead. They actually document their command line and are Free.

The commandline would be something like:

gs -o -q -sOutputFile=MyOutPath.png -sDevice=png16m -r300 inputPdf.pdf

  • -o puts it in batch mode (mostly)
  • -q quite mode (no std out)
  • -sOutputFile self explanatory
  • -sDevice=png16m 24-bit rgb. alternatives include pngalpha, png8, pngmono, png256.
  • -r300 300 dpi.

I also use:

  • -dTextAlphaBits=4 antialiasing info for improved text quality
  • -dGraphicsAlphaBits=4 ditto, only for line art.

These two vastly improved the quality of my output (I use jpeg, not png) at the DPI I use. If no one's going to zoom in on them, 72 or 96 is fine... but folks will zoom in on my images, so I ramped up the dots per inch a bit.

在java中,你必须使用命令行功能打开adobe acrobat,然后在awt包中使用Java的Robot功能来模拟击键转到导出功能并转换为PNG。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM