Hi Andreas,

Thanks for your help, but I am not sure where to find this 'Do' line in
pagedrawer.properties. I see that there is a package in the pdfbox jar
file that is called org.apache.pdfbox.util.operator.pagedrawer, but I'm
not sure where the 'do' line is. I'm guessing its somewhere within the
invoke.class file but I am unable to find it.

Also after disabling this, what operators would I need run on the pdf file?

Thanks for your assistance.

Regards,
Nicholas Tiong

On 15/10/12 4:37 AM, "Andreas Lehmkuehler" <andr...@lehmi.de> wrote:

>Hi,
>
>Am 04.10.2012 02:58, schrieb Nicholas Tiong:
>> Hi,
>>
>> I'm new here and I've just discovered PDFBox. My experience with coding
>>is
>> fairly basic.
>>
>> Based on a sample code I found here,
>> 
>>http://stackoverflow.com/questions/6831194/how-can-i-remove-all-images-dr
>>awi
>> ngs-from-a-pdf-file-and-leave-text-only-in-java
>That code removes only those images which are directly referenced within
>the 
>resources of a page/document. But those which are part of an other
>XObject won't 
>be removed.
>
>> It seems that it should work for my purpose; that is to remove all
>>images
>> from a PDF whilst preserving formatting. Basically I plan to print a
>>large
>> document in black and white on a laser printer without pictures, and
>>then
>> run it through a colour inkjet for the pictures.
>>
>> Could anyone help me figure out why the code in the link above does not
>> work? It creates the 'stripped' file and throws no exceptions but all
>>the
>> images are still within.
>>
>> I've found another PDFBox code that extract images and saves it to file
>> which works for all individual pictures in the document, so I am
>>certain the
>> PDF is formatted correctly with pictures embedded within it.
>>
>> Any help would be much appreciated.
>I guess it's easier to deactivate the "draw image" operator. Commenting
>the "Do" 
>line in PageDrawer.properties should do the trick.
>
>> Regards,
>> Nicholas Tiong
>
>BR
>Andreas Lehmkühler
>


Reply via email to