const fs = require("fs");
const { addOutline } = require("../build/index");
const path = require("path");
addOutline({
filePath: path.join(__dirname, "test.pdf"),
outputFilePath: path.join(__dirname, "test-with-outline.pdf"),
outlines: [
{
title: "一、文章标题balabala",
to: 0, // 注意 to 从 0 开始
children: [
{
title: "1.1 文章子标题balabala",
to: 1,
},
{
title: "1.2 文章子标题balabala",
to: 2,
},
],
},
{
title: "二、文章标题balabala",
to: 3,
},
],
});
pdf-outlines
2.0.1 • Public • PublishedReadme
Keywords
nonePackage Sidebar
Install
npm i pdf-outlines
Weekly Downloads
0
Version
2.0.1
License
ISC
Unpacked Size
2 MB
Total Files
13