Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-17001

PDF preview should handle properly extract failures on secured un-copyable PDF

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 7.2
    • Fix Version/s: 6.0-HF24, 7.10-HF01, 8.1
    • Component/s: Preview

      Description

      When uploading a PDF that denies copying text, pdf2html does not return a converted content so that the blob is null.
      Actually when running by hand the command it says : "Permission Error: Copying of text from this document is not allowed."
      This produces the following stacktrace

      2015-04-23 11:18:43,071 ERROR [http-bio-0.0.0.0-8080-exec-13] [org.nuxeo.ecm.platform.ui.web.restAPI.SeamRestletFilter] Restlet handling error
      java.lang.NullPointerException
          at org.nuxeo.ecm.platform.preview.converters.HtmlPreviewConverter.convert(HtmlPreviewConverter.java:131)
          at org.nuxeo.ecm.core.convert.service.ConversionServiceImpl.convert(ConversionServiceImpl.java:187)
          at org.nuxeo.ecm.platform.preview.adapter.base.ConverterBasedHtmlPreviewAdapter.getPreviewBlobs(ConverterBasedHtmlPreviewAdapter.java:118)
          at org.nuxeo.ecm.platform.preview.adapter.base.ConverterBasedHtmlPreviewAdapter.getPreviewBlobs(ConverterBasedHtmlPreviewAdapter.java:91)
          at org.nuxeo.ecm.platform.preview.adapter.base.AbstractHtmlPreviewAdapter.getFilePreviewBlobs(AbstractHtmlPreviewAdapter.java:118)
          at org.nuxeo.ecm.platform.preview.restlet.PreviewRestlet.initCachedBlob(PreviewRestlet.java:201)
          at org.nuxeo.ecm.platform.preview.restlet.PreviewRestlet.handle(PreviewRestlet.java:136)
      

      We should find a way to handle that properly and tell the user an error happened while converting.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: