PDF转JPG的工具

介绍个在线PDF处理工具
http://smallpdf.com/cn/pdf-to-jpg

瑞士开发的。
PDF转JPG的质量非常高。imagemagick之类的根本没法比。
介绍:http://www.aspirantzhang.com/network/smallpdf.html

它用的转换工具
转JPG的librarys
http://www.pdf-tools.com/
说明书
http://www.pdf-tools.com/public/downloads/whitepapers/Whitepaper-Signature_Service-EN.pdf

转成word的librarys
http://www.soliddocuments.com/products.htm?product=SolidFramework
这是.net开发的。

pdf-tools支持commond line (shell,不支持window)执行
以下是常用命令
licmgr list 显示所有已安装的license
Install new license key
licmgr store X-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
Delete old license key
licmgr delete X-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

添加参数-s 可以限定使用范围
• g: For all users
• u: Current user

pdf2img 命令使用
pdf2img input.pdf input.pdf是pdf路径,若不指定输出的图片类型和名称,则默认是输入的pdf文件名,文件格式是tif。例如input.tif

pdf2img –lk X-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX input.pdf output.tif
指定license key输出

pdf2img input.pdf output.jpg 输出格式是jpg
pdf2img input.pdf myfolder\output.jpg 指定输出目录
pdf2img "My File.pdf" "My Documents\output.jpg" 如果目录包含空格则必须加上引号

pdf2img -1 input.pdf output%04d.png 如果pdf包含多个页面,则每个页面输出一个png。output0001.png, output0002.png, output0003.png, etc.

pdf2img A*.pdf 转换多个命名规范的PDF
pdf2img *01.pdf

for %i in (*.pdf) do pdf2img -v %i %~ni.tif 也可以用循环语句

-sp 600 480 -f 指定像素输出。如果PDF默认的图片比例跟指定的输出像素比例不匹配,则会加上空白边
如果想匹配PDF默认的图片比例,则只需要输入一个,另一个用0代替
pdf2img -d 300 -1 -sp 1536 0  -f  1739.pdf out%04d.jpg

-s 600 480 -f 按指定point(点)计算方式来生成图片(If the dimensions are set in points, the dimensions in pixel are calculated depending on the resolution.)这种方式依赖于dpi。dpi越高图片越大

-d 75 更改DPI

压缩算法类型
CCITT Group 3, Group 3-2D
CCITT Group 3 is the predecessor to CCITT Group 4, it is a simpler algorithm that normally results in a lower compression ratio.
CCITT Group 4
CCITT Group 4 is the standard compression for bi-level TIFF images (i.e. facsimile).
LZW
LZW (Lempel-Ziv-Welch) compression is a lossless compression algorithm for images. Please consult the copyright laws of your country prior to using this compression algorithm.
JPEG
TIFF allows images to be compressed with JPEG, which is a lossy compression algorithm. JPEG provides a high compression ratio for 8 and 24 bit images. It is best suited for TIFFs containing photographs and little or no text.
ZIP (Flate)
ZIP is a lossless compression algorithm. It is useful for the compression of large images with no loss in quality.
Flate compression (also used by the ZIP format) and JPEG compression can be used for color or grey scale images. CCITT Group 3, 3-2D and 4 as well as Flate can be used for black and white images. Example: Apply Flate compression to a TIFF image. -z

-z:无损压缩
-g4:黑白压缩。(例如扫描传真)CCITT Group 4 is the standard compression for bi-level images (i.e. facsimile).
-j:使用jpg压缩算法
-j6:旧的jpg压缩算法
-l: LZW (Lempel-Ziv-Welch)
-g3:Compression CCITT Group 3.默认算法。失真较少

-b 设置point的像素值。ie:8,1,2,24(真彩色)
pdf2img -b 8 input.pdf output.jpg 生成灰色的像素图片

-f fit。使生成的图片匹配指定的尺寸
pdf2img -s 800 600 -f input.pdf output.tiff


-q 85 圖片質量參數
Increase the DPI value to increase the resolution. This is done with the switch -d. For lossy compression algorithms, such as JPEG, increase the quality parameter, e.g. -q 85.

猜你喜欢

转载自lhdst-163-com.iteye.com/blog/2190967