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

TOPIC:

Extracting fields and Checkbox Tick Mark 8 years 4 weeks ago #10460

  • sharikakanakam
  • sharikakanakam's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 21
  • Thank you received: 0
I didnt quite understand that. So Im in this signature field. The pdf lib is correctly detecting it as signature field. But I have the following questions.

1. Though the library correclty identifies it as a signature field, it doesnt allow me to draw signature there. What should I do to draw my signature there?
2. To see if I can get the signature object back, I tried puting a signature there by turning on the 'ink' feature. Then I drew a signature there and saved the pdf. But the annot.GetSignStatus() is returning 0 for me at this time. I expected 1 because there was a signature placed in this field. So can you explain what is happening here?
3. If both of the above are achieved, can you explain how I can extract bitmap from this field that has to be saved locally in my app?

Thanks in advance!

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

Extracting fields and Checkbox Tick Mark 8 years 4 weeks ago #10461

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
I suggest you to create a view where the user can write an Ink annot. Then you save it into a bitmap and place it to the rect coordinates of the signature field using the method I sent you before.
To save the pdf you can call the m_doc.Save() method.

You can render an annot to a bitmap using this method
m_annot.RenderToBmp(Bitmap bitmap)
For more info check this: www.radaeepdf.com/documentation/javadocs...#RenderToBmp-Bitmap-

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

Last edit: by Davide.

Extracting fields and Checkbox Tick Mark 8 years 4 weeks ago #10462

  • sharikakanakam
  • sharikakanakam's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 21
  • Thank you received: 0
So if I understand correctly, this means, I will have to create a view inside the signature field when the pdf loads up and then alow user to sign into this view.
SO is there a way I can create a view inside an annotation that takes ink field? (Please share sample code if any).

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

Extracting fields and Checkbox Tick Mark 8 years 4 weeks ago #10464

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
you can create a view that appears when you tap a signature annot and then handle it as I suggested before.

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

Extracting fields and Checkbox Tick Mark 8 years 4 weeks ago #10465

  • sharikakanakam
  • sharikakanakam's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 21
  • Thank you received: 0
Thanks! So I need to create a form field-with ink enabled, that pops up when user touches a signature field. Can you point me to any sample code using which I can create a form field view?

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

Extracting fields and Checkbox Tick Mark 8 years 3 weeks ago #10481

  • sharikakanakam
  • sharikakanakam's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 21
  • Thank you received: 0
Hi,

As you advised, I created a view for the signature field when the user clicks on the annot. And then Im setting this to the annot using
boolean isAdded = page.AddAnnotBitmap(bitmap, false, rect);
m_doc.Save();
this.OnPageModified(m_annot_vpage.GetPageNo());

And this is getting set succesfully, the boolean returns true. But I have an issue now, only when I go and tap the signature field, the signature that I set to the field is getting displayed there. I want this to be displayed as sson as the signature view is dismissed and the above code is executed. But there is some issue with the invalidation as Im getting to see the signature only when I tap the signature field once. Then the signature appears there and stays there. What could be happening?

Thanks,
Sharika

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

Powered by Kunena Forum