DocView mode 1 -- 手册翻译

文档原文在线地址

* 35 Document Viewing
**
DocView mode is a major mode for viewing DVI, PostScript (PS), PDF,OpenDocument, and Microsoft Office documents. It provides features such as slicing(截取), zooming(缩放), and searching inside documents. It works by converting the document to a set of images using the gs (GhostScript)(ubuntu 12.04 默认安装) command and other external tools , and displaying those images.

When you visit a document file that can be displayed with DocView mode, Emacs automatically uses DocView mode . As an exception, when you visit a PostScript file, Emacs switches to PS mode, a major mode for editing PostScript files as text; however, it also enables DocView minor mode, so you can type C-c C-c to view the document with DocView. In either DocView mode or DocView minor mode, repeating C-c C-c (doc-view-toggle-display) toggles between DocView and the underlying(放在下面的) file contents.

You can explicitly enable DocView mode with the command M-x doc-view-mode. You can toggle DocView minor mode with M-x doc-view-minor-mode.

When DocView mode starts, it displays a welcome screen and begins formatting the file, page by page. It displays the first page once that has been formatted.

To kill the DocView buffer, type k (doc-view-kill-proc-and-buffer). To bury it, type q (quit-window).


Footnotes

[1] gs is a hard requirement. For DVI files, dvipdf or dvipdfm is needed. For OpenDocument and Microsoft Office documents, the unoconv tool is needed.
《安装这些
gs dvipdf dvipdfm
怎么安装?

$ sudo apt-get install unoconv




[2] The needed external tools for the document type must be available, and Emacs must be running in a graphical frame and have PNG image support. If any of these requirements is not fulfilled, Emacs falls back to another major mode.
《怎么看支持?》

** 5.1 DocView Navigation

In DocView mode, you can scroll the current page using the usual Emacs movement keys: C-p, C-n, C-b, C-f, and the arrow keys.

By default, the line-motion keys C-p and C-n stop scrolling at the beginning and end of the current page, respectively. However, if you change the variable doc-view-continuous to a non-nil value, then C-p displays the previous page if you are already at the beginning of the current page, and C-n displays the next page if you are at the end of the current page.

You can also display the next page by typing n, <next> or C-x ] (doc-view-next-page). To display the previous page, type p, <prior> or C-x [ (doc-view-previous-page).

<SPC> (doc-view-scroll-up-or-next-page) is a convenient way to advance through the document. It scrolls within the current page or advances to the next. <DEL> moves backwards in a similar way (doc-view-scroll-down-or-previous-page).

To go to the first page, type M-< (doc-view-first-page); to go to the last one, type M-> (doc-view-last-page). To jump to a page by its number, type M-g M-g or M-g g (doc-view-goto-page).

You can enlarge or shrink the document with + (doc-view-enlarge) and - (doc-view-shrink). These commands work by reconverting the document at the new size. To specify the default size for DocView, customize the variable doc-view-resolution.

** 35.2 DocView Searching

In DocView mode, you can search the file's text for a regular expression (see Regexps). The interface for searching is inspired by isearch (see Incremental Search).

To begin a search, type C-s (doc-view-search) or C-r (doc-view-search-backward). This reads a regular expression using a minibuffer, then echoes the number of matches found within the document. You can move forward and back among the matches by typing C-s and C-r. DocView mode has no way to show the match inside the page image; instead, it displays a tooltip (at the mouse position) listing all matching lines in the current page. To force display of this tooltip, type C-t (doc-view-show-tooltip).

To start a new search, use the search command with a prefix argument; i.e., C-u C-s for a forward search or C-u C-r for a backward search.

** 35.3 DocView Slicing

Documents often have wide margins for printing. They are annoying when reading the document on the screen, because they use up(用尽) screen
space and can cause inconvenient scrolling.

With DocView you can hide these margins by selecting a slice of pages to display. A slice is a rectangle(矩形区域) within the page area; once you specify a slice in DocView, it applies to whichever page you look at.

To specify the slice numerically(数字的方式), type s s (doc-view-set-slice); then enter the top left pixel position and the slice's width and height.

A more convenient graphical way to specify the slice is with s m (doc-view-set-slice-using-mouse), where you use the mouse to select the slice.

The most convenient way is to set the optimal(优化的) slice by using BoundingBox information automatically determined from the document by typing s b (doc-view-set-slice-using-mouse).

To cancel the selected slice, type s r (doc-view-reset-slice). Then DocView shows the entire page including its entire margins(边界).


** 35.4 DocView Conversion

For efficiency, DocView caches the images produced by gs. The name of this directory is given by the variable doc-view-cache-directory. You can clear the cache directory by typing M-x doc-view-clear-cache.

To force reconversion of the currently viewed document, type r or g (revert-buffer). To kill the converter process associated with the current buffer, type K (doc-view-kill-proc). The command k (doc-view-kill-proc-and-buffer) kills the converter process and the DocView buffer.

转载于:https://www.cnblogs.com/vipzrx/p/3445542.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
在线文档预览安装手册 系统环境:Windows Server 2016 64位、2012 64位 或 2008 R2 64位(最低版本,不推荐) 硬件配置:线上推荐内存8G或以上,如果预览量较大,推荐配置SSD硬盘 一、安装和配置软件 以下部分软件下载地址http://www.idocv.com/install.html 1. 下载并安装dotnet_framework_4.5_x64(Server2008以上版本跳过此步骤) 2. 下载并安装Windows6.1-KB2731284-v3-x64(Server2008以上版本跳过此步骤) 3. 下载并安装Visual_CPP_Redistributable_for_Visual_Studio_2012_x64 4. 下载并安装ImageMagick-6.9.0-4-Q8-x64-dll(高级版安装,标准版忽略,安装到默认路径即可,如要更改安装路径,需额外配置) 5. 下载并安装Microsoft Office 2013 64位或以上版本 6. 安装公有软件: 下载install_public_soft_xxxxxxxx.zip压缩包,解压到D盘根目录(或其他盘根目录),目录结构:D:\idocv\... 7. 安装私有软件: 将您购买的私有软件解压到D:\idocv目录下,目录结构: 文档转换器:D:\idocv\converter\... WEB应用:D\idocv\docview\... 8. 其他配置(可选) 如需进行其他高级配置,如“受保护的视图”文档预览、设置上下文等,可参考附录 二、启动服务 右键以管理员身份运行:D:\idocv\start.bat 三、验证服务 浏览器访问http://127.0.0.1/user/login 登录用户名/密码:admin/admin(注:线上环境建议修改默认用户名密码,可到D:\idocv\db\mongodb_x.x\db_init.js文件里修改,重启服务即可生效) 点击“上传一个文档”,提示成功后在文档列表区点击刚刚上传的文档进行预览。 -------------- All done! Have fun :) 其他高级配置请参考以下附录

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值