Re: Deleting images from a PDF
"Mr. Shawn H. Corey" <[email protected]> Tue, 25 Mar 2008 07:05:01 -0400
| Newsgroups | gmane.comp.lang.perl.modules.pdfapi2 |
|---|---|
| Message-ID | <1206443101.6726.8.camel@mungo> |
On Mon, 2008-03-24 at 22:23 +0000, Roger Burton West wrote:
> Just in case there are any humans on this list, and not just spambots...
>
> I want to write a filter which will remove all bitmapped images from its
> input PDF. (This is for viewing on mobile devices with small screens.)
> It seems to me that what I ought to be doing is enumerating the objects
> in the source PDF and copying to the destination PDF all of those which
> aren't bitmaps or references to bitmaps. Does this seem plausible, or is
> it hopelessly naif? If it does seem plausible, how does one enumerate
> objects using PDF::API2?
>
> Roger
>
Plausible, yes, even possible.
However, PDF::API2 does not provide methods to access the content. Oh,
it's there but to access it, you'll have write the code to unfilter it,
parse it, then enumerate it.
--
Just my 0.00000002 million dollars worth,
Shawn
+------------\
| Shangri La \
| 40,000 KM /
+------------/