PDF::Bu...:Filter(3)
๐ PDF::Builder::Basic::PDF::Filter โ the abstract superclass era โจ
okay bestie so this is PDF::Builder::Basic::PDF::Filter, straight out of the User Contributed Perl Documentation section, and it's giving abstract superclass main character energy ๐. It's the parent vibe for PDF stream filters, iykyk.
๐ฆ NAME
PDF::Builder::Basic::PDF::Filter โ the abstract superclass for PDF stream filters. it's the blueprint, the template, the mother of all filters, periodt ๐
โจ SYNOPSIS
$f = PDF::Builder::Basic::PDF::Filter->new();
$str = $f->outfilt($str, 1);
print OUTFILE $str;
while (read(INFILE, $dat, 4096))
{ $store .= $f->infilt($dat, 0); }
$store .= $f->infilt("", 1);
look at that. chef's kiss. ๐ค
๐ธ DESCRIPTION
so a Filter object is literally just a little container holding state information for the whole process of outputting and inputting data through the filter. how much state? honestly depends on the filter โ it could be absolutely nothing, or it could be whole objects getting created and destroyed. no cap, the range is that wide. ๐
and here's the cute part: every filter stores different state info for input vs output, which means one single filter can handle one input filtering process and one output filtering process at the same time. multitasking queen ๐
๐ METHODS
๐ new
PDF::Builder::Basic::PDF::Filter->new()
creates a brand new filter object with empty state information, all fresh and ready to process data in both directions โ input and output. it's a clean slate, a blank canvas, a new semester. ๐ซถ
๐ infilt
$dat = $f->infilt($str, $isend)
this one filters from output to input the data. ๐
now listen closely because this matters:
$isend == 0means there is more data to come, so after this call$fmay still be holding onto state information โ usually because the break-off point of$strwasn't tidy. subsequent calls will pick up and incorporate that stored state. it's like saving your game mid-level ๐ฎ$isend == 1means there is no more data to follow. the final state of$fwill be that the state information is empty. and ngl, this is where error messages are most likely to pop off โ because if there's still required state information that needs storing after this data, that would imply an error in the data. ๐จ
bestie. if you hit an error here, the data itself is sus. not you, the data.
๐ outfilt
$str = $f->outfilt($dat, $isend)
filters stored data so it's ready for output. it parallels infilt โ same energy, opposite direction. ๐
๐ sign-off
and that's the whole page, bestie!! ๐ this was pulled from perl v5.42.0, dated 2026-01-17 โ iconic, timeless, and forever in the PDF::Bu...:Filter(3) hall of fame. go forth and filter responsibly. โจ๐ฆ๐
๐ฆ where this page comes from
- fedora 44: perl-PDF-Builder 3.028-2.fc44 ยท LGPL-2.1-or-later AND LGPL-2.1-only AND MIT
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms