From 45ad5a0c7f228e0916c8203a27dda591e92a4535 Mon Sep 17 00:00:00 2001 From: Minho Date: Thu, 11 May 2017 18:29:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0pdf=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 ++++-- README_LINUX.md => docs/README_LINUX.md | 0 README_WIN.md => docs/README_WIN.md | 0 docs/WKHTMLTOPDF.md | 24 ++++++++++++++++++++++++ docs/wkhtmltopdf.md | 6 ------ 5 files changed, 28 insertions(+), 8 deletions(-) rename README_LINUX.md => docs/README_LINUX.md (100%) rename README_WIN.md => docs/README_WIN.md (100%) create mode 100644 docs/WKHTMLTOPDF.md delete mode 100644 docs/wkhtmltopdf.md diff --git a/README.md b/README.md index 03d8eaae..2700aafa 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,11 @@ MinDoc 的前身是 SmartWiki 文档系统。SmartWiki 是基于 PHP 框架 lara **如果你的服务器上没有安装golang程序请手动设置一个环境变量如下:键名为 ZONEINFO,值为MinDoc跟目录下的/lib/time/zoneinfo.zip 。** -**Windows 教程:** [https://github.com/lifei6671/godoc/blob/master/README_WIN.md](https://github.com/lifei6671/godoc/blob/master/README_WIN.md) +**Windows 教程:** [https://github.com/lifei6671/godoc/blob/master/README_WIN.md](docs/README_WIN.md) -**Linux 教程:**  [https://github.com/lifei6671/godoc/blob/master/README_LINUX.md](https://github.com/lifei6671/godoc/blob/master/README_LINUX.md) +**Linux 教程:**  [https://github.com/lifei6671/godoc/blob/master/README_LINUX.md](docs/README_LINUX.md) + +**PDF 导出配置教程**  [https://github.com/lifei6671/godoc/blob/master/docs/README_LINUX.md](docs/WKHTMLTOPDF.md) 对于没有Golang使用经验的用户,可以从 [https://github.com/lifei6671/godoc/releases](https://github.com/lifei6671/godoc/releases) 这里下载编译完的程序。 diff --git a/README_LINUX.md b/docs/README_LINUX.md similarity index 100% rename from README_LINUX.md rename to docs/README_LINUX.md diff --git a/README_WIN.md b/docs/README_WIN.md similarity index 100% rename from README_WIN.md rename to docs/README_WIN.md diff --git a/docs/WKHTMLTOPDF.md b/docs/WKHTMLTOPDF.md new file mode 100644 index 00000000..ad82a07c --- /dev/null +++ b/docs/WKHTMLTOPDF.md @@ -0,0 +1,24 @@ +## wkhtmltopdf 安装 + +导出 pdf 格式文档使用的是 wkhtmltopdf 工具,工具下载地址为:[https://wkhtmltopdf.org/downloads.html](https://wkhtmltopdf.org/downloads.html)。 + +### Windows 下配置 + +下载 Windows 版本,安装即可。 + +### Linux 下配置 + +请下载和你服务器对应的版本,Linux版本依赖一下库: + +`zlib fontconfig freetype X11 libs (libX11, libXext, libXrender)` + +请自行搜索安装以上依赖包,下面的命令是安装 libXrender 和 libXext。 + +```bash +apt-get install -y libxrender-dev +apt-get install -y libxext-dev +``` + +## 配置 + +请将 wkhtmltopdf 可执行文件所在目录配置到 MinDoc 根目录下 conf/app.conf 的 wkhtmltopdf 节点。 diff --git a/docs/wkhtmltopdf.md b/docs/wkhtmltopdf.md deleted file mode 100644 index 55c93f5f..00000000 --- a/docs/wkhtmltopdf.md +++ /dev/null @@ -1,6 +0,0 @@ -## wkhtmltopdf 安装 - -```bash -apt-get install -y libxrender-dev -apt-get install -y libxext-dev -``` \ No newline at end of file