Discuss this help topic in SecureBlackbox Forum
TElPDFDocument.OnCreateTemporaryStream
This event is fired when temporary stream is needed.
Declaration
Parameters
Description
Sometimes document needs a temporary buffer for processing. To make memory management more effective, instead of creating its own temporary stream, PDFDocument fires this event.
You should create new stream yourself and return it as
Stream parameter. The stream will
not be disposed of automatically when it is no longer needed, so you can use one stream for many operations. Stream size is set to 0 when the stream is no longer used.
If the application doesn't handle this event or returns nil (null, Nothing) in Stream parameter, then temporary in-memory stream is created and automatically disposed later.