tsgrp / OpenAnnotate

TSG's Browser-based Annotation Tool
8 stars 4 forks source link

Unable to view Portfolio Documents with Pdfium #779

Open jlittle-tsg opened 4 years ago

jlittle-tsg commented 4 years ago

Viewing portfolio documents (pdf documents that contain other pdf documents) is not currently working with pdfium. With mupdf, the transformation call completes fine.

image

Stacktrace:


java.io.FileNotFoundException: C:\dev\Alfresco\ALFRES~1.2_H\tomcat\temp\workspaceSpacesStore828a038c-e272-487b-b18e-cf6915b594e7-contentTemp-1599776994714.pdf.1.560b7e5f-882b-404d-a92a-790de0c19f89.thumbnail.png (The system cannot find the file specified)
        at java.io.FileInputStream.open0(Native Method)
        at java.io.FileInputStream.open(Unknown Source)
        at java.io.FileInputStream.<init>(Unknown Source)
        at java.io.FileInputStream.<init>(Unknown Source)
        at com.tsgrp.opencontent.transformation.util.pdfium.PdfiumTransformerUtil.convertThumbnailsToZip(PdfiumTransformerUtil.java:66)
        at com.tsgrp.opencontent.transformation.util.pdfium.PdfiumTransformerUtil.runPdfiumCommand(PdfiumTransformerUtil.java:274)
        at com.tsgrp.opencontent.transformation.util.pdfium.PdfiumTransformerUtil.runPdfiumCommand(PdfiumTransformerUtil.java:120)
        at com.tsgrp.opencontent.transformation.TransformThread.run(TransformThread.java:62)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
[2020-09-15 13:49:49,943|DEBUG|LoggingThreadPoolExecutor|afterExecute|36] Execution of transformation thread Completed.
[2020-09-15 13:49:49,943|ERROR|RESTService|sendErrorResponse|203] Error transforming object with id 'workspace://SpacesStore/828a038c-e272-487b-b18e-cf6915b594e7'
com.tsgrp.opencontent.core.exception.OCRuntimeException: Error transforming object with id 'workspace://SpacesStore/828a038c-e272-487b-b18e-cf6915b594e7'
        at com.tsgrp.opencontent.openannotate.OpenAnnotateImpl.transform(OpenAnnotateImpl.java:168)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
        at org.springframework.cache.interceptor.CacheInterceptor$1.invoke(CacheInterceptor.java:58)
        at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:211)
        at org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:66)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at com.sun.proxy.$Proxy260.transform(Unknown Source)
        at com.tsgrp.opencontent.transformation.rest.RESTOpenAnnotate.getThumbnails(RESTOpenAnnotate.java:295)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)
        at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
        at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:743)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:672)
        at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:82)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:933)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:867)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:855)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.alfresco.module.aosmodule.service.ContextRootFilter.doFilter(ContextRootFilter.java:93)
        at org.apache.catalina.core.ApplicationFilterChain.intern```
jlittle-tsg commented 4 years ago

508 - pdfium is also showing this same message.

m-brouillette commented 3 years ago

Related : https://github.com/tsgrp/OpenAnnotate/issues/508