- Posts: 80
- 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
Bitmap annotation not added in PDF.
IP: 192.168.0.71
11 years 2 months ago - 11 years 2 months ago #8273
by moontech
Replied by moontech on topic Bitmap annotation not added in PDF.
Can we have reply for this?
Its urgent.
Its urgent.
Last edit: 11 years 2 months ago by fischer.
IP: 192.168.0.158
11 years 2 months ago #8275
by nermeen
Replied by nermeen on topic Bitmap annotation not added in PDF.
We have tested with this code (similar to yours)...
Code:
public void graphicannotation(Bitmap bitmap)
{
Bitmap bitmap = BitmapFactory.decodeResource(this.getResources(), R.drawable.pdf_icon);
m_doc.SetCache(Global.tmp_path + "/temp.dat");
int c_page = Constant.currentpage;
pa = m_doc.GetPage(c_page);
pa.ObjsStart();
PDFVPage vpage = m_rPDF.m_view.vGetPage(c_page);
float[] rect = { 200, 200, (200 + bitmap.getWidth()),
(200 + bitmap.getHeight()) };
pa.AddAnnotBitmap(bitmap, true, rect);
m_rPDF.m_view.vRenderSync(vpage);
bitmap.recycle();
pa.Close();
m_rPDF.PDFSave(); //after save you should reopen the document, reget the page
}
IP: 192.168.0.71
11 years 2 months ago #8278
by moontech
Replied by moontech on topic Bitmap annotation not added in PDF.
We also used same code.
Can you please send completed source code.
It's too argent for us and app review.
So send complete source code.
Can you please send completed source code.
It's too argent for us and app review.
So send complete source code.
IP: 192.168.0.71
11 years 2 months ago #8280
by moontech
Replied by moontech on topic Bitmap annotation not added in PDF.
reply here
- clavarreda
- Offline
- New Member
-
Less
More
- Posts: 4
- Thank you received: 0
11 years 1 month ago #8537
by clavarreda
Replied by clavarreda on topic Bitmap annotation not added in PDF.
I will paste my comment from another topic
A bit late, but I had a similar problem with an app that I was checking. The first time I opened a document bitmaps were just fine, but when I closed that document and opened another one the bitmaps didn't work. The problem was that when the user closed the document the developer invoked Global.RemoveTmp(); but that deletes the tmp directory created when initializing the library and that was causing me some headaches
I hope this could help
Time to create page: 0.378 seconds