Skip to content

Instantly share code, notes, and snippets.

@bhavishyagopesh
Created June 8, 2018 00:36
Show Gist options
  • Save bhavishyagopesh/94b839fb14790382f658dffbbc5e1c97 to your computer and use it in GitHub Desktop.
Save bhavishyagopesh/94b839fb14790382f658dffbbc5e1c97 to your computer and use it in GitHub Desktop.
[pdftk](https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/): Tool for modifying pdfs.
FROM centos
RUN yum -y localinstall https://www.linuxglobal.com/static/blog/pdftk-2.02-1.el7.x86_64.rpm
WORKDIR /test
VOLUME ["/test"]
#!/bin/bash
#Instructions
#Run `chmod +x helper.sh`
# Move the pdf you want to edit to current dir
# `./helper.sh`
# Run `pdftk` commands For Eg: pdftk input.pdf cat <page-range>(like 1-4) output output.pdf
# exit
docker build -t pdftk ./
docker run -v "$PWD":/test -it pdftk bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment