xpdf 中文man页面

系统
Xpdf是一个 Portable Document Format(PDF) 文件阅读软件.(PDF文件也经常被称为Acrobat 文件,这种叫法来源于Adobe公司的PDF软件的名字.) Xpdf运行在UNIX,VMS和OS/2的X Window系统下.

名字

xpdf -Portable Document Format(PDF)文件阅读器(版本0.90)  

总览

xpdf [选项] [PDF文件 [page]]  

描述

Xpdf是一个 Portable Document Format(PDF) 文件阅读软件.(PDF文件也经常被称为Acrobat 文件,这种叫法来源于Adobe公司的PDF软件的名字.) Xpdf运行在UNIX,VMS和OS/2的X Window系统下.

运行xpdf,只要键入:

xpdf file.pdf

file.pdf 是你的PDF文件.文件名字后面可以跟随一个数字,用于指定最先显示的页面的页码,比如:

xpdf file.pdf 18

你当然也可以启动xpdf而不打开任何文件.

xpdf

选项

方括弧中列出了X资源和相应的选项

-err
将错误信息指定送到/dev/tty而不是标准错误中(此选项当xpdf被其它程序,比如netscape,打开时,十分有用,否则,每个错误都会弹出一个令人讨厌的小窗口).
-z zoom
设定初始的放大因子.放大因子是(-5..5)之间的一个数字,其中0表示72dpi.你也可以通过`page`设定显示页面大小配合窗口大小,或者通过`width`设定显示页面宽度配合窗口宽度. [xpdf.initialZoom]
-g geometry
设定窗口的初始几何参数. (相当于-geometry.) [xpdf.geometry]
-remote name]
启动/连接名为name的xpdf远程服务器(参见后面的"远程服务器模式"部分)
-raise
建立xpdf远程服务器窗口.(仅适用于-remote时)
-quit
退出xpdf远程服务器.(仅适用于-remote时)
-cmap
安装一个自定义的色彩地图.此选项在TrueColor模式下无效. [xpdf.installCmap]
-rgb number
设置xpdf将要分配的最大RGB值.缺省值是5(即RGB值5x5x5); 设置一个小数值,可以节省色彩表记录.在自定义色彩地图和TrueColor模式下,此选项无效.
-papercolor color
设置"页面色彩",比如,页面的显示背景.当pdf文件出现类似在字符后填充白色等情况的时候,此选项无法正常工作. [xpdf.paperColor]
-eucjp
复制字符时,将日文字符转换成EUC-JP编码.这是至今为止唯一的日文字符转换选项---它的唯一作用就是将非日文字符转换成7-bit的ASCII,以便于配合EUC-JP编码.(此选项只有在编译pdftotext时加上日文支持才有效) [xpdf.eucjp]
-t1lib font-type
设定使用t1lib类型的字体提供器.选项为`none`(完全不使用t1lib),`plain`(使用non-anti-aliased字体),`low`或`high`(使用low-level或者high-level anti-aliased 字体). [xpdf.t1libControl]
-ps PS-file
设定缺省的PostScript输出文件的名字.此选项也可以以`|command`的形式,通过某个命令来管道PostScript文件. [xpdf.psFile]
-paperw size
设定页面宽度,单位是像素点. [xpdf.psPaperWidth]
-paperh size
设定页面高度,单位是像素点. [xpdf.psPaperHeight]
-level1
产生Level1 PostScript文件.输出的PostScript文件相当的大(如果它包含图片的话),但是确可以在Level 1打印机上打印输出.此选项将所有的图像转换成黑白图像. [xpdf.psLevel1]
-cmd
打印出命令的执行结果(在调试时有用)
-q
不打印任何信息或者错误
-h
打印帮助信息 (相当于-help)

一些其他的X选项和资源同样可以如预期的一样执行

-display display
[xpdf.display]
-fg color
[相当于-foreground] [xpdf.foreground] -bg color (相当于-background) [xpdf.background]
-font font
(相当于-fn) [xpdf.font]

色彩和字体选项只影响用户界面部分,不影响PDF文件的显示.(`paper`)

下列的X资源没有对应的命令行选项

xpdf.urlCommand
设定,当你点击网络链接时执行的命令.详情参见后面的 网络浏览器 部分.
xpdf.japaneseFont
设定用于使用日文字符的相应的X字体模式.缺省的是:
-*-fixed-medium-r-normal-*-%s-*-*-*-*-*-jisx0208.1983-0
xpdf.viKeys
设定将左,右,上和下的滚动由`h`,`l`,`k`和`j`键执行.

