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

TOPIC:

addAnnotBitmap not work in version 3.9 7 years 3 months ago #11667

  • nasri
  • nasri's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7
  • Thank you received: 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

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

addAnnotBitmap not work in version 3.9 7 years 3 months ago #11670

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
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 following user(s) said Thank You: nasri

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

addAnnotBitmap not work in version 3.9 7 years 3 months ago #11672

  • nasri
  • nasri's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7
  • Thank you received: 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

Attachments:

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

addAnnotBitmap not work in version 3.9 7 years 3 months ago #11675

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
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!

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

Last edit: by Davide.

addAnnotBitmap not work in version 3.9 7 years 3 months ago #11677

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
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 following user(s) said Thank You: nasri

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

addAnnotBitmap not work in version 3.9 7 years 3 months ago #11696

  • nasri
  • nasri's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7
  • Thank you received: 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

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

Last edit: by nasri.
  • Page:
  • 1
  • 2
Powered by Kunena Forum