Export as PDF to Stream

Hello,

Is it possible to export a report as PDF but to a stream not to a file?

For example if I want to export a report to a stream in it's native format I do something like this :

TMemoryStream* pMem = new TMemoryStream();
Report->PreviewPages->SaveToStream(pMem);
//........etc

At the moment my code looks like this:

TMemoryStream* pMem = new TMemoryStream();
PDFExport->FileName = "tempfile.pdf";
Report->PreviewPages->Export(PDFExport);
pMem->LoadFromFile(PDFExport->FileName);
DeleteFile(PDFExport->FileName);
//........etc

So I have to use a temporary file...

Thanks,
Vasile

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.