下面的资源用于设定文件名字使用的14种基本的Type 1字体.

xpdf.t1TimesRoman
xpdf.t1TimesItalic
xpdf.t1TimesBold
xpdf.t1TimesBoldItalic
xpdf.t1Helvetica
xpdf.t1HelveticaOblique
xpdf.t1HelveticaBold
xpdf.t1HelveticaBoldOblique
xpdf.t1Courier
xpdf.t1CourierOblique
xpdf.t1CourierBold
xpdf.t1CourierBoldOblique
xpdf.t1Symbol
xpdf.t1ZapfDingbats

如果激活t1lib,这些Type 1字体将被用于取代X服务器的字体.  

控制

屏幕控制在xpdf窗口的底部.

左/右箭头按键
翻到前/后一页
双左/右箭头按键
向前/后翻动10页
破折号左/右箭头按键
沿着历史路径向前/后翻动
`Page`输入框
翻到指定的页码.通过点击激活输入框,输入页码,然后回车.
放大缩小弹出菜单
调整放大因子.(参见前面-z选项的说明)
望远镜按键
查找某个文本.
打印机按键
弹出一个产生PostScript文件的对话框.对话框可以设定需要打印的页面和PostScript文件的名字.当文件名字为'-'时,代表标准输出,或者用'|command'通过某个命令来管道PostScript, 比如,'|lpr'.
'?'按键
弹出一个'about xpdf'窗口.
链接信息
当鼠标移动到某个链接的上面,`?`和`Quit`按键之间的空间用来显示链接地址或者外部文件名.
`Quit`按键
退出xpdf.

菜单

按鼠标右键,会弹出一个含有以下命令的弹出菜单.

Open...
通过文件选择器打开一个新文件.
Save PDF...
通过文件选择器保存现有文件.
Rotate left
将当前页面逆时针旋转90度.
Rotate right
将当前页面顺时针旋转90度.这两个旋转命令主要是为了那些没有在文件中正确指定旋转信息的PDF文件设计的,即使您的X服务器不支持字体旋转,它依然起作用.
Quit
退出xpdf.

字符选择

按住鼠标并拖动它,可以高亮出一个任意的矩形.任何在此矩形中的字符都会被复制到X选择缓冲中去.

链接

点击一个超级链接可以跳转到此链接的目标地址中去.一个指向某个PDF文件的链接将促使xpdf打开此文件.一个指向某可执行程序的`launch`的链接将弹出一个对话框,如果您点击`ok`,就会执行此程序.URL链接调出某个外部命令.(参见下面网络浏览器部分.)

滚动

按住鼠标中键并拖动之,可以滚动页面.

快捷键

o
通过文件选择器打开一个新PDF文件.
f
查找字符串.
n
翻到下一页.
p
翻到前一页.
空格键,PageDown键或者Next键
向下滚动当前页面,如果已经到达当前页面低部,则翻到下一页.
Backspace键,Delete键,PageUp或者Previous键
向上滚动当前页面,如果已经到达页面顶部,则翻到前一页.
Home键
滚动到当前页面顶部.
End键
滚动到当前页面低部.
箭头键
滚动当前页面.
control-L
更新当前页面.
q
退出xpdf.

网络浏览器

如果您希望点击一个指向PDF文件的链接时,从netscape或者mosaic(或者其他的浏览器)中自动启动xpdf,您需要在您的用户目录下修改(或者创建) .mime.types.mailcap 文件. 在 .mime.types 中加入一行:

application/pdf pdf

.mailcap 中加入:

# Use xpdf to view PDF files.
application/pdf; xpdf -err %s

确认xpdf在您的可执行查找路径中.

当您点击一个PDF文件中的URL链接,xpdf将执行一个由xpdf.urlCommand资源指定的命令,并将资源中`%s`替换为相应的URL.比如,指定netscape打开URL,可以这样设定资源.

xpdf.urlCommand: netscape -remote `openURL(%s)`

远程服务器模式

通过指定一个服务器的名字,xpdf可以以远程服务器模式打开(和文件名,页码).

xpdf -remote myServer file.pdf

如果没有xpdf运行在以myServer为名字的服务器模式中,那么一个新的xpdf窗口会被打开.此时,如果键入另一个命令:

xpdf -remote myServer another.pdf 9

则不会启动新的xpdf,而前一个xpdf(服务器)将会打开 another.pdf 并且显示第9页.如果文件名字相同:

xpdf -remote myServer another.pdf 4

xpdf服务器将会简单的显示指定的页面.

