-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
怎么生成PDF版本? #392
Comments
@piazini 写个node JS 脚本批量生成PDF |
@zjlovezj 单个页面生成 PDF? |
@jaywcjlove 大佬,node JS脚本具体要怎么写? 网上搜索到的“Linux命令大全搜索工具 v1.8.0.pdf” 这个PDF是怎么制作的? |
我不知道网上的那个怎么制作的,我可以给你提供一些思路 方法一使用浏览器保存 PDF, 方法二nodejs 有多种方式生成 pdf,例如使用 markdown 生成 pdf 你可以自己控制样式 https://www.npmjs.com/package/markdown-pdf var markdownpdf = require("markdown-pdf")
var options = {
remarkable: {
html: true,
breaks: true,
plugins: [ require('remarkable-classy') ],
syntax: [ 'footnote', 'sup', 'sub' ]
}
}
markdownpdf(options)
.from("/path/to/document.md")
.to("/path/to/document.pdf", function () { console.log("Done") }) 在 npm 上有类似这样转换的包,html 转 pdf,所以你可以写nodejs 脚本干这个事儿。 |
非常感谢回答. 我用 Python 写了一个版本,可以自动将 md 生成 pdf |
我做了个 EPUB 格式的,大家可以转成 PDF:#510 |
如题,怎么生成PDF版本?
The text was updated successfully, but these errors were encountered: