Canvas printing PDF not working - blank page returned

canvas

#1

Hi Team,
Im in progress of finalising my application build and have noticed that the print function delivers a white page with nothing on it. No errors in the console or on the page,
Please help to find the issue that would cause no printing error and a blank page.
Thanks
Ilia


#2

Hi @ishapiro,

Not much to go on from the information posted. Are you able to see if there are any errors in the logs: WEB-INF\logs\application.log


#3

Failed to wait for the requested page to load

phantomjs://code/with-session.js:129 in checkPageReady
|SetProcessDpiAwareness failed: “COM error 0x80070005 (Unknown error 0x0ffffffff80070005)”

at com.cubewise.j.a(SourceFile:55)
at com.cubewise.servlets.PrintServlet.doGet(SourceFile:67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
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.apache.catalina.filters.ExpiresFilter.doFilter(ExpiresFilter.java:1201)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)

2017-08-29 12:47:30 com.cubewise.servlets.PrintServlet WARN PrintServlet:80 PrintServlet() - File [C:\CWAS\webapps\Allegis_ROBI\WEB-INF\print\c2de04b1-6063-472a-821e-ea3d91051de1.pdf] is not ready yet. Retrying in [10] seconds…
2017-08-29 12:47:40 com.cubewise.servlets.PrintServlet WARN PrintServlet:82 PrintServlet() - Waiting done.


#4

Hi @ishapiro,

What is the version of Canvas that you are using it with?

Also, try this out. On the settings.json file within WEB-INF/config folder, try to find this property printerOutputWaitingPeriod and update it to 20. This will increase the timeout to 20 seconds on these scenarios to wait for the PDF to be generated.

Let us know if there is any effect. Also, while waiting, could you check if there is any PDF file generated within WEB-INF/print folder?


Paul


#5

Hi Paul,
I have changed the printerOutputWaiting to 20sec but still no luck.

phantomjs://code/with-session.js:129 in checkPageReady
|SetProcessDpiAwareness failed: “COM error 0x80070005 (Unknown error 0x0ffffffff80070005)”

at com.cubewise.j.a(SourceFile:55)
at com.cubewise.servlets.PrintServlet.doGet(SourceFile:67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
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.apache.catalina.filters.ExpiresFilter.doFilter(ExpiresFilter.java:1201)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)

2017-08-29 14:00:06 com.cubewise.servlets.PrintServlet WARN PrintServlet:80 PrintServlet() - File [C:\CWAS\webapps\Allegis_ROBI\WEB-INF\print\ecc0e023-fdab-4b4a-b981-2136b27ef884.pdf] is not ready yet. Retrying in [20] seconds…
2017-08-29 14:00:26 com.cubewise.servlets.PrintServlet WARN PrintServlet:82 PrintServlet() - Waiting done.

Cheers,
Ilia


#6

Hi @ishapiro,

Any PDF files generated in WEB-INF\print folder? Note that this is a temporary file, and if there ever should be a file generated within this folder, it will be deleted after 20 seconds.


Paul


#7

No, no file generated in side the print folder
Thanks


#8

Hi Paul,
I have created a blank page from admin and tried printing that page with 40 sec timeout. Nothing has come back as a PDF. The version is the mobile version of the last canvas build.
No file in folder or on screen.
Thanks
Ilia


#9

Hi @ishapiro,

Can you submit a ticket for this? Let us have a look further from there.


Paul