-raise选项通知服务器唤醒它的窗口.它既可以后面跟随文件名和页码也可以单独使用.

-quit选项通知服务器关闭窗口并且退出.  

选项文件

xpdf会从您的用户目录(如果有的话)中读取一个叫做 .xpdfrc 的文件.这个文件可以包含两种条目.

fontpath directory
dicrectory 中寻找Type 1字体. Xpdf只通过此条目获得字体编码.为了显示,还要通过 fontmap 条目来布局字体.
fontmap PDF-font X-font
PDF-font (PDF文件中指定的)布局到 X-font 中去,X-font必须是一个在像素大小位置上含有`%s`的标准X字体描述.

比如,使用

fontmap TimesCE-Roman -*-times-medium-r-*-*-%s-*-*-*-*-*-iso8859-2

来布局Central European(Latin-2)版的Times-Roman字体.这里假设您已经安装了适当的X字体(参见 mkfontdir(1) ). Xpdf理解ISO8859-2编码,所以您不需要这些字体的 fontpath 条目. 使用Bakoma Type 1字体,可以这样做:

fontpath /home/derekn/fonts/bakoma
fontmap cmb10 -bakoma-cmb10-medium-r-normal--%s-*-*-*-p-*-adobe-fontspecific
fontmap cmbsy10 -bakoma-cmbsy10-medium-r-normal--%s-*-*-*-p-*-adobe-fontspecific
etc...

这里假设Type 1字体在目录 /home/derekn/fonts/bakoma 下.  

臭虫

不支持TypeType和Type 3字体.  

作者

The xpdf software and documentation are copyright 1996-1999 Derek B. Noonburg (derekn@foolabs.com).  

另见

pdftops(1). pdftotext(1). pdfinfo(1). pdftopbm(1). pdfimages(1).
http://www.foolabs.com/xpdf/

#p#

NAME

xpdf - Portable Document Format (PDF) file viewer for X (version 3.00)  

SYNOPSIS

xpdf [options] [PDF-file [page | +dest]]  

DESCRIPTION

