Bitmap annotation not added in PDF. - Page 10 - RadaeePDF.com - Results from #54
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF

TOPIC:

Bitmap annotation not added in PDF. 5 years 6 months ago #8273

  • moontech
  • moontech's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 80
  • Thank you received: 0
Can we have reply for this?
Its urgent.

Please Log in or Create an account to join the conversation.

Last edit: by fischer.

Bitmap annotation not added in PDF. 5 years 6 months ago #8275

  • nermeen
  • nermeen's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 944
  • Karma: 23
  • Thank you received: 86
We have tested with this code (similar to yours)...
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
}

Please Log in or Create an account to join the conversation.

Bitmap annotation not added in PDF. 5 years 6 months ago #8278

  • moontech
  • moontech's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 80
  • Thank you received: 0
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.

Please Log in or Create an account to join the conversation.

Bitmap annotation not added in PDF. 5 years 6 months ago #8280

  • moontech
  • moontech's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 80
  • Thank you received: 0
reply here

Please Log in or Create an account to join the conversation.

Bitmap annotation not added in PDF. 5 years 4 months ago #8537

  • clavarreda
  • clavarreda's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 0
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

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum