Class Feature
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
ReadWritePdfDocument(string, PdfPasswordProvider?)
Reads and writes a PDF document.
protected string ReadWritePdfDocument(string filename, PdfPasswordProvider? passwordProvider = null)
Parameters
filename
stringThe PDF file to read.
passwordProvider
PdfPasswordProviderThe password provider if the file is protected.
Returns
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
SnippetA 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
Snippetwidth
XUnitheight
XUnitgraphicsUnit
XGraphicsUnitpageDirection
XPageDirection
SaveAndShowDocument(PdfDocument, string)
Saves a PDF document and show it document.
protected string SaveAndShowDocument(PdfDocument document, string filenameTag)
Parameters
document
PdfDocumentThe document.
filenameTag
stringThe filename tag.
Returns
SaveDocument(PdfDocument, string)
Saves a PDF document into a file.
protected string SaveDocument(PdfDocument document, string filenameTag)
Parameters
document
PdfDocumentThe PDF document.
filenameTag
stringThe tag of the PDF file.
Returns
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
PdfDocumentThe document.
stream
StreamThe stream.
filenameTag
stringThe filename tag.
show
boolif set to
true
[show].