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

TOPIC:

Compiling PDF forms 9 years 10 months ago #6488

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
Not necessarily,

it is tested with the demo project..

Note that if you are using the demo project, you need to click on the radio button then click the Do button

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

Last edit: by marcoP.

Compiling PDF forms 9 years 10 months ago #6489

  • noberasco
  • noberasco's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 48
  • Thank you received: 0
I did test it in both the demo project and my own test code.

In the demo project, when clicking the Do button on any radio button in the PDF you attached nothing happens (while it does work with the check boxes present in the same document)

In my own test code (which implements PDFReaderListener) I get the same behaviour.

Note that there is another issue with this particular PDF file. If I tap and hold the text field to make the keyboard appear, the application will crash. This is strange, it does not happen with text fields in other PDF files.

This is the stack trace:

06-20 10:50:38.681: E/AndroidRuntime(16556): FATAL EXCEPTION: main
06-20 10:50:38.681: E/AndroidRuntime(16556): android.view.WindowManager$BadTokenException: Unable to add window -- token android.view.ViewRootImpl$W@40f40e40 is not valid; is your activity running?
06-20 10:50:38.681: E/AndroidRuntime(16556): at android.view.ViewRootImpl.setView(ViewRootImpl.java:567)
06-20 10:50:38.681: E/AndroidRuntime(16556): at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:246)
06-20 10:50:38.681: E/AndroidRuntime(16556): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
06-20 10:50:38.681: E/AndroidRuntime(16556): at android.widget.PopupWindow.invokePopup(PopupWindow.java:993)
06-20 10:50:38.681: E/AndroidRuntime(16556): at android.widget.PopupWindow.showAtLocation(PopupWindow.java:847)
06-20 10:50:38.681: E/AndroidRuntime(16556): at android.widget.PopupWindow.showAtLocation(PopupWindow.java:811)
06-20 10:50:38.681: E/AndroidRuntime(16556): at android.widget.Editor$PinnedPopupWindow.updatePosition(Editor.java:2312)
06-20 10:50:38.681: E/AndroidRuntime(16556): at android.widget.Editor$PinnedPopupWindow.show(Editor.java:2269)
06-20 10:50:38.681: E/AndroidRuntime(16556): at android.widget.Editor$SuggestionsPopupWindow.show(Editor.java:2511)
06-20 10:50:38.681: E/AndroidRuntime(16556): at android.widget.Editor.showSuggestions(Editor.java:1797)
06-20 10:50:38.681: E/AndroidRuntime(16556): at android.widget.Editor$1.run(Editor.java:1693)
06-20 10:50:38.681: E/AndroidRuntime(16556): at android.os.Handler.handleCallback(Handler.java:725)
06-20 10:50:38.681: E/AndroidRuntime(16556): at android.os.Handler.dispatchMessage(Handler.java:92)
06-20 10:50:38.681: E/AndroidRuntime(16556): at android.os.Looper.loop(Looper.java:137)
06-20 10:50:38.681: E/AndroidRuntime(16556): at android.app.ActivityThread.main(ActivityThread.java:5039)
06-20 10:50:38.681: E/AndroidRuntime(16556): at java.lang.reflect.Method.invokeNative(Native Method)
06-20 10:50:38.681: E/AndroidRuntime(16556): at java.lang.reflect.Method.invoke(Method.java:511)
06-20 10:50:38.681: E/AndroidRuntime(16556): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
06-20 10:50:38.681: E/AndroidRuntime(16556): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
06-20 10:50:38.681: E/AndroidRuntime(16556): at dalvik.system.NativeStart.main(Native Method)

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

Compiling PDF forms 9 years 10 months ago #6490

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
This is strange, as using the demo project on both real device and simulator..it is working with out problems

both radio buttons and text field, (note that for text field non need to tap and hold, a tap is sufficient to open the keyboard)

Try with the latest version..2.9.11beta1

What is the specs of the device you are testing with?

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

Compiling PDF forms 9 years 10 months ago #6492

  • noberasco
  • noberasco's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 48
  • Thank you received: 0
Tried on a few more devices.

The text field crash happened only on a single device:
- ASUS Transformer Pad TF300TG, updated to latest officially available release (Android 4.2.1)

I see that you already have a bug open for this issue, with the same stack trace I reported here.

Text fields did, however, need more than a tap for the keyboard to appear. In fact, in my own test code I explicitly tell the keyboard to come up when user taps on a text field.

Radio buttons did not work on any of them (tested Android versions ranging from 4.1.2 to 4.4.2).

Later today I'll retry with the beta version of the SDK.
BTW, do you have preferred versions of ADT that I should use?
Should I set a particular target SDK version when I compile?
Currently I'm using latest version of ADT (22.6.3) and target SDK version is not set in the sample project.

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

Compiling PDF forms 9 years 10 months ago #6494

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
The new Version 2.9.11beta2 fixes teh issue with the radio buttons in your pdfs..

it continue to work with the demo project

BTW, do you have preferred versions of ADT that I should use? No
Should I set a particular target SDK version when I compile? No

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

Compiling PDF forms 9 years 10 months ago #6495

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

just tried the new beta version.

It does indeed fix my issue with radio buttons.
Thank you for that!

The textbox crash issue for my ASUS device is still present, but of course you did not mention that in the change log ;-)

Since in the change log you mentioned that you implemented function ExportForm(), which is exactly what I will need to extract compiled form data, I gave it a test run.
Results are good. Only incorrect thing I did notice is that combo boxes seems to report the selected value twice.
Below you will find an example.

Regards,
Michele

<?xml version="1.0" encoding="utf-8"?>
<fields>
<Given Name="" Text="" Box="">Michele</Given>
<Family Name="" Text="" Box="">Noberasco</Family>
<House nr="" Text="" Box=""></House>
<Address Text="" Box=""></Address>
<Postcode Text="" Box=""></Postcode>
<Country Combo="" Box="">ItalyItaly</Country>
<Height Formatted="" Field="">173</Height>
<City Text="" Box=""></City>
<Driving License="" Check="" Box="">Yes</Driving>
<Favourite Colour="" List="" Box="">GreenGreen</Favourite>
<Language Check="" Box="">Yes</Language>
<Language Check="" Box="">Off</Language>
<Language Check="" Box="">Yes</Language>
<Language Check="" Box="">Off</Language>
<Language Check="" Box="">Off</Language>
<Gender List="" Box="">ManMan</Gender>
<Address Text="" Box=""></Address>
</fields>

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

Powered by Kunena Forum