Table of Contents

Class Feature

Namespace
PdfSharp.Quality
Assembly
PdfSharp.Quality-gdi.dll

Base class for features.

public abstract class Feature : FeatureAndSnippetBase
Inheritance
Feature
Derived
Inherited Members

Constructors

Feature()

protected Feature()

Methods

CreateNewPdfDocument()

Creates a PDF test document.

protected PdfDocument CreateNewPdfDocument()

Returns

PdfDocument

ReadWritePdfDocument(string, PdfPasswordProvider?)

Reads and writes a PDF document.

protected string ReadWritePdfDocument(string filename, PdfPasswordProvider? passwordProvider = null)

Parameters

filename string

The PDF file to read.

passwordProvider PdfPasswordProvider

The password provider if the file is protected.

Returns

string

RenderAllSnippets()

Renders all code snippets to PDF.

protected virtual void RenderAllSnippets()

RenderSnippetAsPdf(Snippet)

Renders a code snippet to PDF.

protected void RenderSnippetAsPdf(Snippet snippet)

Parameters

snippet Snippet

A code snippet.

RenderSnippetAsPdf(Snippet, XUnit, XUnit, XGraphicsUnit, XPageDirection)

Renders a code snippet to PDF.

protected void RenderSnippetAsPdf(Snippet snippet, XUnit width, XUnit height, XGraphicsUnit graphicsUnit, XPageDirection pageDirection)

Parameters

snippet Snippet
width XUnit
height XUnit
graphicsUnit XGraphicsUnit
pageDirection XPageDirection

SaveAndShowDocument(PdfDocument, string)

Saves a PDF document and show it document.

protected string SaveAndShowDocument(PdfDocument document, string filenameTag)

Parameters

document PdfDocument

The document.

filenameTag string

The filename tag.

Returns

string

SaveDocument(PdfDocument, string)

Saves a PDF document into a file.

protected string SaveDocument(PdfDocument document, string filenameTag)

Parameters

document PdfDocument

The PDF document.

filenameTag string

The tag of the PDF file.

Returns

string

SaveToStreamOrSaveToFile(PdfDocument, Stream?, string, bool)

Saves a PDF document to stream or save to file.

protected string? SaveToStreamOrSaveToFile(PdfDocument document, Stream? stream, string filenameTag, bool show)

Parameters

document PdfDocument

The document.

stream Stream

The stream.

filenameTag string

The filename tag.

show bool

if set to true [show].

Returns

string