Skip to content

Tool to manipulate PDF files with Ghostscript and Pdftk. The Ghostscript is native in Linux, and Pdftk is in bin folder and is compiled only for Linux x64.

Notifications You must be signed in to change notification settings

GSWSoftware/node-pdf-tool

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDF Tool

Tool to manipulate PDF files with Ghostscript and Pdftk. The Ghostscript is native in Linux, and Pdftk is in bin folder and is compiled only for Linux x64.

This repository is an example of manipulating PDF with few operations, feel free to fork and contribute.

  • Requirements
- Any version of Linux x64
- Imagemagick installed
  • Deploy on Heroku
heroku git:remote -a <app name>
heroku buildpacks:add --index 1 https://github.com/ello/heroku-buildpack-imagemagick
heroku buildpacks
git commit -am 'installing buildpack heroku-buildpack-imagemagick' --allow-empty
git push heroku master
  • Using
const PdfTool = require('pdf-tool')

let stampFile = yield PdfTool
    .open(stampPdf)
    .moveFrame(5950, 8420, 0, -400)
    .rotate('1west')
    .exec()

let onePage = yield PdfTool
	.open(mainPdf2)
	.moveFrame(5950, 8420, -50, 0)
	.stamp(stampFile)
	.save(savedFile).exec()

yield onePage.clean()
yield stampFile.clean()

Run Specs

  • npm test

Maintaners

About

Tool to manipulate PDF files with Ghostscript and Pdftk. The Ghostscript is native in Linux, and Pdftk is in bin folder and is compiled only for Linux x64.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%