pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tolen Miller <tolenmil...@gmail.com>
Subject Re: Cannot load pre existing PDF to access fields
Date Mon, 24 Aug 2015 19:20:49 GMT
Ok, it sounds like an implementation issue on the IBM side.  I will head to
their forums.  Thank you for the help.

On Mon, Aug 24, 2015 at 10:51 AM Tilman Hausherr <THausherr@t-online.de>
wrote:

> Am 24.08.2015 um 19:13 schrieb Tolen Miller:
> > Currently, I am using version 1.8.10 (pdfbox-app-1.8.10.jar).
> >
> >
> >
> > Is there a minimum Java version for this jar? I am importing this into an
> > IBM Domino implementation, which runs an older version of Java. Perhaps
> > that is the issue?
>
> 1.5 for 1.8.10.
>
> I get a lot of stuff when using the printFields example.
>
> Tilman
>
> >
> > On Mon, Aug 24, 2015 at 6:52 AM Maruan Sahyoun <sahyoun@fileaffairs.de>
> > wrote:
> >
> >> Hi,
> >>
> >> which version of PDFBox are you using?
> >>
> >> This code
> >>
> >>          PDDocument doc = PDDocument.load(new
> >> File("RPA_Template_Test.pdf"));
> >>          PDAcroForm form = doc.getDocumentCatalog().getAcroForm();
> >>
> >> System.out.println(form.getFields().get(0).getFullyQualifiedName());
> >>
> >> prints
> >>
> >> RPA[0]
> >>
> >> which is the first field in that form.
> >>
> >> BR
> >> Maruan
> >>
> >>
> >>> Am 24.08.2015 um 15:29 schrieb Tolen Miller <tolenmiller@gmail.com>:
> >>>
> >>> I'm sorry, I forgot to anonomize. Here is another link:
> >>> http://1drv.ms/1MIu7ok.
> >>>
> >>> On Mon, Aug 24, 2015 at 6:23 AM, Tolen Miller <tolenmiller@gmail.com>
> >> wrote:
> >>>> The test PDF is located here: http://1drv.ms/1Ef1RIJ
> >>>>
> >>>> On Mon, Aug 24, 2015 at 12:36 AM, Maruan Sahyoun <
> >> sahyoun@fileaffairs.de>
> >>>> wrote:
> >>>>
> >>>>> Hi,
> >>>>>
> >>>>>> Am 24.08.2015 um 09:15 schrieb Tolen Miller <tolenmiller@msn.com>:
> >>>>>>
> >>>>>> 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();
> >>>>> if there is a PDAcroForm but there are no fields it's very likely
a
> >>>>> dynamic XFA form. If you are using PDFBox 2.0.0 you can use
> >>>>> PDAcroForm.xfaIsDynamic(). If that returns true then you have a
> >> dynamic XFA
> >>>>> form. For PDFBox 1.8.x you can use PDAcroForm.getXFA(). If that
is
> not
> >> null
> >>>>> and getFields() is empty again this means that you have a dynamic
XFA
> >> form.
> >>>>> Dynamic XFA forms do not contain 'regular' AcroForm fields.
> >>>>>
> >>>>> What is it what you would like to do with the form?
> >>>>>
> >>>>> BR
> >>>>> Maruan
> >>>>>
> >>>>>
> >>>>>>                   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
> >>>>>
> >>>>>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message