pdf-manage

1.0.0 • Public • Published

pdf-manage

Modify your pdf's with node js! you can crop them, edit them and extract their images!

API Reference

How to use

const { splitPDF, mergePDFs, extractToJPG } = require("pdf-manage");

//Examples

const pdfFiles = ['1.pdf', '2.pdf', '3.pdf']; // Add more PDFs as needed
const outputFileName = 'merged_output.pdf';

mergePDFs(pdfFiles, outputFileName);

const inputPdf = 'input.pdf'; // Replace with the path to your input PDF
const outputPrefix = 'output'; // Prefix for output file names
const pageRanges = [[1, 3], [4, 7], [8, 10]]; // Specify page ranges as needed

splitPDF(inputPdf, outputPrefix, pageRanges);

const inputPdf = 'input.pdf'; // Replace with the path to your input PDF
const outputFolder = 'output_images';

extractToJPG(inputPdf, outputFolder)
Parameter Type Description
mergePDFs string string
splitPDF string string chain-int
extractToJPG string string

Package Sidebar

Install

npm i pdf-manage

Weekly Downloads

2

Version

1.0.0

License

ISC

Unpacked Size

4.33 kB

Total Files

3

Last publish

Collaborators

  • aspad89