Jump to content
Server Maintenance This Week. ×

Scribe reading Acrofields


This topic is 4832 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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...

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This topic is 4832 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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