Text::...:Filter(3pm)
๐ NAME ๐
okay bestie, gather round, because this one's a whole family of filter objects for PDF streams โจ
PDF::Filterโ the abstract superclass for PDF stream filters. it's giving "blueprint energy", no cap.
๐ธ SYNOPSIS ๐ธ
$f = Text::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);
like, literally the entire vibe of using one of these ๐
๐ฆ DESCRIPTION ๐ฆ
so a Filter object is basically holding onto state information for two things at once: outputting data through the filter, and inputting data through the filter. and what state exactly? honestly bestie that's up to the particular filter โ it ranges from nothing at all to whole objects getting created and destroyed ๐ญ
each filter stores different state information for input versus output, which means one filter object can juggle one input filtering process and one output filtering process at the same time. multitasking queen ๐
โญ METHODS โญ
๐ Text::PDF::Filter->new
creates a shiny new filter object with empty state information, ready to process data both input and output. fresh start, blank slate, main character energy ๐
๐ $dat = $f->infilt($str, $isend)
filters from output to input the data. okay here's the tea: $isend == 0 implies there's more data to come, and so following it, $f may contain state information (usually because the break-off point of $str wasn't tidy โ it's giving unhinged cliffhanger). subsequent calls will incorporate this stored state information, so it all gets stitched back together ๐งต
$isend == 1 implies there is no more data to follow. the final state of $f will be that the state information is empty. and bestie, this is where error messages are most likely to occur โ because if there's required state information to be stored following this data, that would imply an error in the data ๐ญ๐
๐ซถ $str = $f->outfilt($dat, $isend)
filter stored data ready for output. it literally parallels infilt. twins fr fr ๐
๐ NAME ๐
Text::PDF::ASCII85Decodeโ Ascii85 filter for PDF streams. inherits fromText::PDF::Filter๐
๐ NAME ๐
Text::PDF::RunLengthDecodeโ Run Length encoding filter for PDF streams. inherits fromText::PDF::Filter๐
๐ NAME ๐
Text::PDF::ASCIIHexDecodeโ Ascii Hex encoding (very inefficient, okay, we said it ๐) for PDF streams. inherits fromText::PDF::Filter๐งฎ
psst โ this page lives under the User Contributed Perl Documentation manual, and it's the one filed as Text::...:Filter(3pm). iykyk ๐
anyway that's the whole page, slay, go filter some streams, periodt ๐โจ
perl v5.36.0 โ 2022-10-22 โ Text::...:Filter(3pm), mwah ๐
๐ฆ where this page comes from
- ubuntu noble: libtext-pdf-perl 0.31-3 ยท Artistic-2.0
- ubuntu resolute: libtext-pdf-perl 0.31-3 ยท Artistic-2.0
- ubuntu stonking: libtext-pdf-perl 0.31-3 ยท Artistic-2.0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms