Skip to content

Instantly share code, notes, and snippets.

@plamb
Last active January 21, 2019 02:49
Show Gist options
  • Save plamb/1670b0b94e1f444f3404269ff9288300 to your computer and use it in GitHub Desktop.
Save plamb/1670b0b94e1f444f3404269ff9288300 to your computer and use it in GitHub Desktop.
src_pdf (original, current pdf)
append_pdf (has new pages)
dest_pdf (becomes new)
if start_page > 0
copy src_pdf to archive
if start_page = 0 or start_page = 1
copy append_pdf to src_pdf filename
else
create new empty pdf
copy from src_pdf pages 1..end_page - 1 to dest_pdf
append from append_pdf all pages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment