PDFRasterizer.NET 4.0 is now available. Supports .NET Core. Renders pixel-perfectly.

PDF portfolio

A PDF package or portfolio is a collection of multiple documents packaged together into one PDF file. The documents can be of different file formats, including PDF itself. PDF portfolios allows you to keep multiple files together for distribution or archiving.

The following code sample shows how to enumerate embedded files (if any) and recognize PDF documents. Once a PDF document is extracted, it can be rendered as a regular PDF document as discussed elsewhere in this guide:

using (var stream = new Document(new FileStream(path, FileMode.Open, FileAccess.Read))
{
  var portfolio = new Document(stream);
  foreach (var file in portfolio.EmbeddedFiles)
  {
    if (file.MimeType == "application/pdf" || 
        file.MimeType == null && ".pdf" == Path.GetExtension(file.FileName))
    {
      using (var ms = new MemoryStream())
      {
        file.Write(ms);
        var embedded = new Document(ms);
        // ... render from here
      }
    }
  }
}
Download PDFRasterizer.NET 4.0
We will send you a download link

  • This field is for validation purposes and should be left unchanged.
Why do we ask your email address?
We send tips that speed up your evaluation
We let you know about bug fixes
You can always unsubscribe with one click
We never share your address with a 3rd party
Thank you for your download

We have sent an email with a download link.