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.