pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Balaji Venkatamohan <bvenk...@tibco.com>
Subject Re: How to flatedecode and find all acroform fields in a compressed PDF
Date Tue, 19 May 2015 21:03:41 GMT
Moreover, for every page of the compressed PDF (there are 3 pages), I tried
getting the COSStream for each of the page :

            PDPage firstPage=(PDPage)
            COSStream stream=pdStream.getStream();

In the above code snippet, the object stream, when analyzed in debug mode,
has the following:

The line from the compressed PDF as opened with Notepad++ is :

         <</Filter/FlateDecode/Length 5675>>stream

>From this point on, using the COSStream object for every page, how can I
decompress and find out the acroform fields given that the unFilteredStream
object is null for COSStream?

On Tue, May 19, 2015 at 1:38 PM, Balaji Venkatamohan <bvenkata@tibco.com>

> Thank you for your response Tilman.
> I had previously tried using the WriteDecodedDoc for my compressed PDF and
> I tried to get the number of acro form fields present in  the output file
> generated by WriteDecodedDoc. The API still could not find the acro form
> fields in the generated decompressed file.
>  Also the decompressed file generated is 75 KB which is far less than the
> original decompressed file which I have (1.6 MB) though I could edit the
> acro form fields using acrobat reader.
> Thanks,
> Balaji
> On Tue, May 19, 2015 at 1:18 PM, Tilman Hausherr <THausherr@t-online.de>
> wrote:
>> Am 19.05.2015 um 21:35 schrieb Balaji Venkatamohan:
>>> My question is: how do I flatedecode a PDF so that I can find all the
>>> acroform fields within it. ANy help or pointers would be highly
>>> appreciated.
>> You could try the WriteDecodedDoc option of the command line app
>> https://pdfbox.apache.org/1.8/commandline.html#writeDecodeDoc
>> Maybe you can have further ideas by comparing the two files with
>> NOTEPAD++.... however the two files might have their objects in different
>> order.
>> Tilman
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: users-help@pdfbox.apache.org

  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message