Azure Blob Storage

PDFs can be loaded from and saved to files, streams, and binary arrays, all of which can work with Blob Storage.

Loading a PDF from Memory

A new instance of IronPdf.PdfDocument can be initialized from any of these in-memory objects:

  • A MemoryStream
  • A FileStream
  • Binary data as a byte array (byte[])

This approach allows loading a PDF from memory efficiently.

Saving a PDF to Memory

An IronPdf.PdfDocument can be saved directly to memory in one of two ways:

  • IronPdf.PdfDocument.Stream exports the PDF as a System.IO.MemoryStream.
  • IronPdf.PdfDocument.BinaryData exports the PDF as a byte array (byte[]).

This makes it easy to work with PDFs in environments where disk access may be restricted or when you need to pass data between systems in memory.

Further reading

Chaknith Bin
Software Engineer
Chaknith works on IronXL and IronBarcode. He has deep expertise in C# and .NET, helping improve the software and support customers. His insights from user interactions contribute to better products, documentation, and overall experience.