1.0.0 • Published 3 months ago

pdf-manage v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
3 months ago

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)
ParameterTypeDescription
mergePDFsstring string
splitPDFstring string chain-int
extractToJPGstring string