AshikNesin / remove-pdf-password

Remove password from your pdf easily πŸ”“

Home Page:https://www.npmjs.com/package/remove-pdf-password

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

remove-pdf-password πŸ”“

Remove password from your pdf easily

Install

$ npm install --save remove-pdf-password

Dependency

This package depends on qpdf

You can install this pretty much easily using the following commands

MacOS

brew install qpdf

Ubuntu

sudo apt-get install qpdf

Usage

const removePdfPassword = require('remove-pdf-password');

const params = {
	inputFilePath: '/Users/YourName/input.pdf',
	password: "secrect",
	outputFilePath: '/Users/YourName/output.pdf',
}

removePdfPassword(params);

API

removePdfPassword(input, [options])

inputFilePath

Type: string

Local absolute path to your input pdf file in which you want to remove password.

outputFilePath

Type: string

Local absolute path to your output pdf file in which the password will be removed.

password

Type: string

Password for your pdf

TODO

  • Check if qpdf is installed in machine
  • Read input file from web (http://example.com/file.pdf)
  • Handle and return success/failure state
  • Convert Relative path β†’ absolute path?

License

MIT Β© Ashik Nesin

About

Remove password from your pdf easily πŸ”“

https://www.npmjs.com/package/remove-pdf-password

License:MIT License


Languages

Language:JavaScript 100.0%