You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Kodjo Afriyie - iSite Eng <ko...@bbc.co.uk> on 2019/06/19 12:08:19 UTC

Forms elements not being recognised.

I used the tool below to create the attached document.

https://www.sejda.com/desktop

The following code returns an empty list for the form elements.
PDDocumentCatalog docCatalog = document.getDocumentCatalog();
PDAcroForm acroFom = docCatalog.getAcroForm();
List<PDField> fields = acroForm.getFields();

But when I create the document using pdf box it is able to recognise the form elements.

Thanks,
Kodjo

AW: Re: Forms elements not being recognised.

Posted by Tilman Hausherr <TH...@t-online.de>.
Please upload the PDF to a sharehoster and mention what version you are 
using.

Also open the file with PDFDebugger and habe a look at the acroform. And 
read the java javadoc of getFields().

Tilman


------------------------------------------------------------------------
Gesendet mit der Telekom Mail App
<https://kommunikationsdienste.t-online.de/redirects/email_app_android_sendmail_footer>



--- Original-Nachricht ---
Von: Kodjo Afriyie - iSite Eng
Betreff: Re: Forms elements not being recognised.
Datum: 19.06.2019, 14:17 Uhr
An: users@pdfbox.apache.org




After further investigation.. It appears the form fields are stored as 
annotations.

From: Kodjo Afriyie - iSite Eng <kodjo.afriyie01@bbc.co.uk
<ma...@bbc.co.uk> <mailto:kodjo.afriyie01@bbc.co.uk
<ma...@bbc.co.uk> >>
Reply-To: "users@pdfbox.apache.org <ma...@pdfbox.apache.org> 
<mailto:users@pdfbox.apache.org <ma...@pdfbox.apache.org> >" <
users@pdfbox.apache.org <ma...@pdfbox.apache.org> <mailto:
users@pdfbox.apache.org <ma...@pdfbox.apache.org> >>
Date: Wednesday, 19 June 2019 at 12:08
To: "users@pdfbox.apache.org <ma...@pdfbox.apache.org> <mailto:
users@pdfbox.apache.org <ma...@pdfbox.apache.org> >" <
users@pdfbox.apache.org <ma...@pdfbox.apache.org> <mailto:
users@pdfbox.apache.org <ma...@pdfbox.apache.org> >>
Subject: Forms elements not being recognised.

I used the tool below to create the attached document.

https://www.sejda.com/desktop <https://www.sejda.com/desktop>

The following code returns an empty list for the form elements.
PDDocumentCatalog docCatalog = document.getDocumentCatalog
<http://document.getDocumentCatalog> ();
PDAcroForm acroFom = docCatalog.getAcroForm <http://docCatalog.getAcroForm> 
();
List<PDField> fields = acroForm.getFields <http://acroForm.getFields> ();

But when I create the document using pdf box it is able to recognise the 
form elements.

Thanks,
Kodjo

Re: Forms elements not being recognised.

Posted by Kodjo Afriyie - iSite Eng <ko...@bbc.co.uk>.
After further investigation.. It appears the form fields are stored as annotations.

From: Kodjo Afriyie - iSite Eng <ko...@bbc.co.uk>>
Reply-To: "users@pdfbox.apache.org<ma...@pdfbox.apache.org>" <us...@pdfbox.apache.org>>
Date: Wednesday, 19 June 2019 at 12:08
To: "users@pdfbox.apache.org<ma...@pdfbox.apache.org>" <us...@pdfbox.apache.org>>
Subject: Forms elements not being recognised.

I used the tool below to create the attached document.

https://www.sejda.com/desktop

The following code returns an empty list for the form elements.
PDDocumentCatalog docCatalog = document.getDocumentCatalog();
PDAcroForm acroFom = docCatalog.getAcroForm();
List<PDField> fields = acroForm.getFields();

But when I create the document using pdf box it is able to recognise the form elements.

Thanks,
Kodjo