如何安装 html2ps Debian 9

在本教程中,我们学习如何安装 html2ps Debian 9. html2ps 是 HTML 到 PostScript 转换器

介绍

在本教程中我们学习如何安装 html2ps 在 Debian 9.

什么是 html2ps

html2ps 是:

该程序将 HTML 直接转换为 PostScript。 HTML 代码可以从一个或多个 URL 或本地文件检索,在命令行上指定为参数。 支持全面级别的 HTML,包括内联图像、CSS 1.0 和 HTML 4.0 的一些功能。

这是我们对建议列表的理由:

我们建议使用 Ghostscript,因为需要它才能输出 DSC 兼容的 PS(-dsc 选项)并在转换文档集内的链接上进行交叉引用(-xref 选项)。

我们建议使用 weblint-perl,因为它是检查 HTML 语法的默认方法(使用 -c 选项)。

我们建议使用 texlive-base,因为我们需要 TeX 连字符模式来对文本进行连字符(使用 -H 选项)。

我们建议 postscript-viewer 因为这个包生成可以在 postscript-viewer 上查看的 postscript。

我们建议使用 xhtml2ps,因为它是这个包的一个有趣的图形界面。

有三种安装方法 html2ps 在 Debian 9.我们可以使用 apt-get, aptaptitude。 在以下部分中,我们将描述每种方法。 您可以选择其中之一。

使用 apt-get 安装 html2ps

更新 apt 数据库 apt-get 使用以下命令。

更新apt数据库后,我们可以安装 html2ps 使用 apt-get 通过运行以下命令:

sudo apt-get -y install html2ps

使用 apt 安装 html2ps

更新 apt 数据库 apt 使用以下命令。

更新apt数据库后,我们可以安装 html2ps 使用 apt 通过运行以下命令:

sudo apt -y install html2ps

使用 aptitude 安装 html2ps

如果您想遵循此方法,您可能需要先安装 aptitude,因为 aptitude 通常不会默认安装 Debian。 更新 apt 数据库 aptitude 使用以下命令。

更新apt数据库后,我们可以安装 html2ps 使用 aptitude 通过运行以下命令:

sudo aptitude -y install html2ps

如何卸载 html2ps Debian 9

仅卸载 html2ps 打包我们可以使用以下命令:

sudo apt-get remove html2ps

卸载 html2ps 及其依赖项

卸载 html2ps 及其不再需要的依赖项 Debian 9、我们可以使用下面的命令:

sudo apt-get -y autoremove html2ps

删除 html2ps 配置和数据

去除 html2ps 配置和数据来自 Debian 9.我们可以使用以下命令:

sudo apt-get -y purge html2ps

删除 html2ps 配置、数据及其所有依赖项

我们可以使用下面的命令来删除 html2ps 配置、数据及其所有依赖项,我们可以使用以下命令:

sudo apt-get -y autoremove --purge html2ps

依赖关系

html2ps 具有以下依赖项:

参考

概括

在本教程中我们学习如何安装 html2ps 封装在 Debian 9.使用不同的包管理工具: apt, apt-getaptitude