Code Monkey home page Code Monkey logo

doc2pdf's Introduction

doc2pdf

将网页文档转换为单个 pdf 文件(带书签)。

支持文档类型

  • confluence
  • docusaurus

安装

go install github.com/hailaz/doc2pdf/cmd/doc2pdf@latest

使用

doc2pdf -h
# 示例
doc2pdf confluence --index="https://goframe.org/display/gf" --output="./output/temp"

环境准备

ubuntu 无界面环境

字体

中文字体
sudo apt update
sudo apt install ttf-wqy-zenhei
fc-cache -f -v

谷歌浏览器(选装)

sudo apt update
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
apt install ./google-chrome-stable_current_amd64.deb

原理

先使用rod控制浏览器,将网页转换为 pdf 文件。

然后使用unipdf将 pdf 文件合并,最后再将目录插入到合并后的 pdf 文件中。

doc2pdf's People

Contributors

hailaz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.