+1 800 256 3608 (toll-free in North America) or +49 7531 90 60 10| service@combit.com

Allow pdf export to .Net memorystream


(combit Team) #1

Please allow the export of PDF files into a .NET memorystream. https://msdn.microsoft.com/en-us/library/system.io.memorystream



Today we loose a lot of performance as we first have to export the PDF file on disk, read it into memory afterwards to extend the PDF file metadata and write it back again to disk. If we could get a memorystream of the exported PDF file, we can manipulate the PDF file directly and write it only one time to disk. In todays world with virus scanners which upload samples to the internet in the background to check for infection, this would really help.



Also a lot of Windows Explorer Addins try to anaylze files written to disk, like DropBox.


(Dirk Lippert) #2

Sounds good. Could be an Option for all File operations. (Declaring Pictures via File). If your going to code this prepare an second Api call that Supports the IStream Interface instead. (Microsoft IStream Interface https://msdn.microsoft.com/en-us/library/windows/desktop/aa380034(v=vs.85).aspx)


(Michael Nowagk) #3

Also missing:

  • Initialize PreviewControl from MemoryStream
  • Initialize PreviewFile from MemoryStream
  • Convert PreviewFile to PDF using MemoryStream

Loading, manipulation, exporting and printing a ProjectFile works just fine.


(Armin Back) #4

According to the help file there is an overload of the ExportConfiguration-class which should take an export-stream parameter as the second one … so in theory this should already work …

But I have tried to get this working (and also opened a support case without any reacting) I would give hundreds of votes if possible :wink: because this would be my number one feature, too.


(Armin Back) #5

I must correct my comment: it is already working … the following code shows how it works for me:

----- schnipp ------
System.IO.MemoryStream stream = new System.IO.MemoryStream();
ExportConfiguration exportConfig = new ExportConfiguration(LlExportTarget.Pdf, stream, LL.AutoProjectFile);
LL.Export(exportConfig);
----- schnapp -----


(Michael Nowagk) #6

And now the same with a preview:

I have a preview as memory stream.

I want to convert it to a pdf as memory stream