Created
January 30, 2019 15:05
-
-
Save badboy/3a73440ca40a460ab69455910d7e8d21 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def combine(file, background, out) | |
file = File.join("/data", file) | |
background = File.join("/data", background) | |
out = File.join("/data", out) | |
cmd = "docker run --rm -ti -v $(pwd):/data r3ddox/node-pdftk pdftk #{file} background #{background} output #{out}" | |
#puts "Executing: #{cmd.inspect}" | |
`#{cmd}` | |
end | |
def pdfmerge(files, out) | |
out = File.join(COMPLETE_DIR, out) | |
inp = files.join(" ") | |
`"/System/Library/Automator/Combine PDF Pages.action/Contents/Resources/join.py" -o #{out} #{inp}` | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment