The PDF doesn't have fields but only widget annotations. You should make sure that - you create form fields - add the widget annotation to the form field
See https://issues.apache.org/jira/browse/PDFBOX-3667 BR Maruan > in the view menu, go to "show internal structure" and then go to root, > acroform, fields. If there are no fields then this isn't a correct acroform > PDF. > > Compare it with another form pdf e.g. a tax form. > > 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: AW: Re: Forms elements not being recognised. > Datum: 19.06.2019, 15:06 Uhr > An: users@pdfbox.apache.org > > > > > Hi Tilman, > > Thank you for responding.. > > Below is a gist that shows a screen shot of the file opened in the pdf > debugger.. > > I wish I had used the tool to begin with!!! > > https://gist.github.com/kodjobaah/8e61f8a56860c8af907196f4b4127cdb > <https://gist.github.com/kodjobaah/8e61f8a56860c8af907196f4b4127cdb> > > I have also added the original document to one drive. > > https://1drv.ms/b/s!AmNEMt7g6Kbuhhpm9GYVfWlvAhIO?e=rBM3Y2 > <https://1drv.ms/b/s!AmNEMt7g6Kbuhhpm9GYVfWlvAhIO?e=rBM3Y2> > > > Thanks, > Kodjo > > > On 19/06/2019, 12:22, "Tilman Hausherr" <thaush...@t-online.de > <mailto:thaush...@t-online.de> > wrote: > > > 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_sen > <https://kommunikationsdienste.t-online.de/redirects/email_app_android_sen> > > dmail_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 <mailto:users@pdfbox.apache.org> > > > > > > > > > > After further investigation.. It appears the form fields are stored as > > annotations. > > > > From: Kodjo Afriyie - iSite Eng <kodjo.afriyi...@bbc.co.uk > <mailto:kodjo.afriyi...@bbc.co.uk> > > <mailto:kodjo.afriyi...@bbc.co.uk <mailto:kodjo.afriyi...@bbc.co.uk> > > <mailto:kodjo.afriyi...@bbc.co.uk <mailto:kodjo.afriyi...@bbc.co.uk> > > <mailto:kodjo.afriyi...@bbc.co.uk <mailto:kodjo.afriyi...@bbc.co.uk> > >> > > Reply-To: "users@pdfbox.apache.org <mailto:users@pdfbox.apache.org> > <mailto:users@pdfbox.apache.org <mailto:users@pdfbox.apache.org> > > > <mailto:users@pdfbox.apache.org <mailto:users@pdfbox.apache.org> <mailto: > users@pdfbox.apache.org <mailto:users@pdfbox.apache.org> > >" < > > users@pdfbox.apache.org <mailto:users@pdfbox.apache.org> <mailto: > users@pdfbox.apache.org <mailto:users@pdfbox.apache.org> > <mailto: > > users@pdfbox.apache.org <mailto:users@pdfbox.apache.org> <mailto: > users@pdfbox.apache.org <mailto:users@pdfbox.apache.org> > >> > > Date: Wednesday, 19 June 2019 at 12:08 > > To: "users@pdfbox.apache.org <mailto:users@pdfbox.apache.org> <mailto: > users@pdfbox.apache.org <mailto:users@pdfbox.apache.org> > <mailto: > > users@pdfbox.apache.org <mailto:users@pdfbox.apache.org> <mailto: > users@pdfbox.apache.org <mailto:users@pdfbox.apache.org> > >" < > > users@pdfbox.apache.org <mailto:users@pdfbox.apache.org> <mailto: > users@pdfbox.apache.org <mailto:users@pdfbox.apache.org> > <mailto: > > users@pdfbox.apache.org <mailto:users@pdfbox.apache.org> <mailto: > users@pdfbox.apache.org <mailto:users@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> < > 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> > > <http://document.getDocumentCatalog> <http://document.getDocumentCatalog>> > ; (); > > PDAcroForm acroFom = docCatalog.getAcroForm > <http://docCatalog.getAcroForm> > > <http://docCatalog.getAcroForm> <http://docCatalog.getAcroForm>> ; > > (); > > List<PDField> fields = acroForm.getFields <http://acroForm.getFields> < > http://acroForm.getFields> <http://acroForm.getFields>> ; (); > > But when I create the document using pdf box it is able to recognise the > > form elements. > > > > Thanks, > > Kodjo > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org > <mailto:users-unsubscr...@pdfbox.apache.org> > For additional commands, e-mail: users-h...@pdfbox.apache.org > <mailto:users-h...@pdfbox.apache.org> > -- Maruan Sahyoun FileAffairs GmbH Josef-Schappe-Straße 21 40882 Ratingen Tel: +49 (2102) 89497 88 Fax: +49 (2102) 89497 91 sahy...@fileaffairs.de www.fileaffairs.de Geschäftsführer: Maruan Sahyoun Handelsregister: AG Düsseldorf, HRB 53837 UST.-ID: DE248275827 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org For additional commands, e-mail: users-h...@pdfbox.apache.org