- Posts: 21
- Thank you received: 0
Microsoft Windows Phone 8.1 support ends (13 Jul 2017)
Microsoft has ended support for Windows Phone 8.1
Questions about Android development and PDF
Extracting fields and Checkbox Tick Mark
- sharikakanakam
- Topic Author
- Offline
- Junior Member
-
Less
More
10 years 5 months ago #10460
by sharikakanakam
Replied by sharikakanakam on topic Extracting fields and Checkbox Tick Mark
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!
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!
10 years 5 months ago - 10 years 5 months ago #10461
by Davide
Replied by Davide on topic Extracting fields and Checkbox Tick Mark
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
For more info check this:
www.radaeepdf.com/documentation/javadocs...#RenderToBmp-Bitmap-
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
Code:
m_annot.RenderToBmp(Bitmap bitmap)
Last edit: 10 years 5 months ago by Davide.
- sharikakanakam
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 21
- Thank you received: 0
10 years 5 months ago #10462
by sharikakanakam
Replied by sharikakanakam on topic Extracting fields and Checkbox Tick Mark
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).
SO is there a way I can create a view inside an annotation that takes ink field? (Please share sample code if any).
10 years 5 months ago #10464
by Davide
Replied by Davide on topic Extracting fields and Checkbox Tick Mark
Hi,
you can create a view that appears when you tap a signature annot and then handle it as I suggested before.
you can create a view that appears when you tap a signature annot and then handle it as I suggested before.
- sharikakanakam
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 21
- Thank you received: 0
10 years 5 months ago #10465
by sharikakanakam
Replied by sharikakanakam on topic Extracting fields and Checkbox Tick Mark
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?
- sharikakanakam
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 21
- Thank you received: 0
10 years 5 months ago #10481
by sharikakanakam
Replied by sharikakanakam on topic Extracting fields and Checkbox Tick Mark
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
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
Time to create page: 0.377 seconds