Click or drag to resize

PdfRenderer Class

PdfRenderer is a concrete implementation of the DocumentRenderer class. It is responsible for creating PDF files/streams from PdfGeneratedDocument objects. Most client applications concerned with creating PDF files will either use this class or the Save method in PdfGeneratedDocument (which in turns uses PdfRenderer).
Inheritance Hierarchy
SystemObject
  Atalasoft.PdfDoc.Generating.RenderingDocumentRenderer
    Atalasoft.PdfDoc.Generating.RenderingPdfRenderer
      Atalasoft.PdfDoc.Generating.RenderingPdfARenderer

Namespace:  Atalasoft.PdfDoc.Generating.Rendering
Assembly:  Atalasoft.PdfDoc (in Atalasoft.PdfDoc.dll) Version: 11.4.0.9.0.377 (.NET 4.5.2, x86)
Syntax
public class PdfRenderer : DocumentRenderer

The PdfRenderer type exposes the following members.

Constructors
  NameDescription
Public methodPdfRenderer(Stream)
Creates a new instance of the PdfRenderer class.
Public methodPdfRenderer(String, String, Stream) Obsolete.
Creates a new instance of the PdfRenderer class.
Public methodPdfRenderer(Stream, PdfSaveOptions, Boolean, Boolean)
Initializes a new instance of the PdfRenderer class.
Public methodPdfRenderer(String, String, Stream, Boolean, Boolean) Obsolete.
Initializes a new instance of the PdfRenderer class.
Top
Properties
  NameDescription
Protected propertyCurrentPage
Protected propertyErrorOccurred
Gets or sets a value indicating whether an error occurred in the process of rendering a page. ErrorOccurred will be cleared before rendering begins.
(Inherited from DocumentRenderer.)
Protected propertySaveOptions
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodLLBeginDoc
This method represents the Low-Level implementation of BeginDoc. It is called once at the start of rendering the document after the first DocumentProgress event has been fired, but before the first page is rendered. If a document has an empty Pages collection, LLBeginDoc will not be called. The default implementation does nothing.
(Overrides DocumentRendererLLBeginDoc(PdfGeneratedDocument).)
Protected methodLLBeginPage
Low Level the begin page.
(Overrides DocumentRendererLLBeginPage(PdfGeneratedDocument, BasePage).)
Protected methodLLEndDoc
This method represents the Low-Level implementation of EndDoc. It is called once at the end of rendering a document after the final DocumentProgress event has been fired. If a document has an empty Pages collection, LLEndDoc will not be called. A concrete implementation of DocumentRenderer could use this method for cleaning up temporary files created during the rendering process.
(Overrides DocumentRendererLLEndDoc(PdfGeneratedDocument).)
Protected methodLLEndPage
This method represents the Low-Level implementation of EndPage. A subclass of DocumentRenderer would implement this method to do any processing to finish up after a page has been rendered. For example, a particular instance might need to remove temporary files created earlier. The default implementation does nothing.
(Overrides DocumentRendererLLEndPage(PdfGeneratedDocument, BasePage).)
Protected methodLLGenerate
Low Level generate.
(Overrides DocumentRendererLLGenerate(PdfGeneratedDocument, BasePage, PdfPageRenderer).)
Protected methodMakePageRenderer
Makes the page renderer.
(Overrides DocumentRendererMakePageRenderer(PdfGeneratedDocument, BasePage).)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnDocumentProgress
Raises the [E:DocumentProgress] event.
(Inherited from DocumentRenderer.)
Protected methodPreprocessPageResources
Public methodRender(PdfGeneratedDocument)
Renders the entire PdfGeneratedDocument.
(Inherited from DocumentRenderer.)
Public methodCode exampleRender(PdfGeneratedDocument, ICollectionBasePage)
Renders a subset of pages from the specified document. This method is intended to allow the rendering of a subset of pages from a document. If pages is an empty enumeration, the output is undefined.
(Inherited from DocumentRenderer.)
Protected methodRenderBookmarkTree
Protected methodRenderForm
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Events
  NameDescription
Public eventDocumentProgress
Occurs when progress is made in the overall process of rendering the document. This event is fired when rendering starts, when rendering completes, when each page starts and when each page completes. If the document contains no pages, then precisely one DocumentProgress event will be fired.
(Inherited from DocumentRenderer.)
Top
Examples
public MemoryStream SaveToMemoryStream(PdfGeneratedDocument doc)
{
    MemoryStream stm = new MemoryStream();
    PdfRenderer renderer = new PdfRenderer(stm);
    renderer.Render(doc);
    return stm;
}
See Also