1
0
Fork
You've already forked pdfutil
0
No description
  • Python 100%
0x4261756D a8cd1a7f9d
Clone whole document when changing infos, not just pages and metadata
Previously, some data (e.g. some info shown when clicking on something
on a page in some PDFs) got lost when editing metadata.
This is most likely a holdover behaviour from interfacing with pdfrw
(the old library) which didn't have the capability to clone from a
reader iirc.
2026年01月16日 18:04:25 +01:00
.gitignore Make -o optional if -f is provided 2023年01月24日 11:24:02 +01:00
LICENSE Change to pypdf library + clean up -d + expand -i 2024年10月16日 05:47:42 +02:00
pdfutil.py Clone whole document when changing infos, not just pages and metadata 2026年01月16日 18:04:25 +01:00
README.md Change to pypdf library + clean up -d + expand -i 2024年10月16日 05:47:42 +02:00

pdfutil

The original script (merging and rotating) was created in around two hours, information dumping and editing was "ported" from a previous project of mine in another two, so expect ugly code, dumb design decisions and be aware of the Nose Demons (although I doubt anyone will ever use this but who knows)... I had to merge PDFs and rotate them and somehow writing a python script was faster than finding an existing program doing that...

Version 1.x.x used the pdfrw library. Since that project seems abandoned and does not support all the features I want every later version uses pypdf.

Dependencies

  • Python3 obviously
  • pypdf

Installation instructions

Install Python

python3 -m pip install pypdf

Usage

python3 pdfutil.py -h

Examples

Update the title, author and creation date of test.pdf

python3 pdfutil -i test.pdf --title "Arnold Layne" --author "Syd Barret" --creation_date 19670310004156 -f

If against all odds someone really uses this and finds a bug, feel free to report it. In the even more rare case that you improved something, feel even more free to open a PR.