WPCubed Product Support

Canvas does not allow drawing

Hi
I am having a problem writing large PDF files.
I am trying to write a two page letter for 5000 students. Each letter is added to a PDF file using WPPDFExport.Print.
After about 4800 writes to the file I get the following error.
Canvas does not allow drawing

I think the problem is that the Method TWPDFEnhMetafile.BeginDraw
has the code

if RefDC = 0 then
      dc := GetDc(0)
    else dc := RefDC;
    try
BUT THEN
    finally
      if RefDC <> 0 then
        ReleaseDC(0, dc);

So the DC resorce is not released.
What do you think?
Is this the problem or is there something else I sould be doing?

Thanks in advance

Jeff

#1 ♥ 0
3.2k Views 2 users read 1 min
support

Yes, certainly, it must be

**if RefDC = 0 then
ReleaseDC(0, dc);**

I cannot explain how this slipped through.

Thanks,

Julian

#2 ♥ 0
This category is archived. No new posts are possible.