Table of Contents

Class PdfDocumentRenderer

Namespace
MigraDoc.Rendering
Assembly
MigraDoc.Rendering.dll

Provides the functionality to convert a MigraDoc document into PDF.

public class PdfDocumentRenderer
Inheritance
object
PdfDocumentRenderer

Constructors

PdfDocumentRenderer()

Initializes a new instance of the PdfDocumentRenderer class.

PdfDocumentRenderer(bool)

Initializes a new instance of the PdfDocumentRenderer class.

Properties

Document

Set the MigraDoc document to be rendered by this printer.

DocumentRenderer

Gets or sets a document renderer.

Language

Gets or sets the language.

PageCount

Gets the count of pages.

PdfDocument

Gets or sets the PDF document to render on.

TaggedPdf

Gets or sets whether the document is rendered as a tagged PDF for PDF/UA-1. Paragraphs and headings are tagged with their structure (outline levels 1 to 6 become H1 to H6), and headers, footers, borders and shading are marked as artifacts. The document needs a title (Document.Info.Title); its language comes from Document.Culture. Set it before rendering.

Unicode

Gets a value indicating whether the text is rendered as Unicode. Returns true because text is rendered always in unicode.

WorkingDirectory

Gets or sets a working directory for the printing process.

Methods

HasPdfDocument()

Returns true, if the PdfDocument of this renderer is set.

PrepareRenderPages()

Prepares the document for rendering.

RenderDocument()

Renders the document into a PdfDocument containing all pages of the document.

RenderPages(int, int)

Renders the specified page range.

Save(Stream, bool)

Saves the PDF document to the specified stream.

Save(string)

Saves the PdfDocument to the specified path. If a file already exists, it will be overwritten.

WriteDocumentInformation()

Writes document information like author and subject to the PDF document.