I am trying to upgrade from v2 to v3.2 and now I am unable to add Bitmaps to Pages. I have a Professional license which has been enabled. Here is what I see:
b = BitmapFactory.decodeFile(filePath, options); //Bitmap successfully loads
Document m_doc = new Document();
m_doc.Open(pdf.getAbsolutePath(), null); //static file path for temp file, is valid
//m_doc has a large negative hand_val on Android v5 which seems wrong
//on Android v4 m_doc has a large positive hand_val which seems correct
Page page = m_doc.GetPage(0); //this works
float dpix = m_doc.GetPageWidth(0);
float dpiy = m_doc.GetPageHeight(0);
dpix = Math.round((disp_w * 72) / dpix); //85.0
dpiy = Math.round(((disp_h - 50) * 72) / dpiy); //103.0
int w = (int) ((dpix * m_doc.GetPageWidth(0)) / 72); //720
int h = (int) ((dpix * m_doc.GetPageHeight(0)) / 72); //1184
Matrix mat = new com.radaee.pdf.Matrix(dpix / 72, -dpix / 72, 0, (dpix * m_doc.GetPageHeight(0)) / 72);
DIB dib = new DIB();
dib.CreateOrResize(w, h);
page.RenderPrePare(dib);
float rect[] = { 0, 0, m_doc.GetPageWidth(0), m_doc.GetPageHeight(0) };
boolean add_bitmap = page.AddAnnotBitmap(b, false, rect); // **** returns false! *****
// now i save and close the document, but it's just a blank document
I have completely replaced the old version of PDFViewer with the new one including the libs directory. What do I need to change?