[ https://issues.apache.org/jira/browse/PDFBOX-4069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16329011#comment-16329011 ]
Tilman Hausherr commented on PDFBOX-4069: ----------------------------------------- How about a method in PDFRenderer, e.g. getRectangle or getBounds or getRenderBounds or whatever, whose default implementation returns the cropbox? Any extension from that class can replace it with something else. > Rendering with trimbox not possible > ----------------------------------- > > Key: PDFBOX-4069 > URL: https://issues.apache.org/jira/browse/PDFBOX-4069 > Project: PDFBox > Issue Type: Bug > Components: Rendering > Affects Versions: 2.0.7 > Reporter: Kristian Jörg > Priority: Major > Original Estimate: 1h > Remaining Estimate: 1h > > I have a PDF with cropmarks for printing that i want to render without > cropmarks visible. The default implementation in PDRenderer uses > page.getCropBox() to decide the visible part of a page. But there is no way > to override that to use trimbox - which is what I need. > Further, trying to extend PDRenderer to change the implementation to use > trimbox instead of cropbox fails, because the method renderImage() calls the > constructor of PageDrawerParameters, which unfurtunately insn't visible (not > public). I couldn't find a way to solve that. Instead I ended up installing > the whole pdfbox source and patching up the PDFRenderer.java file according > to my needs. That gave me the rendering output I expected, i.e the cropmarks > gone. > So please make it possible to choose which cropping to use (cropbox, trimbox, > bleedbox) for rendering and perhaps look over the possibility to extend these > classes without visibility issues. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org