简介

Xpdf和XpdfReader是处理PDF的工具和查看器,可以导出图片PNG、文本、HTML、PostScrit等。 下载地址:
文档说明:http://www.xpdfreader.com/download.html

XpdfReader

XpdfReader可以另存为图片。

PDF转图片、PDF转文本、PDF转HTML、PDF转PostScript_chrome

PDF转PNG

pdftopng version 4.03 [www.xpdfreader.com]
Copyright 1996-2021 Glyph & Cog, LLC
Usage: pdftopng [options] <PDF-file> <PNG-root>
-f <int> : first page to print
-l <int> : last page to print
-r <number> : resolution, in DPI (default is 150)
-mono : generate a monochrome PNG file
-gray : generate a grayscale PNG file
-alpha : include an alpha channel in the PNG file
-rot <int> : set page rotation: 0, 90, 180, or 270
-freetype <string>: enable FreeType font rasterizer: yes, no
-aa <string> : enable font anti-aliasing: yes, no
-aaVector <string>: enable vector anti-aliasing: yes, no
-opw <string> : owner password (for encrypted files)
-upw <string> : user password (for encrypted files)
-q : don't print any messages or errors
-cfg <string> : configuration file to use in place of .xpdfrc
-v : print copyright and version info
-h : print usage information
-help : print usage information
--help : print usage information
-? :
pdftopng 1.pdf 1.png

pdf转html

pdftohtml version 4.03 [www.xpdfreader.com]
Copyright 1996-2021 Glyph & Cog, LLC
Usage: pdftohtml [options] <PDF-file> <html-dir>
-f <int> : first page to convert
-l <int> : last page to convert
-z <number> : initial zoom level (1.0 means 72dpi)
-r <int> : resolution, in DPI (default is 150)
-nofonts : do not extract embedded fonts
-skipinvisible : do not draw invisible text
-allinvisible : treat all text as invisible
-opw <string> : owner password (for encrypted files)
-upw <string> : user password (for encrypted files)
-q : don't print any messages or errors
-cfg <string> : configuration file to use in place of .xpdfrc
-v : print copyright and version info
-h : print usage information
-help : print usage information
--help : print usage information
-? :
pdftohtml 1.pdf 1.html

pdf转文本

pdftotext version 4.03 [www.xpdfreader.com]
Copyright 1996-2021 Glyph & Cog, LLC
Usage: pdftotext [options] <PDF-file> [<text-file>]
-f <int> : first page to convert
-l <int> : last page to convert
-layout : maintain original physical layout
-simple : simple one-column page layout
-simple2 : simple one-column page layout, version 2
-table : similar to -layout, but optimized for tables
-lineprinter : use strict fixed-pitch/height layout
-raw : keep strings in content stream order
-fixed <number> : assume fixed-pitch (or tabular) text
-linespacing <number> : fixed line spacing for LinePrinter mode
-clip : separate clipped text
-nodiag : discard diagonal text
-enc <string> : output text encoding name
-eol <string> : output end-of-line convention (unix, dos, or mac)
-nopgbrk : don't insert page breaks between pages
-bom : insert a Unicode BOM at the start of the text file
-marginl <number> : left page margin
-marginr <number> : right page margin
-margint <number> : top page margin
-marginb <number> : bottom page margin
-opw <string> : owner password (for encrypted files)
-upw <string> : user password (for encrypted files)
-q : don't print any messages or errors
-cfg <string> : configuration file to use in place of .xpdfrc
-listencodings : list all available output text encodings
-v : print copyright and version info
-h : print usage information
-help : print usage information
--help : print usage information
-? :
pdftotext 1.pdf 1.txt

pdf转PostScript

pdftops version 4.03 [www.xpdfreader.com]
Copyright 1996-2021 Glyph & Cog, LLC
Usage: pdftops [options] <PDF-file> [<PS-file>]
-f <int> : first page to print
-l <int> : last page to print
-level1 : generate Level 1 PostScript
-level1sep : generate Level 1 separable PostScript
-level2 : generate Level 2 PostScript
-level2gray : generate Level 2 grayscale PostScript
-level2sep : generate Level 2 separable PostScript
-level3 : generate Level 3 PostScript
-level3gray : generate Level 3 grayscale PostScript
-level3sep : generate Level 3 separable PostScript
-eps : generate Encapsulated PostScript (EPS)
-form : generate a PostScript form
-opi : generate OPI comments
-noembt1 : don't embed Type 1 fonts
-noembtt : don't embed TrueType fonts
-noembcidps : don't embed CID PostScript fonts
-noembcidtt : don't embed CID TrueType fonts
-preload : preload images and forms
-paper <string> : paper size (letter, legal, A4, A3, match)
-paperw <int> : paper width, in points
-paperh <int> : paper height, in points
-nocrop : don't crop pages to CropBox
-expand : expand pages smaller than the paper size
-noshrink : don't shrink pages larger than the paper size
-nocenter : don't center pages smaller than the paper size
-pagecrop : treat the CropBox as the page size
-userunit : honor the UserUnit
-duplex : enable duplex printing
-opw <string> : owner password (for encrypted files)
-upw <string> : user password (for encrypted files)
-q : don't print any messages or errors
-cfg <string> : configuration file to use in place of .xpdfrc
-v : print copyright and version info
-h : print usage information
-help : print usage information
--help : print usage information
-? :
pdftops 1.pdf 1.ps