Canvas error and AV when exporting PDF

Hi All,

I've set up PDF export from my grid and it turns out there is a limit to how big the file can get. I'm not sure exactly which part it is, but I've set up a try-Except catch around the call and it catches it, but still an Access Violation end up blocking my appl.

As you might have seen in the forum, I found a way to show the PDF in a separate window, which involves writing the PDF to disk (having the sendfile param set to false in the PDF export call).

The first message I got came when the PDF file was bigger than around 1,5mb. The message I got was "Canvas does not allow drawing". Further logs and Try-Excepts isolated the issue to the file handling after the PDF creation (copy the file to the application.filecache, showing it as a new window and to deleting the file after the copy)

Once that was isolated I managed to get PDF files saved with sizes up to 2.6mb but then got the same error again (Canvas does not allow drawing), this time isolated to the PDFExport call.

I then tried to change SendFile param to true and tried again with both a standard filename 'test1.pdf' and with an URL "c:\users\xxx\documents\test.pdf" and for both it fails with the canvas message,

After all errors, whether I catch them with try-except or not, was followed by an Access Violation error, at the same address. I suppose it is some internal file handling not working as no file was created.

It's a bit unfortunate. I can trap the the Canvas does not allow drawing error, but not the following AV error, which leaves my application hanging and with an Error screen, visible as a procesline icon only, and which cannot be made modal, and where the only option to kill the Appl is to use the joblist, or by right clicking the procesline icon and chose close application.

I hope someone has an idea to what I can do about it.



Thank you for notifying.
We'll have to investigate if there is an issue with generating large PDF files and if there is a possible fix available.