
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
pdf-typeset
Advanced tools
提供对PDF文件页面的排版处理
npm install pdf-typeset --save
@param {path} options.sourcePath 原PDF路径
@param {path} options.outputPath 输出路径
@param {path} options.fillPagePath 填补页面倍数的pdf(取第一页)
@param {number} options.insertIndex 插入空白页的原PDF索引
@param {number} options.times PDF处理页面倍数
@param {function} cb 处理完成后的回调
用空白页或指定PDF的第一页 插入指定页数位置,将PDF处理成多少倍数的页数
const { toTimes } = require('pdf-typeset')
toTimes({
sourcePath: 'source.pdf',
fillPagePath: 'fill.pdf',
insertIndex: -2,
times: 5,
}, (data, errMsg) => {
if (data) fs.writeFileSync(`source-after.pdf`, data)
})
@param {path} options.sourcePath 原PDF路径
@param {path} options.outputPath 输出路径
@param {path} options.fillPagePath 填补页面倍数的pdf(取第一页)
@param {number} options.insertIndex 插入空白页的原PDF索引
@param {function} cb 处理完成后的回调
将A4 PDF处理成 书册子A3排版(同时处理4倍页数)
const { toBook } = require('pdf-typeset')
toBook({
sourcePath: 'source.pdf',
insertIndex: -2,
fillPagePath: 'fill.pdf',
}, (data) => {
data && fs.writeFileSync(`source-after.pdf`, data)
})

FAQs
提供对PDF文件页面的排版处理
We found that pdf-typeset demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.