pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Al Grant <bigal...@gmail.com>
Subject Re: Developer Help
Date Thu, 11 Feb 2016 21:00:44 GMT
Hi Gilad,

Just trying to get started with your sample.

Doesnt pdfDocument need to be assigned to the file object in the previous
line?

Regards,

-Al


On Fri, Feb 12, 2016 at 2:38 AM, Gilad Denneboom <gilad.denneboom@gmail.com>
wrote:

> If the data is located in form fields then PrintTextLocations is not going
> to be helpful, but you don't need it.
> Accessing form fields using PDFBox is very easy. You can use this code
> example to print out the field names and their values to the console:
>
>  PDDocument pdfDocument = PDDocument.load(fileName);
>  PDDocumentCatalog docCatalog = pdfDocument.getDocumentCatalog();
>  PDAcroForm acroForm = docCatalog.getAcroForm();
>  List fields = acroForm.getFields();
>  Iterator fieldsIter = fields.iterator();
>  while (fieldsIter.hasNext()) {
>      PDField field = (PDField) fieldsIter.next();
>      System.out.println(field.getPartialName() + ":" + field.getValue());
>  }
>
>
> On Thu, Feb 11, 2016 at 2:32 PM, Al Grant <bigal.nz@gmail.com> wrote:
>
> > Hello,
> >
> > I am looking for some help. I am reporting this because I can add some
> more
> > information.
> >
> > I have a form (a sample of which you can view here :
> >
> >
> https://drive.google.com/file/d/0B3rjaapNHpJJa1pfc1l1M2NzSEk/view?usp=sharing
> > )
> >
> > Basically the information in the form is tabular. My reading so far tells
> > me I should using extract text by area and to get those coordinates
> > printtextlocations.
> >
> > If any developers out there are able to help, since my coding skills are
> > rusty I would really appreciate it.
> >
> > Even if it was just a sample of code for one field which I can then copy
> > and reuse.
> >
> > Thanks
> >
> > -Al
> >
> >
> > --
> > "Beat it punk!"
> > - Clint Eastwood
> >
>



-- 
"Beat it punk!"
- Clint Eastwood

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