- Posts: 7
- 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
addAnnotBitmap not work in version 3.9
9 years 8 months ago #11667
by nasri
addAnnotBitmap not work in version 3.9 was created by nasri
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
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
9 years 8 months ago #11670
by Davide
Replied by Davide on topic addAnnotBitmap not work in version 3.9
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..
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..
9 years 8 months ago #11672
by nasri
Replied by nasri on topic addAnnotBitmap not work in version 3.9
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
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
9 years 8 months ago - 9 years 8 months ago #11675
by Davide
Replied by Davide on topic addAnnotBitmap not work in version 3.9
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!
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: 9 years 8 months ago by Davide.
9 years 8 months ago #11677
by Davide
Replied by Davide on topic addAnnotBitmap not work in version 3.9
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 :
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 :
Code:
if(m_img == null && bitmap!= null)
m_img = m_doc.NewImage(bitmap, false);
if(m_img != null)
page.AddAnnotBitmap(m_img, rect);
9 years 8 months ago - 9 years 8 months ago #11696
by nasri
Replied by nasri on topic addAnnotBitmap not work in version 3.9
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
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: 9 years 8 months ago by nasri.
Time to create page: 0.425 seconds