- Posts: 28
- 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
AddAnnotBitmap is not work on my app.
IP: 192.168.0.71
11 years 5 months ago #7323
by oemilk
AddAnnotBitmap is not work on my app. was created by oemilk
I have tested this method(AddAnnotBitmap).
It works well.
But when I tested it on my app, it doesn't work....
My app is professional license.
I don't know the reason.
Log.e("success", "count: " + page.GetAnnotCount() + " / success : " + success);
count is 0, success is true.
Page page = mDoc.GetPage(1);
page.ObjsStart();
float rect[] = new float[4];
rect = new float[] { 200, 200, 241, 241 };
boolean success= page.AddAnnotBitmap(bmAddnot, true, rect);
Log.e("success", "count: " + page.GetAnnotCount() + " / success : " + success);
mPDFView.vRenderSync(mPDFView.vGetPage(1));
invalidate();
page.Close();
It works well.
But when I tested it on my app, it doesn't work....
My app is professional license.
I don't know the reason.
Log.e("success", "count: " + page.GetAnnotCount() + " / success : " + success);
count is 0, success is true.
Page page = mDoc.GetPage(1);
page.ObjsStart();
float rect[] = new float[4];
rect = new float[] { 200, 200, 241, 241 };
boolean success= page.AddAnnotBitmap(bmAddnot, true, rect);
Log.e("success", "count: " + page.GetAnnotCount() + " / success : " + success);
mPDFView.vRenderSync(mPDFView.vGetPage(1));
invalidate();
page.Close();
IP: 192.168.0.156
11 years 5 months ago #7330
by Davide
Replied by Davide on topic AddAnnotBitmap is not work on my app.
Hi,
you need to rerender the page after your code.
You have to recall the object page after the rendering to get the correct page.GetAnnotCount().
Check this:
www.androidpdf.mobi/forum/ios-dev/1791-a...t-work-in-2-2-0#6371
and this:
www.androidpdf.mobi/forum/Android-develo...imitstart=0&start=12
you need to rerender the page after your code.
You have to recall the object page after the rendering to get the correct page.GetAnnotCount().
Check this:
www.androidpdf.mobi/forum/ios-dev/1791-a...t-work-in-2-2-0#6371
and this:
www.androidpdf.mobi/forum/Android-develo...imitstart=0&start=12
IP: 192.168.0.71
11 years 5 months ago - 11 years 5 months ago #7367
by oemilk
Replied by oemilk on topic AddAnnotBitmap is not work on my app.
What are the "recall the object page" and "rerender the page" ?
Can you give me some sample codes?
Other api methods are done. (AddAnnotMarkup(), AddAnnotStamp() ... )
I don't understand your link...
Can you give me some sample codes?
Other api methods are done. (AddAnnotMarkup(), AddAnnotStamp() ... )
I don't understand your link...
Last edit: 11 years 5 months ago by EugeneP.
IP: 192.168.0.156
11 years 5 months ago #7376
by Davide
Replied by Davide on topic AddAnnotBitmap is not work on my app.
Hi,
- invoke PDFView.vRenderAsync(PDFVPage page) to rerender page after page modified
- Page page = mDoc.GetPage(1);
page.ObjsStart();
Log.e("success", "count: " + page.GetAnnotCount() + " / success : " + success);
to recall the object page after the rendering to get the correct page.GetAnnotCount()
In the links you can see some example of AddAnnotationBitmap and you can read some advice to do it properly.
- invoke PDFView.vRenderAsync(PDFVPage page) to rerender page after page modified
- Page page = mDoc.GetPage(1);
page.ObjsStart();
Log.e("success", "count: " + page.GetAnnotCount() + " / success : " + success);
to recall the object page after the rendering to get the correct page.GetAnnotCount()
In the links you can see some example of AddAnnotationBitmap and you can read some advice to do it properly.
Time to create page: 0.421 seconds