- Posts: 962
- Thank you received: 87
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.
IP: 192.168.0.158
11 years 9 months ago #7977
by nermeen
Replied by nermeen on topic Bitmap annotation not added in PDF.
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:
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);
IP: 192.168.0.71
11 years 9 months ago #7986
by radaee
Replied by radaee on topic Bitmap annotation not added in PDF.
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.
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.
IP: 192.168.0.71
11 years 9 months ago #7989
by moontech
Replied by moontech on topic Bitmap annotation not added in PDF.
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?
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?
IP: 192.168.0.71
11 years 9 months ago #7990
by moontech
Replied by moontech on topic Bitmap annotation not added in PDF.
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?
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?
IP: 192.168.0.71
11 years 9 months ago #7998
by moontech
Replied by moontech on topic Bitmap annotation not added in PDF.
Can we have reply here?
Need to solve this.
Need to solve this.
IP: 192.168.0.71
11 years 9 months ago #8003
by radaee
Replied by radaee on topic Bitmap annotation not added in PDF.
seems, you'd better send your own project to us.
demo project tested, and working fine.
demo project tested, and working fine.
Time to create page: 0.391 seconds