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: