• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class DocumentRenderingExtensions

Extension methods on Document that enable raster-image export.

Inheritance
object
DocumentRenderingExtensions
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: DRIT.Pdf.Rendering
Assembly: DRIT.Pdf.dll
Syntax
public static class DocumentRenderingExtensions
Remarks

Add a reference to DRIT.Pdf.Rendering to bring these methods into scope.

Methods

Print(Document)

Prints all pages using default print options.

Declaration
public static void Print(this Document document)
Parameters
Type Name Description
Document document
Remarks

Add a reference to DRIT.Pdf.Rendering to bring these methods into scope.

Print(Document, PrintOptions)

Prints pages by rendering them and invoking the optional callback for each page.

Declaration
public static void Print(this Document document, PrintOptions options)
Parameters
Type Name Description
Document document
PrintOptions options
Remarks

Add a reference to DRIT.Pdf.Rendering to bring these methods into scope.

Save(Document, Stream, ImageSaveOptions)

Renders a single page of document to a raster image and writes the encoded bytes to stream.

Declaration
public static void Save(this Document document, Stream stream, ImageSaveOptions options)
Parameters
Type Name Description
Document document

The source PDF document.

Stream stream

Destination stream (must be writable).

ImageSaveOptions options

Image export options (format, page index, width, …).

Remarks

Add a reference to DRIT.Pdf.Rendering to bring these methods into scope.

Save(Document, string, ImageSaveOptions)

Renders a single page of document to a raster image and writes it to the file at filePath. The file is created or overwritten.

Declaration
public static void Save(this Document document, string filePath, ImageSaveOptions options)
Parameters
Type Name Description
Document document

The source PDF document.

string filePath

Destination file path. The extension is not used to determine the format; use options for that.

ImageSaveOptions options

Image export options (format, page index, width, …).

Remarks

Add a reference to DRIT.Pdf.Rendering to bring these methods into scope.

Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX