SETPDFBACKGROUND(1p)
π 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::PDFrewritepdf
π 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
- 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