CHANGEPDFSTRING(1p)

πŸ“¦
version 1.60 Β· 2 versions
  • 1.60 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 1.60 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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::PDF
  • changepagestring

🧚 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