CHANGEPDFSTRING(1p)
π CHANGEPDFSTRING(1p) π
okay bestie, so this page lives in the User Contributed Perl Documentation section of the manual, and it's about changepdfstring β the little icon that goes digging through your PDF's metadata and swaps strings out. no cap. let's get into it. β¨
πΈ NAME πΈ
changepdfstring β search and replace, but make it PDF metadata π
π¦ SYNOPSIS π¦
changepdfstring [options] infile.pdf search-str replace-str [outfile.pdf]
and here's the options menu, periodt:
Options:
-o --order preserve the internal PDF ordering for output
-v --verbose print diagnostic messages
-h --help verbose help message
-V --version print CAM::PDF version
π DESCRIPTION π
so what it does is: it searches all up through a PDF file's metadata for every instance of search-str and then inserts replace-str in its place. slay. π«Ά
but lowkey important: this does NOT touch the actual PDF page layout. it only messes with the interactive features β think forms and annotation. the visual page stays exactly as it was, iykyk.
if changing page layout strings is what you actually want, then bestie you're on the wrong manpage β go use changepagestring instead. π
π regex o'clock π
your search-str can just be a literal string, plain and simple. or β and this is the fun part β you can wrap it in regex(...) and it becomes a full-on Perl regular expression. main character energy:
changepdfstring in.pdf 'regex(CAM-PDF-(\d.\d+))' 'version=$1' out.pdf
look at that capture group eating. obsessed. π₯
π SEE ALSO π
CAM::PDFchangepagestring
π§ AUTHOR π§
See CAM::PDF π
and that's the whole vibe bestie, go forth and replace those strings πβ¨
this lil cutie is part of perl v5.36.0, dated 2022-12-08, and it's filed under the manual page name CHANGEPDFSTRING(1p) ππ¦β
π¦ where this page comes from
- debian bookworm: libcam-pdf-perl 1.60-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libcam-pdf-perl 1.60-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libcam-pdf-perl 1.60-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcam-pdf-perl 1.60-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcam-pdf-perl 1.60-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms