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

Bitmap annotation not added in PDF.

More
IP: 192.168.0.158 11 years 9 months ago #7977 by nermeen
We have tested your code, and it's working fine (the bitmap is added and rendered correctly).
The only difference is the bitmap itself...
How do you initialize it?
Can you try with a bitmap from resources, to make sure that the bitmap itself is the problem?

The bitmap we tested with is the one from the resources of the demo project:
Code:
Bitmap bitmap = BitmapFactory.decodeResource(this.getResources(), R.drawable.pdf_icon);
More
IP: 192.168.0.71 11 years 9 months ago #7986 by radaee
there are some condition for AddAnnotBitmap():
1. invoked Document.SetCache(), and only once. you can set debug point in Document.SetCache() to ensure only once invoked.
2. Bitmap pizles format must be RGBA32.
3. Page.ObjsStart or Page.RenderXXX invoked, and Page.Close() not invoked.
More
IP: 192.168.0.71 11 years 9 months ago #7989 by moontech
We have tried with the pdf_icon from demo project.But no effect at all.
Actually this problem occurs when following these steps..
PdfActivity(where add bitmap) -> on save it redirects to Preview Activity -> Back -> PdfActivity(resumes activity).

If I stay on PdfActivity and add bitmap its working ok.
Does above flow effect any object or method?
More
IP: 192.168.0.71 11 years 9 months ago #7990 by moontech
Condition for AddAnnotBitmap():
3. Page.ObjsStart or Page.RenderXXX invoked, and Page.Close() not invoked.

Did you mean than that page.ObjsStart and page.RenderXXX should be invoked every time and do not invoke page.Close() every time?
More
IP: 192.168.0.71 11 years 9 months ago #7998 by moontech
Can we have reply here?
Need to solve this.
More
IP: 192.168.0.71 11 years 9 months ago #8003 by radaee
seems, you'd better send your own project to us.
demo project tested, and working fine.
Time to create page: 0.391 seconds
Powered by Kunena Forum