tsgrp / HPI

OpenContent Management Suite (OCMS)
http://www.tsgrp.com/products
17 stars 5 forks source link

Certain Tiffs converted to PDF/A cannot be displayed in AEV due to transformation Error #2437

Open katiebrill opened 3 years ago

katiebrill commented 3 years ago

I have 9 tiffs that get transformed to pdf (technically pdfA in this case). If I download the resulting PDF/A adobe can display it fine. AEV however cannot display this document. It fails to transform it to PNG it would appear. I can provide the 9 tiffs or their PDFA renditions as well.

These files are fairly large so I am guessing that that has something to do with it. Tiffs are being transformed to PDFA with a custom Aspose Tengine.

[2021-09-07 21:33:17,858|DEBUG|PdfiumTransformer|transformSync|147] Using pdfium to transform image... [2021-09-07 21:33:17,858|DEBUG|LoggingThreadPoolExecutor|beforeExecute|27] Beginning Execution of thread 200 [2021-09-07 21:33:17,858|DEBUG|TransformThread|run|61] Running pdfium command from thread [2021-09-07 21:33:17,858|DEBUG|PdfiumTransformerUtil|runPdfiumCommand|185] Pdfium is transforming content with max processes of 4 [2021-09-07 21:33:17,858|DEBUG|PdfiumTransformerUtil|runPdfiumCommand|233] Launching pdfium Command for process 0 : timeout --kill-after=5s 5s /opt/pdfium/pdfium --png --uniqueId=bceb57fd-2ee6-4a3e-9abb-aba452c0d47b --scale=1.0 --pages=0 /opt/alfresco7/tomcat/temp/TICKET_700131a8c69ea16151463a0eca0980569e913f01-workspaceSpacesStorea773fc81-4dd1-4a7b-af8f-6d3d97a6b1f5-contentTemp-1630596609500.pdf [2021-09-07 21:33:17,858|DEBUG|PdfiumTransformerUtil|runPdfiumCommand|250] Running the pdfium processs [2021-09-07 21:33:22,879|DEBUG|PdfiumTransformerUtil|runPdfiumCommand|272] pdfium process : 0 produced the following output: Processing PDF file /opt/alfresco7/tomcat/temp/TICKET_700131a8c69ea16151463a0eca0980569e913f01-workspaceSpacesStorea773fc81-4dd1-4a7b-af8f-6d3d97a6b1f5-contentTemp-1630596609500.pdf.

[2021-09-07 21:33:22,880|DEBUG|PdfiumTransformerUtil|runPdfiumCommand|296] Deleting file with the name: /opt/alfresco7/tomcat/temp/TICKET_700131a8c69ea16151463a0eca0980569e913f01-workspaceSpacesStorea773fc81-4dd1-4a7b-af8f-6d3d97a6b1f5-contentTemp-1630596609500.pdf.0.bceb57fd-2ee6-4a3e-9abb-aba452c0d47b.png [2021-09-07 21:33:22,880|DEBUG|LoggingThreadPoolExecutor|afterExecute|36] Execution of transformation thread Completed. [2021-09-07 21:33:22,882|ERROR|RESTService|sendErrorResponse|193] Error transforming object with id 'workspace://SpacesStore/a773fc81-4dd1-4a7b-af8f-6d3d97a6b1f5' com.tsgrp.opencontent.core.exception.OCRuntimeException: Error transforming object with id 'workspace://SpacesStore/a773fc81-4dd1-4a7b-af8f-6d3d97a6b1f5' at com.tsgrp.opencontent.openannotate.OpenAnnotateImpl.transform(OpenAnnotateImpl.java:168) at jdk.internal.reflect.GeneratedMethodAccessor1274.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.cache.interceptor.CacheInterceptor.lambda$invoke$0(CacheInterceptor.java:54) at org.springframework.cache.interceptor.CacheAspectSupport.invokeOperation(CacheAspectSupport.java:366) at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:421) at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:345) at org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:64) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215) at com.sun.proxy.$Proxy377.transform(Unknown Source) at com.tsgrp.opencontent.transformation.rest.RESTOpenAnnotate.transform(RESTOpenAnnotate.java:178) at com.tsgrp.opencontent.transformation.rest.RESTOpenAnnotate.transformPOST(RESTOpenAnnotate.java:93) at jdk.internal.reflect.GeneratedMethodAccessor1272.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:197) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:141) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:894) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1060) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:962) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909) at javax.servlet.http.HttpServlet.service(HttpServlet.java:681) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) at javax.servlet.http.HttpServlet.service(HttpServlet.java:764) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:228) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:190) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163) at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:190) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163) at com.tsgrp.opencontent.rest.filter.OCTimingFilter.doFilterInternal(OCTimingFilter.java:83) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:190) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163) at org.springframework.extensions.webscripts.servlet.SecurityHeadersFilter.doFilter(SecurityHeadersFilter.java:177) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:190) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163) at org.alfresco.web.app.servlet.ServletMetricsFilter.doFilter(ServletMetricsFilter.java:161) at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:89) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:190) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163) at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:68) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:190) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163) at org.alfresco.web.app.servlet.ClearSecurityContextFilter.doFilter(ClearSecurityContextFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:190) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1723) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: com.tsgrp.opencontent.core.exception.OCRuntimeException: The transformer encountered an error, the future was interrupted at com.tsgrp.opencontent.transformation.PdfiumTransformer.transformSync(PdfiumTransformer.java:206) at com.tsgrp.opencontent.core.transformation.TransformationImpl.transform(TransformationImpl.java:86) at com.tsgrp.opencontent.openannotate.OpenAnnotateImpl.transform(OpenAnnotateImpl.java:162) ... 74 more Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: IO Error during pdfium transformation at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191) at com.tsgrp.opencontent.transformation.PdfiumTransformer.transformSync(PdfiumTransformer.java:194) ... 76 more Caused by: java.lang.RuntimeException: IO Error during pdfium transformation at com.tsgrp.opencontent.transformation.util.pdfium.PdfiumTransformerUtil.runPdfiumCommand(PdfiumTransformerUtil.java:290) at com.tsgrp.opencontent.transformation.util.pdfium.PdfiumTransformerUtil.runPdfiumCommand(PdfiumTransformerUtil.java:120) at com.tsgrp.opencontent.transformation.TransformThread.run(TransformThread.java:62) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ... 1 more Caused by: java.io.FileNotFoundException: /opt/alfresco7/tomcat/temp/TICKET_700131a8c69ea16151463a0eca0980569e913f01-workspaceSpacesStorea773fc81-4dd1-4a7b-af8f-6d3d97a6b1f5-contentTemp-1630596609500.pdf.0.bceb57fd-2ee6-4a3e-9abb-aba452c0d47b.png (No such file or directory) at java.base/java.io.FileInputStream.open0(Native Method) at java.base/java.io.FileInputStream.open(FileInputStream.java:219) at java.base/java.io.FileInputStream.(FileInputStream.java:157) at java.base/java.io.FileInputStream.(FileInputStream.java:112) at com.tsgrp.opencontent.transformation.util.pdfium.PdfiumTransformerUtil.runPdfiumCommand(PdfiumTransformerUtil.java:285) ... 7 more

gsteimer commented 3 years ago

Moving this to UCR. Also - note that this is not an issue with ACA or AEV, it's an issue in a custom transformer for a customer.