pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilad Denneboom <gilad.denneb...@gmail.com>
Subject Re: Input fields in PDF
Date Thu, 10 Mar 2016 09:31:24 GMT
No, that won't work. You can share it via something like Dropbox, Google
Drive, etc.

On Thu, Mar 10, 2016 at 10:20 AM, Piotr Kulbicki <pkulbicki@gmail.com>
wrote:

> It doesn't return null. It returns empty list. From AR is it possible to
> export data into xml.
> Should I attache file into email?
>
> With best regards
> Peter
>
> Dnia 10.03.2016 o godz. 10:14 Gilad Denneboom <gilad.denneboom@gmail.com>
> napisaƂ(a):
>
> > If getAcroForm returns null it means there are no form fields in the
> file,
> > at least not any valid ones...
> >
> > On Thu, Mar 10, 2016 at 12:23 AM, Ruggentaler, JR <
> > JR.Ruggentaler@experian.com> wrote:
> >
> >> How do I list and set/update the input fields in the attached PDF
> document
> >> using PDFBox? In the code snippet below form is null. If my PDF does not
> >> contain a PDAcroForm how do I access the input fields?
> >>
> >> try {
> >>
> >> pdf = PDDocument.load(new File(fileName));
> >>
> >> PDAcroForm form = pdf.getDocumentCatalog().getAcroForm();
> >>
> >> if (form == null) {
> >>
> >> System.err.println("Error: This PDF does not contain a form.");
> >>
> >> } else {
> >>
> >> for(PDField pdField : form.getFields()){
> >>
> >>    System.out.println(pdField.getValueAsString());
> >>
> >> }
> >>
> >> }
> >>
> >> } finally {
> >>
> >> close(fdf);
> >>
> >> close(pdf);
> >> }
> >>
> >>
> >> JR
> >>
> >>
> >> ---------------------------------------------------------------------
> >> 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