简体   繁体   中英

Android PDFrenderer set matrix without crop marks

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM