Uploaded image for project: 'Islandora'
  1. Islandora
  2. ISLANDORA-2037

GhostScript should use CropBox instead of MediaBox

    XMLWordPrintable

    Details

      Description

      The Paged Content Module uses GhostScript to extract individual TIFF pages from uploaded PDFs. Depending on the way a PDF was created (i.e. if the CropBox is not the same size as the MediaBox), GhostScript may generate images with large white borders instead of ones that look like the source PDF.

      Examples:
      SourcePDF (Newspaper Issue, no borders): http://lc.arcabc.ca/islandora/object/lc%3A2003/datastream/PDF/view

      Ingested object GhostScript adds white border): http://lc.arcabc.ca/islandora/object/lc%3A2003#page/1/mode/1up

      The solution to this is for GhostScript to run using the -dUseCropBox parameter. From their documentation:

      -dUseCropBox
      Sets the page size to the CropBox rather than the MediaBox. Some files have a CropBox that is smaller than the MediaBox and may include white space, registration or cutting marks outside the CropBox. Using this option will set the page size appropriately for a viewer.

      Best approach would probably be to make this configurable - my preference would be for CropBox to be default, but that can be debated.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            brandonw Brandon Weigel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: