3

I work on zoom in pdf using PDFRenderer and all is good but when I set matrix it looks like he taken the document from media box not from crop box and I see this crop marks:

http://www.clker.com/cliparts/f/9/2/1/1194984965147498815crop_marks_mo_01.svg.hi.png

This is my code:

Matrix nM = new Matrix();                         

RectF r1 = new RectF(0,0,width ,deviceHeight);
RectF src = new RectF(0,0,mCurrentPage.getWidth(),mCurrentPage.getHeight());
nM.postScale(scaleX, scaleY);
nM.postTranslate(translateX, translateY);
nM.mapRect(r1);
nM.setRectToRect(src,r1, Matrix.ScaleToFit.CENTER);
mCurrentPage.render(bitmap, null, nM, PdfRenderer.Page.RENDER_MODE_FOR_DISPLAY);

How set matrix or something to render bitmap without this crop marks and render only crop box?

1 Answers1

-2

You're doing it correclty. It's the framework that's buggy

https://bugs.chromium.org/p/pdfium/issues/detail?id=453

I know no workaround

Nodjo
  • 35
  • 5