{
    "mode": "perldoc",
    "parameter": "PDF::API2::Basic::PDF::Filter",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/PDF%3A%3AAPI2%3A%3ABasic%3A%3APDF%3A%3AFilter/json",
    "generated": "2026-07-05T13:51:26Z",
    "synopsis": "$f = PDF::API2::Basic::PDF::Filter->new;\n$str = $f->outfilt($str, 1);\nprint OUTFILE $str;\nwhile (read(INFILE, $dat, 4096))\n{ $store .= $f->infilt($dat, 0); }\n$store .= $f->infilt(\"\", 1);",
    "sections": {
        "NAME": {
            "content": "PDF::API2::Basic::PDF::Filter - Abstract superclass for PDF stream filters\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "$f = PDF::API2::Basic::PDF::Filter->new;\n$str = $f->outfilt($str, 1);\nprint OUTFILE $str;\n\nwhile (read(INFILE, $dat, 4096))\n{ $store .= $f->infilt($dat, 0); }\n$store .= $f->infilt(\"\", 1);\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "A Filter object contains state information for the process of outputting and inputting data\nthrough the filter. The precise state information stored is up to the particular filter and may\nrange from nothing to whole objects created and destroyed.\n\nEach filter stores different state information for input and output and thus may handle one\ninput filtering process and one output filtering process at the same time.\n",
            "subsections": []
        },
        "METHODS": {
            "content": "PDF::API2::Basic::PDF::Filter->new\nCreates a new filter object with empty state information ready for processing data both input\nand output.\n\n$dat = $f->infilt($str, $isend)\nFilters from output to input the data. Notice that $isend == 0 implies that there is more data\nto come and so following it $f may contain state information (usually due to the break-off point\nof $str not being tidy). Subsequent calls will incorporate this stored state information.\n\n$isend == 1 implies that there is no more data to follow. The final state of $f will be that the\nstate information is empty. Error messages are most likely to occur here since if there is\nrequired state information to be stored following this data, then that would imply an error in\nthe data.\n\n$str = $f->outfilt($dat, $isend)\nFilter stored data ready for output. Parallels \"infilt\".\n",
            "subsections": []
        }
    },
    "summary": "PDF::API2::Basic::PDF::Filter - Abstract superclass for PDF stream filters",
    "flags": [],
    "examples": [],
    "see_also": []
}