pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tilman Hausherr <THaush...@t-online.de>
Subject Re: Cannot load pre existing PDF to access fields
Date Mon, 24 Aug 2015 07:20:44 GMT
Please upload the PDF somewhere.

Tilman

Am 24.08.2015 um 09:15 schrieb Tolen Miller:
> Hello,
>
> I am trying to load a fillable pdf file I created (using LiveCycle), but cannot seem
to get a hold of the fields. Is there anything obviously wrong with the code below or could
it be my form?
>
>                                  PDDocument pdfDoc = new PDDocument();
>              String fileTemplate = "D:\\PDFTemplates\\RPA_Template_Test.pdf";
>
>              try {
>                    pdfDoc = PDDocument.load(fileTemplate);
>                    PDDocumentCatalog docCatalog = pdfDoc.getDocumentCatalog();
>                    PDAcroForm pdfTemplate = docCatalog.getAcroForm();
>                    pdfDoc.getNumberOfPages();
>                    List<PDField> pdfFields = pdfTemplate.getFields();
>                    System.out.println( pdfFields.isEmpty() );  //always true
>              …
>
> Thank you,
> Tolen Miller
>
>


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


Mime
View raw message