Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF

TOPIC:

Compiling PDF forms 9 years 10 months ago #6451

  • noberasco
  • noberasco's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 48
  • Thank you received: 0
Hi,

I'm currently investigating whether this library is suitable for one of our applications.
Basically, we need to:
1) allow users to view and compile PDF forms
2) determine which fields have been compiled and which have not
3) programmatically extract values for compiled fields and store them in a data base
4) export compiled PDF

So far I'm playing with the library to achieve 1, but I'm getting mixed results.
I have been able to fill in text boxes, combo boxes and check boxes implementing PDFAnnotListener interface.

What about other field types (radio buttons, image fields, ...)? I don't seem to see support for them in PDFAnnotListener interface... Is PDFAnnotListener the only way to go, or other approaches are feasible?

Any suggestions are welcome.

Regards
Michele

Please Log in or Create an account to join the conversation.

Compiling PDF forms 9 years 10 months ago #6452

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
The SDK supports all the features you need..

But you need to use the classes under com.radaee.view instead of com.radaee.pdfex (deprecated)
You need to imoplement the listener: PDFReaderListener
in OnAnnotClicked(PDFVPage, Annotation) you can call: m_reader.PDFPerformAnnot

when you check PDFReader.PDFPerformAnnot you will find that it handles the different annotations type (including checkbox, radio buttons)
For editbox and combobox...they are handled in PDFReader.OnPDFSingleTapped(float, float)

Please Log in or Create an account to join the conversation.

Compiling PDF forms 9 years 10 months ago #6462

  • noberasco
  • noberasco's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 48
  • Thank you received: 0
Hi nermeen,

thank you for your reply.

I successfully changed my implementation to use PDFReaderListener instead of deprecated code.
I also managed to edit several form field types.

However, I'm still not able to edit radio buttons.

In every test PDF I tried, when calling GetCheckStatus() on a radio button I get value -1 (invalid control) instead of the expected values 2 or 3. As you can expect, calling PDFPerformAnnot() or SetRadio() on this annotations produce no effect.

Regards,
Michele

Please Log in or Create an account to join the conversation.

Compiling PDF forms 9 years 10 months ago #6463

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
The radio button requires the premium license...
If you are using the demo project it should work as it's already activated with a premium license...

if you are using your project and you don't have the license yet, you need to give your project "com.radaee.reader" as package name. (Eclipse:Right click you project -> Android Tools -> Rename Application package)


www.androidpdf.mobi/documentation/javado...tion.html#SetRadio()

Please Log in or Create an account to join the conversation.

Compiling PDF forms 9 years 10 months ago #6465

  • noberasco
  • noberasco's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 48
  • Thank you received: 0
Hi,

I'm testing using package name "com.radaee.reader" and premium license is active.
In fact, other premium-only methods such as GetComboItem() or GetFieldType() do work as expected.

Also, the PDF files I tried are valid, and for instance I can edit the radio buttons in there using other software such as Adobe Reader.

Another question, are image fields supported?
Documentation for GetFieldType() does not mention them, and indeed I get 0 (unknown) when I select an image field.

My feeling is that either the documentation is missing some information, or the library only supports a subset of field types.

Regards,
Michele

Please Log in or Create an account to join the conversation.

Compiling PDF forms 9 years 10 months ago #6468

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
Can you send us a sample pdf with radio buttons and image fields...

You can attach it here, or send to This email address is being protected from spambots. You need JavaScript enabled to view it.

Please Log in or Create an account to join the conversation.

Last edit: by marcoP.
Powered by Kunena Forum