Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Scribe reading Acrofields

Featured Replies

Quick techy question

when you are returning Acrofield names from a PDF are you reading the Acrofields, as per iText examples or are you reading from the annotations.

I am looking at the plug in but it returns list in a different order to the function I have already written which would require changing some logic in the XML parse functions I use...

Scribe tries to return the field names in the order they appear in the document. There may be a discrepancy with the version of iText you're using, I seem to recall some older versions not sorting the field lists correctly. What version of itext are you using, and how are you getting the field list?

-Sam

  • Author

5.0.5

as per the examples in the book


// NamesXFA(fm_FileIn, fm_FileOut)

// JR 05_03_10

// v1

// takes a PDF form and parses XML content



import com.itextpdf.text.pdf.*



out = new PrintStream(new FileOutputStream(fm_FileOut))

reader = new PdfReader(fm_FileIn)

form = reader.getAcroFields()

xfa = form.getXfa()

out.println(xfa.isXfaPresent() ? "XFA form" : "AcroForm")

fields = form.getFields().keySet()

for (String key : fields) {

    out.println(key)

}

out.flush()

out.close()

return true

this gives me a different result to ScribeDocListFields

Are the fields the same, but the order is different? This is likely because Scribe is using an older version of iTex, for licensing reasons.

  • Author

Yes, same fields, different order. That's most likely solution Sam

I will try it out with an earlier iText jar that I have and let you know.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.