Xpdf is a viewer for Portable Document Format (PDF) files. (These are also sometimes also called 'Acrobat' files, from the name of Adobe's PDF software.) Xpdf runs under the X Window System on UNIX, VMS, and OS/2.

To run xpdf, simply type:

xpdf file.pdf

where file.pdf is your PDF file. The file name can be followed by a number specifying the page which should be displayed first, e.g.:

xpdf file.pdf 18

You can also give a named destination, prefixed with '+' in place of the page number.

You can also start xpdf without opening any files:

xpdf

CONFIGURATION FILE

Xpdf reads a configuration file at startup. It first tries to find the user's private config file, ~/.xpdfrc. If that doesn't exist, it looks for a system-wide config file, typically /etc/xpdfrc (but this location can be changed when xpdf is built). See the xpdfrc(5) man page for details.  

OPTIONS

Many of the following options can be set with configuration file commands or X resources. These are listed in square brackets with the description of the corresponding command line option.

-g geometry
Set the initial window geometry. (-geometry is equivalent.) [X resource: xpdf.geometry]
-title title
Set the window title. By default, the title will be "xpdf: foo.pdf". [X resource: xpdf.title]
-cmap
Install a private colormap. This is ignored on TrueColor visuals. [X resource: xpdf.installCmap]
-rgb number
Set the size of largest RGB cube xpdf will try to allocate. The default is 5 (for a 5x5x5 cube); set to a smaller number to conserve color table entries. This is ignored with private colormaps and on TrueColor visuals. [X resource: xpdf.rgbCubeSize]
-rv
Set reverse video mode. This reverses the colors of everything except images. It may not always produce great results for PDF files which do weird things with color. This also causes the paper color to default to black. [X resource: xpdf.reverseVideo]
-papercolor color
Set the "paper color", i.e., the background of the page display. This will not work too well with PDF files that do things like filling in white behind the text. [X resource: xpdf.paperColor]
-z zoom
Set the initial zoom factor. A number specifies a zoom percentage, where 100 means 72 dpi.You may also specify 'page', to fit the page to the window size, or 'width', to fit the page width to the window width. [config file: initialZoom; or X resource: xpdf.initialZoom]
-t1lib yes | no
Enable or disable t1lib (a Type 1 font rasterizer). This defaults to "yes". [config file: enableT1lib]
-freetype yes | no
Enable or disable FreeType (a TrueType / Type 1 font rasterizer). This defaults to "yes". [config file: enableFreeType]
-aa yes | no
Enable or disable font anti-aliasing. This defaults to "yes". [config file: antialias]
-ps PS-file
Set the default file name for PostScript output. This can also be of the form '|command' to pipe the PostScript through a command. [config file: psFile]
-paper size
Set the paper size to one of "letter", "legal", "A4", or "A3". This can also be set to "match", which will set the paper size to match the size specified in the PDF file. [config file: psPaperSize]
-paperw size
Set the paper width, in points. [config file: psPaperSize]
-paperh size
Set the paper height, in points. [config file: psPaperSize]
-level1
Generate Level 1 PostScript. The resulting PostScript files will be significantly larger (if they contain images), but will print on Level 1 printers. This also converts all images to black and white. [config file: psLevel]
-enc encoding-name
Sets the encoding to use for text output. The encoding-name must be defined with the unicodeMap command (see xpdfrc(5)). This defaults to "Latin1" (which is a built-in encoding). [config file: textEncoding]
-eol unix | dos | mac
Sets the end-of-line convention to use for text output. [config file: textEOL]
-opw password
Specify the owner password for the PDF file. Providing this will bypass all security restrictions.
-upw password
Specify the user password for the PDF file.
-fullscreen
Open xpdf in a full-screen mode, useful for presentations. You may also want to specify '-bg black' (or similar) with this. (There is currently no way to switch between window and full-screen modes on the fly.)
-remote name
Start/contact xpdf remote server with specified name (see the REMOTE SERVER MODE section below).
-reload
Reload xpdf remote server window (with -remote only).
-raise
Raise xpdf remote server window (with -remote only).
-quit
Kill xpdf remote server (with -remote only).
-cmd
Print commands as they're executed (useful for debugging). [config file: printCommands]
-q
Don't print any messages or errors. [config file: errQuiet]
-cfg config-file
Read config-file in place of ~/.xpdfrc or the system-wide config file.
-v
Print copyright and version information.
-h
Print usage information. (-help and --help are equivalent.)

Several other standard X options and resources will work as expected:

-display display
[X resource: xpdf.display]
-fg color
(-foreground is equivalent.) [X resource: xpdf*Foreground]
-bg color
(-background is equivalent.) [X resource: xpdf*Background]
-font font
(-fn is equivalent.) [X resource: xpdf*fontList]

The color and font options only affect the user interface elements, not the PDF display (the 'paper').

The following X resources do not have command line option equivalents:

xpdf.viKeys
Enables the 'h', 'l', 'k' and 'j' keys for left, right, up, and down scrolling.

CONTROLS

On-screen controls, at the bottom of the xpdf window

left/right arrow buttons
Move to the previous/next page.
double left/right arrow buttons
Move backward or forward by ten pages.
dashed left/right arrow buttons
Move backward or forward along the history path.
'Page' entry box
Move to a specific page number. Click in the box to activate it, type the page number, then hit return.
zoom popup menu
Change the zoom factor (see the description of the -z option above).
binoculars button
Find a text string.
print button
Bring up a dialog for generating a PostScript file. The dialog has options to set the pages to be printed and the PostScript file name. The file name can be '-' for stdout or '|command' to pipe the PostScript through a command, e.g., '|lpr'.
'?' button
Bring up the 'about xpdf' window.
link info
The space between the '?' and 'Quit' buttons is used to show the URL or external file name when the mouse is over a link.
'Quit' button
Quit xpdf.

Menu

Pressing the right mouse button will post a popup menu with the following commands:

Open...
Open a new PDF file via a file requester.
Open in new window...
Create a new window and open a new PDF file via a file requester.
Reload
Reload the current PDF file. Note that Xpdf will reload the file automatically (on a page change or redraw) if it has changed since it was last loaded.
Save as...
Save the current file via a file requester.
Rotate counterclockwise
Rotate the page 90 degrees counterclockwise.
Rotate clockwise
Rotate the page 90 degrees clockwise. The two rotate commands are intended primarily for PDF files where the rotation isn't correctly specified in the file.
Close
Close the current window. If this is the only open window, the document is closed, but the window is left open (i.e., this menu command won't quit xpdf).
Quit
Quit xpdf.

Outline

If the PDF contains an outline (a.k.a., bookmarks), there will be an outline pane on the left side of the window. The width of the outline pane is adjustable with a vertical split bar via the knob near its bottom end.

Text selection

Dragging the mouse with the left button held down will highlight an arbitrary rectangle. Any text inside this rectangle will be copied to the X selection buffer.

Links

Clicking on a hyperlink will jump to the link's destination. A link to another PDF document will make xpdf load that document. A 'launch' link to an executable program will display a dialog, and if you click 'ok', execute the program. URL links call an external command (see the WEB BROWSERS section below).

Panning

Dragging the mouse with the middle button held down pans the window.

Key bindings

o
Open a new PDF file via a file requester.
r
Reload the current PDF file. Note that Xpdf will reload the file automatically (on a page change or redraw) if it has changed since it was last loaded.
control-L
Redraw the current page.
control-W
Close the current window.
f or control-F
Find a text string.
control-G
Find next occurrence.
control-P
Print.
n
Move to the next page. Scrolls to the top of the page, unless scroll lock is turned on.
p
Move to the previous page. Scrolls to the top of the page, unless scroll lock is turned on.
<Space> or <PageDown> or <Next>
Scroll down on the current page; if already at bottom, move to next page.
<Backspace> or <Delete> or <PageUp> or <Previous>
Scroll up on the current page; if already at top, move to previous page.
v
Move forward along the history path.
b
Move backward along the history path.
<Home>
Scroll to top of current page.
<End>
Scroll to bottom of current page.
control-<Home>
Scroll to first page of document.
control-<End>
Scroll to last page of document.
arrows
Scroll the current page.
g
Activate the page number text field ("goto page").
0
Set the zoom factor to zero (72 dpi).
+
Zoom in (increment the zoom factor by 1).
-
Zoom out (decrement the zoom factor by 1).
z
Set the zoom factor to 'page' (fit page to window).
w
Set the zoom factor to 'width' (fit page width to window).
q
Quit xpdf.

WEB BROWSERS

If you want to run xpdf automatically from netscape or mosaic (and probably other browsers) when you click on a link to a PDF file, you need to edit (or create) the files .mime.types and .mailcap in your home directory. In .mime.types add the line:

application/pdf pdf

In .mailcap add the lines:

# Use xpdf to view PDF files.
application/pdf; xpdf -q %s

Make sure that xpdf is on your executable search path.

When you click on a URL link in a PDF file, xpdf will execute the command specified by the urlCommand config file option, replacing an occurrence of '%s' with the URL. For example, to call netscape with the URL, add this line to your config file:

urlCommand "netscape -remote 'openURL(%s)'"

REMOTE SERVER MODE

Xpdf can be started in remote server mode by specifying a server name (in addition to the file name and page number). For example:

xpdf -remote myServer file.pdf

If there is currently no xpdf running in server mode with the name 'myServer', a new xpdf window will be opened. If another command:

xpdf -remote myServer another.pdf 9

is issued, a new copy of xpdf will not be started. Instead, the first xpdf (the server) will load another.pdf and display page nine. If the file name is the same:

xpdf -remote myServer another.pdf 4

the xpdf server will simply display the specified page.

The -raise option tells the server to raise its window; it can be specified with or without a file name and page number.

The -quit option tells the server to close its window and exit.  

EXIT CODES

The Xpdf tools use the following exit codes:

0
No error.
1
Error opening a PDF file.
2
Error opening an output file.
3
Error related to PDF permissions.
99
Other error.

AUTHOR

The xpdf software and documentation are copyright 1996-2004 Glyph & Cog, LLC.  

SEE ALSO

pdftops(1), pdftotext(1), pdfinfo(1), pdffonts(1), pdftoppm(1), pdfimages(1), xpdfrc(5)
http://www.foolabs.com/xpdf/

责任编辑:韩亚珊 来源: CMPP.net
相关推荐

2011-08-15 10:21:09

man中文man

2011-08-24 16:48:36

man中文man

2011-08-11 16:11:49

at中文man

2011-08-25 10:21:56

man.conf中文man

2011-08-12 14:58:05

killall中文man

2011-07-15 16:58:36

ac中文man

2011-08-15 11:10:48

more中文man

2011-08-25 17:03:51

pclose中文man

2011-08-15 14:10:37

tar中文man

2011-08-16 10:42:30

rmmod中文man

2011-08-11 17:46:02

chmod中文man

2011-08-18 13:57:38

acct中文man

2011-08-23 17:49:36

zdump中文man

2011-08-15 15:10:49

wall中文man

2011-08-23 15:06:03

quotastats中文man

2011-08-15 17:35:50

ar中文man

2011-08-25 09:07:16

suffixes中文man

2011-08-25 17:53:26

stdio中文man

2011-08-18 15:21:37

autofs中文man

2011-08-16 09:22:46

df中文man
点赞
收藏

51CTO技术栈公众号