> For the complete documentation index, see [llms.txt](https://book.bsdcn.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.bsdcn.org/di-14-zhang-duo-mei-ti-he-wai-bu-she-bei/di-14.8-jie-wen-dang-cha-kan-qi.md).

# 14.8 文档查看器

自 UNIX 问世以来，许多新的文档格式逐渐流行，如 PDF、DjVu、MOBI、AZW3、EPUB 等，而这些格式所需的查看器在基本系统中或许并不存在。本节介绍如何安装文档查看器。

## Calibre 文档管理（PDF、EPUB、MOBI、AZW3 等格式）

Calibre 是电子书管理工具，支持多种电子书格式的阅读、转换和组织，还支持自定义 CSS 样式。

使用 pkg 安装 Calibre：

```sh
# pkg install calibre
```

使用 Ports 安装：

```sh
# cd /usr/ports/deskutils/calibre/
# make install clean
```

Calibre 的主界面如下。

![Calibre 界面](/files/K6aGj05tuWACO5atq6zn)

## Okular

Okular 是一款通用文档查看器，属于 KDE Gear（KDE 应用程序合集），会随 KDE 桌面环境一道安装。Okular 支持多种文档格式，如 PDF、PostScript、DjVu、CHM、XPS、ePub 等。

使用 pkg 安装 Okular：

```sh
# pkg install okular
```

使用 Ports 安装：

```sh
# cd /usr/ports/graphics/okular/
# make install clean
```

![Okular 界面](/files/L0QNIT4I1wRb5W1DKZMs)

## Evince

Evince 是一款支持 PDF、PostScript 等多种文档格式的文档查看器，属于 GNOME 项目的一部分，会随 GNOME 桌面环境一道安装。

使用 pkg 安装 Evince：

```sh
# pkg install evince
```

使用 Ports 安装：

```sh
# cd /usr/ports/graphics/evince/
# make install clean
```

![Evince 界面](/files/ePWJ06ZmnRX4KQlE9LmO)

## ePDFView

ePDFView 是一款轻量级的 PDF 文档查看器，仅使用 Gtk+ 和 Poppler 库。ePDFView 的目标是提供简单的 PDF 文档查看器，类似于 Evince，但不使用 GNOME 库。

使用 pkg 安装 ePDFView：

```sh
# pkg install epdfview
```

使用 Ports 安装：

```sh
# cd /usr/ports/graphics/epdfview/
# make install clean
```

![ePDFView 界面](/files/zas9NHQ8KPCu0DaDvX8E)

## Xpdf

Xpdf 是一款 PDF 查看器。当前 `graphics/xpdf` 已是 `graphics/xpdf4` 的 slave Port，默认依赖 Qt5 工具包，不再是传统的纯 X11 轻量版本，不再适合偏好轻量级应用的用户。

使用 pkg 安装 Xpdf：

```sh
# pkg install xpdf
```

使用 Ports 安装：

```sh
# cd /usr/ports/graphics/xpdf/
# make install clean
```

![xpdf 界面](/files/OhX7xSZ4Ts643Usu0kWS)

## Zathura

Zathura 是一款高度可定制的文档查看器。它提供简约、节省空间的界面，主要专注于键盘交互。

### PDF 支持（MuPDF 后端）

**zathura-pdf-mupdf** 使用 MuPDF 库作为后端，更加轻量化。

使用 pkg 安装支持 PDF 的 Zathura：

```sh
# pkg install zathura-pdf-mupdf
```

使用 Ports 安装：

```sh
# cd /usr/ports/graphics/zathura-pdf-mupdf/
# make install clean
```

![zathura-pdf-mupdf 界面](/files/40uUtyR4PkMxDmvepc78)

### PDF 支持（Poppler 后端）

此外，还可以安装使用了 Poppler 库的 **graphics/zathura-pdf-poppler** 作为 PDF 支持的替代选择：

使用 pkg 安装支持 PDF 的 Zathura：

```sh
# pkg install zathura-pdf-poppler
```

使用 Ports 安装：

```sh
# cd /usr/ports/graphics/zathura-pdf-poppler/
# make install clean
```

![zathura-pdf-poppler 界面](/files/QT4KGaYaqSalDwQTOm1F)

### DjVu 支持

使用 pkg 安装支持 DjVu 的 Zathura：

```sh
# pkg install zathura-djvu
```

使用 Ports 安装：

```sh
# cd /usr/ports/graphics/zathura-djvu/
# make install clean
```

![Zathura DjVu 界面](/files/As1ze6T0qDyBwfoALoy6)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://book.bsdcn.org/di-14-zhang-duo-mei-ti-he-wai-bu-she-bei/di-14.8-jie-wen-dang-cha-kan-qi.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
