Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF

TOPIC:

Bitmap annotation not added in PDF. 9 years 3 months ago #8273

  • moontech
  • moontech's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • 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. 9 years 3 months ago #8275

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
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. 9 years 3 months ago #8278

  • moontech
  • moontech's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • 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. 9 years 3 months ago #8280

  • moontech
  • moontech's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • 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. 9 years 2 months ago #8537

  • clavarreda
  • clavarreda's Avatar
  • Offline
  • New Member
  • New Member
  • 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