error "canvas does not allow drawing" using TppPDFDevice
Hi!
we use a particular "save to pdf" for some of our report, witch divide
a unique job into different pdf files: the code , (we did it about 3
years ago, with rb 12) is like this:
While not TABLE_WITH_PAGE_NR.eof do begin
A := TppPDFDevice.Create(self);
a.Publisher := ppreport.Publisher ;
a.PageSetting := psPageList ;
ppTextToPageList(TABLE_WITH_PAGE_NRPAGES.AsString, a.PageList,
True);
a.FileName := directory + 'FT ' +
TABLE_WITH_PAGE_NRFATTURA.AsString + '.pdf' ;
ppreport.PrintToDevices ;
TABLE_WITH_PAGE_NR.next ;
a.Free;
end;
all worked perfecty until last update : now we have rb 14.06 build 249
( delphi xe sp1 ) and we had the exception I reported in title: "canvas
doest not allow drawing".
it is raised from line "ppreport.PrintToDevices" inside this cycle, but
it isn't raised every time, but every 10/20 iterations.
it seems have a memory leaks or something similar that causes halt of
pdf engine.
any idea?
thanks
we use a particular "save to pdf" for some of our report, witch divide
a unique job into different pdf files: the code , (we did it about 3
years ago, with rb 12) is like this:
While not TABLE_WITH_PAGE_NR.eof do begin
A := TppPDFDevice.Create(self);
a.Publisher := ppreport.Publisher ;
a.PageSetting := psPageList ;
ppTextToPageList(TABLE_WITH_PAGE_NRPAGES.AsString, a.PageList,
True);
a.FileName := directory + 'FT ' +
TABLE_WITH_PAGE_NRFATTURA.AsString + '.pdf' ;
ppreport.PrintToDevices ;
TABLE_WITH_PAGE_NR.next ;
a.Free;
end;
all worked perfecty until last update : now we have rb 14.06 build 249
( delphi xe sp1 ) and we had the exception I reported in title: "canvas
doest not allow drawing".
it is raised from line "ppreport.PrintToDevices" inside this cycle, but
it isn't raised every time, but every 10/20 iterations.
it seems have a memory leaks or something similar that causes halt of
pdf engine.
any idea?
thanks
This discussion has been closed.
Comments
but i still never use it... can you send me a link to an example ?
thanks
Diego Rigoni ha spiegato il 02/10/2012 :
There is a patch available for RB 14.06 that fixes a memory leak with
the PDF device that could solve the problem you are encountering.
Contact support@digital-metaphors.com to receive the patch.
You are correct, for RB 12, we added a feature to automatically save
each group as a new file. See the following article on how to use this
feature.
http://www.digital-metaphors.com/rbWiki/Output/PDF/How_To...Separate_File_for_Each_Group
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik (Digital Metaphors) ha pensato forte :