pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kodjo Afriyie - iSite Eng <kodjo.afriyi...@bbc.co.uk>
Subject RE: Problems accessing javascript:
Date Tue, 23 Jul 2019 19:37:38 GMT
Hi Tilman:

This contains the files re-named with .txt extension and placed in a zip file.

https://1drv.ms/u/s!AmNEMt7g6KbuhiLACsvRe4bcHogB?e=bNRew0

I tried the following:
                COSObject name = document.getDocument().getObjectByType(COSName.AA);
                System.out.println("AA:"+name);
Which printed null..

Then I tried the following which also printed null:

Which also printed null:
                COSObject pagess = document.getDocument().getObjectByType(COSName.PAGES);
                COSBase name = pagess.getDictionaryObject(COSName.AA);
                System.out.println("AA:"+name);

Kodjo
________________________________________
From: Tilman Hausherr [THausherr@t-online.de]
Sent: 23 July 2019 19:05
To: users@pdfbox.apache.org
Subject: Re: Problems accessing javascript:

Hi,

If you get the dictionary, you could call
COSDictionary.removeItem(COSName.O), or do the same with the AA element.

To get the dictionary from an element, usually .getCOSObject() delivers.

To get a better look at the structure of a PDF, try PDFDebugger.

Like I said, rename the PDF to .TXT and put that one into a ZIP and
upload that one. This way one could have a look without an antivirus
blocking it.

Tilman

Am 23.07.2019 um 16:44 schrieb Kodjo Afriyie - iSite Eng:
>
> I have tried all the possible ways but i can not remove the javascript
> element:
>
>
> *PDF Comment '%PDF-1.5\n'*
> *
> *
> *PDF Comment '%öäüß\n'*
> *
> *
> *obj 1 0*
> * Type: /Catalog*
> * Referencing: 2 0 R, 3 0 R, 4 0 R, 5 0 R*
> *
> *
> *  <<*
> *    /Type /Catalog*
> *    /Outlines 2 0 R*
> *    /Pages 3 0 R*
> *    /Names 4 0 R*
> *    /AA 5 0 R*
> *  >>*
> *
> *
> *
> *
> *obj 6 0*
> * Type:*
> * Referencing:*
> *
> *
> *  <<*
> *  >>*
> *
> *
> *
> *
> *obj 2 0*
> * Type: /Outlines*
> * Referencing:*
> *
> *
> *  <<*
> *    /Type /Outlines*
> *    /Count 0*
> *  >>*
> *
> *
> *
> *
> *obj 3 0*
> * Type: /Pages*
> * Referencing: 7 0 R*
> *
> *
> *  <<*
> *    /Type /Pages*
> *    /Kids [7 0 R]*
> *    /Count 1*
> *  >>*
> *
> *
> *
> *
> *obj 4 0*
> * Type:*
> * Referencing:*
> *
> *
> *  <<*
> *  >>*
> *
> *
> *
> *
> *obj 5 0*
> * Type:*
> * Referencing:*
> *
> *
> *  <<*
> *  >>*
> *
> *
> *
> *
> *obj 7 0*
> * Type: /Page*
> * Referencing: 3 0 R, 8 0 R*
> *
> *
> *  <<*
> *    /Type /Page*
> *    /Parent 3 0 R*
> *    /MediaBox [184 105 295 275]*
> *    /AA*
> *      <<*
> *        /O*
> *          <<*
> *            /JS 8 0 R*
> *            /S /JavaScript*
> *          >>*
> *      >>*
> *  >>*



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Mime
View raw message