RadaeePDF.com :: Topic: addAnnotBitmap not work in version 3.9 (1/2)
Welcome, Guest
Username: Password: Remember me

Signin/Signup with:

Questions about Android development and PDF
  • Page:
  • 1
  • 2

TOPIC: addAnnotBitmap not work in version 3.9

addAnnotBitmap not work in version 3.9 5 months 3 weeks ago #11667

  • nasri
  • nasri's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
Hi every one,
I am used to use the funtion addAnnotBitmap() to merge a transparent bitmap to pdf and that's work fine with RadaeePDF version 3.4. however when When I did the update to last version 3.9 addAnnotBitmap() the merge do not work. Also I tried to use NewImageJPEG .. but the merge do not work .. i want to make update .. help me please
thinks
The administrator has disabled public write access.

addAnnotBitmap not work in version 3.9 5 months 3 weeks ago #11670

  • Davide
  • Davide's Avatar
  • OFFLINE
  • Moderator
  • Posts: 661
  • Thank you received: 43
  • Karma: 11
Hi,
can you please send us the code you implemented?
And also a pdf and an image that you are using?
So we can test and check it..
The administrator has disabled public write access.
The following user(s) said Thank You: nasri

addAnnotBitmap not work in version 3.9 5 months 3 weeks ago #11672

  • nasri
  • nasri's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
m_doc.SetCache(Global.tmp_path + "/temp.dat");
int c_page = m_reader.getPageno();
Page pa = m_doc.GetPage(c_page);
pa.ObjsStart();
PDFVPage vpage = m_reader.m_view.vGetPage(c_page);
float[] rect = { pos1.x,pos1.y, pos2.x, pos2.y};
pa.AddAnnotBitmap(bitmap, true, rect);
m_reader.m_view.vRenderSync(vpage);

bitmap.recycle();

pa.Close();
m_reader.PDFSave(); //after save you should reopen the document, reget the page



Attachment sign1.png not found



Attachment sign2.png not found

The administrator has disabled public write access.

addAnnotBitmap not work in version 3.9 5 months 3 weeks ago #11675

  • Davide
  • Davide's Avatar
  • OFFLINE
  • Moderator
  • Posts: 661
  • Thank you received: 43
  • Karma: 11
Hi,
can you also attach the pdf file and the bitmap signature?
So we can replicate your case.

Can you please explain what is the problem reported with the attached screenshots?

Thanks!
Last Edit: 5 months 3 weeks ago by Davide.
The administrator has disabled public write access.

addAnnotBitmap not work in version 3.9 5 months 3 weeks ago #11677

  • Davide
  • Davide's Avatar
  • OFFLINE
  • Moderator
  • Posts: 661
  • Thank you received: 43
  • Karma: 11
Hi,
looking at your code, I see that you are still using the old implementation of addAnnotBitmap method.
Here some further info about the new one : www.radaeepdf.com/documentation/javadocs...nt.DocImage-float:A-

You can see and example of how to use it in PDFSetStamp method of PDFLayoutView class of RDPDFReader demo module.
You need something like that :
if(m_img == null && bitmap!= null)
	m_img = m_doc.NewImage(bitmap, false);
	if(m_img != null)
		page.AddAnnotBitmap(m_img, rect);
The administrator has disabled public write access.
The following user(s) said Thank You: nasri

addAnnotBitmap not work in version 3.9 5 months 2 weeks ago #11696

  • nasri
  • nasri's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
Hello,
Sorry for the delay, I changed the code to this way , but the problem is not resolved. Always works with version 3.4 and not with version 3.9
:(

/// code
m_doc.SetCache(Global.tmp_path + "/temp.dat");
int c_page = m_reader.getPageno();
Page page = m_doc.GetPage(c_page);
page.ObjsStart();
PDFVPage vpage = m_reader.m_view.vGetPage(c_page);
float[] rect = {192, 146, 344, 54};

// float[] rect = { pos1.x,pos1.y, pos2.x, pos2.y};

// page.AddAnnotBitmap(bitmap, true, rect);

if(m_img == null && bitmap!= null)
m_img = m_doc.NewImage(bitmap, false);
if(m_img != null)
page.AddAnnotBitmap(m_img, rect);

m_reader.m_view.vRenderSync(vpage);

bitmap.recycle();

page.Close();
m_reader.PDFSave(); //after save you should reopen the document, reget the page


///////
Is there a problem somewhere in the code ??? .. i need help
Thins a lot
Last Edit: 5 months 2 weeks ago by nasri.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Powered by Kunena Forum