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

preview of PDF document fails when filename contains spaces

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.3 GA
    • Fix Version/s: None
    • Component/s: Preview
    • Environment:
      Windows XP SP3 + FF 3.5.5

      Description

      I D&D a PDF file in Nuxeo whose filename contains spaces. I get an error when I open the 'preview' tab. here is the error :
      Preview can not be generated for this document

      Blob path: default

      org.nuxeo.ecm.platform.preview.api.PreviewException: Error during conversion

      here are the error messages in server.log :
      2009-11-25 15:43:05,607 DEBUG [org.nuxeo.ecm.platform.preview.adapter.base.ConverterBasedHtmlPreviewAdapter] Source type for HTML preview =application/pdf

      2009-11-25 15:43:05,607 DEBUG [org.nuxeo.ecm.platform.commandline.executor.service.executors.ShellExecutor] Running system command: cmd /C pdftohtml -c -noframes C:\\DOCUME~1\\vdu\\LOCALS~1\\Temp
      cmdLineBasedConverter57921Courrier Wuilquot 20091028-ocr.pdf C:\\DOCUME~1\\vdu\\LOCALS~1\\Temp
      pdf2html_1259160185607/index.html 2>&1

      2009-11-25 15:43:05,654 ERROR [org.nuxeo.ecm.platform.preview.restlet.PreviewRestlet] could not build preview for missing blob at default

      org.nuxeo.ecm.platform.preview.api.PreviewException: Error during conversion

      at org.nuxeo.ecm.platform.preview.adapter.base.ConverterBasedHtmlPreviewAdapter.getPreviewBlobs(ConverterBasedHtmlPreviewAdapter.java:167)

      at org.nuxeo.ecm.platform.preview.adapter.base.ConverterBasedHtmlPreviewAdapter.getPreviewBlobs(ConverterBasedHtmlPreviewAdapter.java:110)

      at org.nuxeo.ecm.platform.preview.adapter.base.AbstractHtmlPreviewAdapter.getFilePreviewBlobs(AbstractHtmlPreviewAdapter.java:123)

      at org.nuxeo.ecm.platform.preview.restlet.PreviewRestlet.initCachedBlob(PreviewRestlet.java:171)

      at org.nuxeo.ecm.platform.preview.restlet.PreviewRestlet.handle(PreviewRestlet.java:124)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:585)

      at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)

      at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)

      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)

      at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)

      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)

      at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)

      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)

      at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)

      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)

      at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)

      at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166)

      at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)

      at org.nuxeo.ecm.platform.preview.restlet.PreviewRestlet_$$javassist_69.handle(PreviewRestlet$$_javassist_69.java)

      at org.nuxeo.ecm.platform.ui.web.restAPI.SeamRestletFilter.doHandle(SeamRestletFilter.java:124)

      at org.restlet.Filter.handle(Filter.java:134)

      at org.restlet.Filter.doHandle(Filter.java:105)

      at org.restlet.Filter.handle(Filter.java:134)

      at org.restlet.Router.handle(Router.java:444)

      at com.noelios.restlet.ext.servlet.ServletConverter.service(ServletConverter.java:129)

      at org.nuxeo.ecm.platform.ui.web.restAPI.RestletServlet.service(RestletServlet.java:125)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      at org.nuxeo.wss.servlet.WSSFilter.doFilter(WSSFilter.java:135)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      at org.nuxeo.ecm.platform.ui.web.rest.FancyURLFilter.doFilter(FancyURLFilter.java:127)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      at org.nuxeo.ecm.platform.ui.web.auth.NuxeoAuthenticationFilter.doFilter(NuxeoAuthenticationFilter.java:468)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      at org.nuxeo.ecm.platform.web.common.requestcontroller.filter.NuxeoRequestControllerFilter.doFilter(NuxeoRequestControllerFilter.java:133)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      at org.nuxeo.ecm.platform.web.common.exceptionhandling.NuxeoExceptionFilter.doFilter(NuxeoExceptionFilter.java:80)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)

      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)

      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)

      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)

      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)

      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)

      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)

      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)

      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)

      at java.lang.Thread.run(Thread.java:595)

      Caused by: org.nuxeo.ecm.core.api.WrappedException: Exception: org.nuxeo.ecm.core.convert.api.ConversionException. message: CommandLine returned code 1:
      pdftohtml version 0.39 http://pdftohtml.sourceforge.net/, based on Xpdf version 3.00
      Copyright 1999-2003 Gueorgui Ovtcharov and Rainer Dorsch
      Copyright 1996-2004 Glyph & Cog, LLC

      Usage: pdftohtml [options] <PDF-file> [<html-file> <xml-file>]
      -f <int> : first page to convert
      -l <int> : last page to convert
      -q : don't print any messages or errors
      -h : print usage information
      -help : print usage information
      -p : exchange .pdf links by .html
      -c : generate complex document
      -i : ignore images
      -noframes : generate no frames
      -stdout : use standard output
      -zoom <fp> : zoom the pdf document (default 1.5)
      -xml : output for XML post-processing
      -hidden : output hidden text
      -nomerge : do not merge paragraphs
      -enc <string> : output text encoding name
      -dev <string> : output device name for Ghostscript (png16m, jpeg etc)
      -v : print copyright and version info
      -opw <string> : owner password (for encrypted files)
      -upw <string> : user password (for encrypted files)

      at org.nuxeo.ecm.platform.convert.plugins.CommandLineBasedConverter.execOnBlob(CommandLineBasedConverter.java:155)

      at org.nuxeo.ecm.platform.convert.plugins.CommandLineBasedConverter.convert(CommandLineBasedConverter.java:88)

      at org.nuxeo.ecm.core.convert.service.ConversionServiceImpl.convert(ConversionServiceImpl.java:172)

      at org.nuxeo.ecm.platform.preview.converters.HtmlPreviewConverter.convert(HtmlPreviewConverter.java:123)

      at org.nuxeo.ecm.core.convert.service.ConversionServiceImpl.convert(ConversionServiceImpl.java:172)

      at org.nuxeo.ecm.platform.preview.adapter.base.ConverterBasedHtmlPreviewAdapter.getPreviewBlobs(ConverterBasedHtmlPreviewAdapter.java:161)

      ... 62 more

      2009-11-25 15:43:05,654 DEBUG [org.nuxeo.ecm.core.api.ejb.DocumentManagerBean] @Remove

      2009-11-25 15:43:05,654 DEBUG [org.nuxeo.ecm.core.api.ejb.DocumentManagerBean] @PreDestroy

      2009-11-25 15:43:05,654 DEBUG [org.nuxeo.ecm.core.api.CoreSession] Destroying core session ...

      2009-11-25 15:43:05,654 DEBUG [org.nuxeo.ecm.webapp.delegate.DocumentManagerBusinessDelegate] Closed session for repository default

      2009-11-25 15:43:05,654 DEBUG [org.nuxeo.ecm.webapp.context.NavigationContextBean] <destroy>

      2009-11-25 15:43:05,654 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/nuxeo]] An exception occurred during media type preferences parsing. Header: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8,application/x-nuxeo-liveedit;ext0="text/plain";ext1="text/xml";ext2="application/vnd.oasis.opendocument.text";ext3="application/vnd.oasis.opendocument.spreadsheet";ext4="application/vnd.oasis.opendocument.presentation";ext5="application/msword";ext6="application/vnd.ms-excel";ext7="application/vnd.ms-powerpoint";ext8="". Ignoring header.

      If I remove spaces from filename I don't get the error message in 'Preview' tab.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: