search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Error Supplied data is not a JPEG

Related article: HTML5 Scheduler: Paged PDF Export
Asked by Soon
6 months ago.

Hi why i follow the demo script but error orrcurs " Supplied data is not a JPEG" ?
Is that dp.exportAs got problem?

Answer posted by Dan Letecky [DayPilot]
6 months ago.

Yes, most likely there is a problem with exportAs(). Do you see any error message in the javascript console?

Also, remember that exporting large Scheduler grids may hit the browser limits (most browsers limit the memory that can be used for the generated bitmap). You can try exporting SVG to see if this is the problem (SVG doesn't suffer with this problem).

Comment posted by Soon
6 months ago.

LineCards:1383 Uncaught TypeError: dp.exportAs is not a function
at createPdfAsBlobOnePage (LineCards:1383)
at downloadPDF (LineCards:1374)
at HTMLButtonElement.onclick (LineCards:364)

Here is the javascript error

Comment posted by Soon
6 months ago.

Wrong send just now, this one is javascript error

Uncaught Error: Supplied data is not a JPEG
at getJpegSizeFromBytes (jspdf.debug.js:4652)
at Object.jsPDFAPI.processJPEG (jspdf.debug.js:4700)
at Object.jsPDFAPI.addImage (jspdf.debug.js:4596)
at createPdfAsBlobOnePage (LineSchedulers:1305)
at downloadPDF (LineSchedulers:1281)
at HTMLButtonElement.onclick (LineSchedulers:335)

Comment posted by Dan Letecky [DayPilot]
6 months ago.

Would you be able to create a sample page that reproduces the problem?

It looks like the output of exportAs() call is not correct but I would expect an exception being thrown during exportAs() execution in that case.

Comment posted by Soon
6 months ago.

May i know Kanban got exportAs function or not?

This question is more than 6 months old and has been closed. Please create a new question if you have anything to add.