Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-4069

Rendering with trimbox not possible

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.0.7
    • None
    • Rendering
    • None

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            barsk Kristian Jörg
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified