- Posts: 16
- 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
Eraser of PDF Ink
IP: 192.168.0.70
12 years 2 months ago #4871
by el3ony
Replied by el3ony on topic Eraser of PDF Ink
I have another problem with after I added and call vRender again it's disappear.
How can I add bitmap correctly with float[]
How can I add bitmap correctly with float[]
IP: 192.168.0.70
12 years 2 months ago #4872
by radaee
Replied by radaee on topic Eraser of PDF Ink
like this logic:
Code:
rect[0] = bitmap_left_on_screen;
rect[1] = bitmap_top_on_screen;
rect[2] = bitmap_right_on_screen;
rect[3] = bitmap_bottom_on_screen;
PDFVPage vpage;
Matrix mat = vpage.CreateInvertMatrix(m_view.vGetX(), m_view.vGetY());
mat.TransformRect(rect);
Page page = vpage.getPage();
page.AddAnnotBitmap(bitmap, true, rect);//professional license is needed.
IP: 192.168.0.70
12 years 2 months ago #4873
by el3ony
Replied by el3ony on topic Eraser of PDF Ink
I cannot find TransformRect method from radaee Matrix. Can you give me this method ?
IP: 192.168.0.70
12 years 2 months ago #4874
by radaee
Replied by radaee on topic Eraser of PDF Ink
this method can be found in new version, and need new librdpdf.so library.
are you used new version?
are you used new version?
IP: 192.168.0.70
12 years 2 months ago #4877
by el3ony
Replied by el3ony on topic Eraser of PDF Ink
Ok I got TransformRect from new sdk but I still cannot addAnnotBitmap
This is my code
float[] rect = new float[]{0, 0, getBitmap().getWidth(), getBitmap().getHeight()};
Matrix mat = m_ink_page.CreateInvertMatrix(m_view. vGetX(), m_view.vGetY());
mat.TransformRect(rect);
page.AddAnnotBitmap(m_ink.getBitmap(), true, rect);
Do I have to implement another code after AddAnnotBitmap?
This is my code
float[] rect = new float[]{0, 0, getBitmap().getWidth(), getBitmap().getHeight()};
Matrix mat = m_ink_page.CreateInvertMatrix(m_view. vGetX(), m_view.vGetY());
mat.TransformRect(rect);
page.AddAnnotBitmap(m_ink.getBitmap(), true, rect);
Do I have to implement another code after AddAnnotBitmap?
IP: 192.168.0.70
12 years 2 months ago #4883
by el3ony
Replied by el3ony on topic Eraser of PDF Ink
Any update ?
Here I add some code that addAnnotBitmap but it doesn't work at all
Bitmap bmAddnot = BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher);
float[] rect = new float[]{0, 0, bmAddnot.getWidth(), bmAddnot.getHeight()};
PDFView m_view = m_vPDF.PDFgetView();
PDFVPage v_page = m_vPDF.PDFgetView().vGetPage(m_page_no);
Page page = m_doc.GetPage(m_page_no);
Matrix mat = v_page.CreateInvertMatrix(m_view.vGetX(), m_view.vGetY());
mat.TransformRect(rect);
page.AddAnnotBitmap(bmAddnot, true, rect);
but it doesn't show a bitmap after I added it
Here I add some code that addAnnotBitmap but it doesn't work at all
Bitmap bmAddnot = BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher);
float[] rect = new float[]{0, 0, bmAddnot.getWidth(), bmAddnot.getHeight()};
PDFView m_view = m_vPDF.PDFgetView();
PDFVPage v_page = m_vPDF.PDFgetView().vGetPage(m_page_no);
Page page = m_doc.GetPage(m_page_no);
Matrix mat = v_page.CreateInvertMatrix(m_view.vGetX(), m_view.vGetY());
mat.TransformRect(rect);
page.AddAnnotBitmap(bmAddnot, true, rect);
but it doesn't show a bitmap after I added it
Time to create page: 0.428 seconds