PDF Generation
It seems there is a problem with this. I am having trouble with the file not
beeing closed after generation - it might be that the file is empty because
there was nothing to generate.
I was debugging and saw that in TPsRBPDFDevice.EndJob it exited on the first
statement event though it created a stream in StartJob (FMainStrea); this
causes the stream not to be closed (maybe never to be free'ed) and therefore
I am unable to use the file for further processing (attach it to an email)
because it is locked.
Perhaps the least you could do was to put and "FreeAndNil(FMainstream);" in
the procedure before you just exit to make sure the the stream is at least
closed.
Also it seems that FMainstream is this senario is never free'ed and closed -
no Destructor on TPsRBExportDevice that takes care of that so I assume you
might have a memory leak here.
For now I have worked around this problem by using my own stream and making
sure in a try finally block that it is free'd and closed.
beeing closed after generation - it might be that the file is empty because
there was nothing to generate.
I was debugging and saw that in TPsRBPDFDevice.EndJob it exited on the first
statement event though it created a stream in StartJob (FMainStrea); this
causes the stream not to be closed (maybe never to be free'ed) and therefore
I am unable to use the file for further processing (attach it to an email)
because it is locked.
Perhaps the least you could do was to put and "FreeAndNil(FMainstream);" in
the procedure before you just exit to make sure the the stream is at least
closed.
Also it seems that FMainstream is this senario is never free'ed and closed -
no Destructor on TPsRBExportDevice that takes care of that so I assume you
might have a memory leak here.
For now I have worked around this problem by using my own stream and making
sure in a try finally block that it is free'd and closed.
This discussion has been closed.
Comments
The TPsRBPDFDevice class is a Pragnaan class, you must be using the Pragnaan
RB Export Devices. Try contacting Pragnaan tech support with this issue.
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com