- Posts: 4
- Thank you received: 0
Microsoft Windows Phone 8.1 support ends (13 Jul 2017)
Microsoft has ended support for Windows Phone 8.1
Submit your requests and polls about new features
Annotations
- erikatomanderson
- Offline
- New Member
-
Less
More
IP: 192.168.0.70
12 years 10 months ago #2002
by erikatomanderson
Replied by erikatomanderson on topic Annotations
Thank you for your fast response. I feel like it should be obvious, but I don't know where to get the bitmap in the first line of your example code.
IP: 192.168.0.70
12 years 10 months ago #2011
by radaee
Replied by radaee on topic Annotations
just use Bitmap.createBitmap(width, height, ARGB8888);
- erikatomanderson
- Offline
- New Member
-
Less
More
- Posts: 4
- Thank you received: 0
IP: 192.168.0.70
12 years 10 months ago #2022
by erikatomanderson
Replied by erikatomanderson on topic Annotations
Ok, Thank you I got this to work... Mostly.
In the onAnnotEditBox method (PDFView.PDFAnnotListener), I call the annotSetEditText method to set the text. The text only shows up after I touch the annotation. Do you know what I need to call to make the text annotation show up without touching it?
In the onAnnotEditBox method (PDFView.PDFAnnotListener), I call the annotSetEditText method to set the text. The text only shows up after I touch the annotation. Do you know what I need to call to make the text annotation show up without touching it?
- erikatomanderson
- Offline
- New Member
-
Less
More
- Posts: 4
- Thank you received: 0
IP: 192.168.0.70
12 years 10 months ago #2035
by erikatomanderson
Replied by erikatomanderson on topic Annotations
I figured it out. The onAnnotEditBox method works when the annotation is selected. I used the following code to set the text from a dialog where I let the user set the text:
String value = input.getText().toString();
boolean result = pdfReader.annotAddEditText(x, y);
Page page = pdfReader.getCurrentPage();
if (result && page != null) {
// Assume the last annotation is the correct one
int annot = page.GetAnnot(page.GetAnnotCount() - 1);
page.SetAnnotEditText(annot, value);
pdfReader.get_viewer().viewGetDoc().Save();
}
String value = input.getText().toString();
boolean result = pdfReader.annotAddEditText(x, y);
Page page = pdfReader.getCurrentPage();
if (result && page != null) {
// Assume the last annotation is the correct one
int annot = page.GetAnnot(page.GetAnnotCount() - 1);
page.SetAnnotEditText(annot, value);
pdfReader.get_viewer().viewGetDoc().Save();
}
Time to create page: 0.396 seconds