Page.RenderToBmp(Bitmap bitmap, Matrix mat) create weird bitmap - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Planned SDK features
  • Page:
  • 1

TOPIC: Page.RenderToBmp(Bitmap bitmap, Matrix mat) create weird bitmap

Page.RenderToBmp(Bitmap bitmap, Matrix mat) create weird bitmap 2 months 5 days ago #14113

  • ericatudn
  • ericatudn's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
Hello.
Please forgive my bad English.
When calling Page.RenderToBmp(Bitmap bitmap, Matrix mat), a weird bitmap was created, see attachment "weird_bitmap.jpg".
The origin PDF files is "test.PDF" (page 2), see attachment. This file is actually from your test project.
My java code:

//=============================================
private PDFLayoutView m_view = null;
private Document m_doc = null;
...
private Bitmap getBitmap()
{
int pageNo = m_view.PDFGetCurrPage();

float x = 0;
float y = m_doc.GetPageHeight(pageNo);

Matrix matrix = new Matrix(1, -1, x, y);

int width = (int) m_doc.GetPageWidth(pageNo);
int height = (int) m_doc.GetPageHeight(pageNo);

Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);

m_doc.GetPage(pageNo).RenderToBmp(bitmap, matrix);

matrix.Destroy();

return bitmap;
}
//=============================================

Thank you very m

File Attachment:

File Name: test_2018-09-11.PDF
File Size: 113 KB
uch.
Attachments:

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

Page.RenderToBmp(Bitmap bitmap, Matrix mat) create weird bitmap 4 weeks 2 days ago #14163

  • ericatudn
  • ericatudn's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
Hello, any advice for my question?
Thank you very much.

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

Page.RenderToBmp(Bitmap bitmap, Matrix mat) create weird bitmap 3 weeks 6 days ago #14165

  • support
  • support's Avatar
  • Online
  • Administrator
  • Administrator
  • Posts: 571
  • Karma: 6
  • Thank you received: 46
The following user(s) said Thank You: ericatudn

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

  • Page:
  • 1
Powered by Kunena Forum