SETPDFBACKGROUND(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

πŸ’– SETPDFBACKGROUND πŸ’–

okay so bestie, welcome to setpdfbackground β€” it's a lil Perl script from the User Contributed Perl Documentation section (that's the 1p vibe, iykyk) and it does exactly one thing and does it gorgeously: it slaps a solid background color behind your PDF page contents. main character behavior fr fr ✨


🌸 NAME 🌸

setpdfbackground β€” apply a background color to a PDF page 🎨


πŸ¦‹ SYNOPSIS πŸ¦‹

setpdfbackground [options] file.pdf pagenum color [outfile]

Options:
  -o --order          preserve the internal PDF ordering for output
  -v --verbose        print the internal representation of the PDF
  -h --help           verbose help message
  -V --version        print CAM::PDF version

so the color is given as 3 or 6 character hexadecimal RGB, no cap πŸ’…. like, f00 and ff0000 both mean pure red πŸ”₯, and 999 and 999999 both mean medium gray. short version and long version, both slay, pick whichever your heart says.


πŸ‘‘ DESCRIPTION πŸ‘‘

this program alters a PDF document to add a solid background color behind the page contents. that's it. that's the whole gig. iconic. 🫢


😭 CAVEATS 😭

okay bestie listen up because this part matters and it's giving sad:

some PDF creation programs just assume a white background and then draw bogus white rectangles all over the screen that you usually cannot see. πŸ™ˆ rude of them honestly.

if your PDF has such rectangles, you can sometimes fix it, but it is a pain. the best recommendation is to recreate the original PDF using a smarter library, if possible. alternatively, you can contact Clotho Advanced Media for a commercial solution to this problem. so like. options exist. none of them are free of drama though. πŸ’€


πŸŽ€ CREDIT πŸŽ€

this feature was originally requested by Brent Cowgill. king behavior, we love a feature request that actually ships 🌈⭐


πŸ”₯ SEE ALSO πŸ”₯

  • CAM::PDF
  • rewritepdf

πŸ’œ AUTHOR πŸ’œ

See CAM::PDF


and that's the whole page, bestie!! πŸŽ€βœ¨ this was written for perl v5.36.0, dated 2022-12-08 β€” go forth and background-ify those PDFs, you absolute legend πŸ’…πŸ¦‹

πŸ“¦ where this page comes from