Export to PDF Java

I downloaded dhtmlx.com/x/download/regular/sc … f-java.zip and dropped the war file on Tomcat. I can save the daily and weekly views. When trying to save the monthly view an exception is thrown on the servlet (see below). I’m sending the view like this: scheduler.toPDF(‘scheduler-pdf/generate’, ‘gray’);

Any ideas?

Nov 11, 2013 12:12:26 PM org.apache.catalina.core.StandardWrapperValve invoke
INFO: java.lang.ArrayIndexOutOfBoundsException: 7
at com.dhtmlx.scheduler.PDFWriter.monthEventsDraw(PDFWriter.java:449)
at com.dhtmlx.scheduler.PDFWriter.printMonth(PDFWriter.java:144)
at com.dhtmlx.scheduler.PDFWriter.generate(PDFWriter.java:96)
at PDFGenerator.doPost(PDFGenerator.java:17)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:205)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1686)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Are you using default month view without customization ?
From which day week starts in the problematic case ( monday or sunday ) ?

Try to use the next url for data generation
dhtmlxscheduler.appspot.com/export/pdf
does it works correctly for month view ?

I tried it 10 times in a row and no exception was thrown today using the war file on my server. I’ll let you know if it happens again and will provide more detail on the view and dates. Thanks!

Try next steps:
In client page:
1.
(adjust the path to dhtmlxscheduler_pdf.js)
2. in body

(please note the '[b]/[/b]' before 'scheduler-pdf'). 3. drop the scheduler-pdf.war in the server deploy path. 4. rebuild the war file and drop it off in the server deploy path. Pressing the button "Print PDF" will generate a new pdf page. Bug: More than six events on day will generate a second pdf page with items only for that day. Bug: Pressing the ENTER button in event modal editor will activate save button(no multilines).