Table of Contents

Class PdfGenerationOptions

Namespace
CobaltPdf.Configuration
Assembly
CobaltPdf.dll
public class PdfGenerationOptions
Inheritance
PdfGenerationOptions
Inherited Members

Properties

BypassCsp

Gets or sets whether to bypass the page's Content Security Policy (CSP). Required to be TRUE if injecting custom fonts or scripts into strict websites.

public bool BypassCsp { get; set; }

Property Value

bool

FontDirectory

public string FontDirectory { get; set; }

Property Value

string

HtmlContent

public string HtmlContent { get; set; }

Property Value

string

JavaScriptToRun

A custom JavaScript to execute on the page after the page is idle, but before the 'WaitStrategy' is applied.

public string JavaScriptToRun { get; set; }

Property Value

string

Landscape

public bool Landscape { get; set; }

Property Value

bool

Margins

Gets or sets the PDF page margins. Defaults to 1cm. Use MarginOptions.None for no margins.

public MarginOptions Margins { get; set; }

Property Value

MarginOptions

MediaType

Gets or sets the CSS media type to emulate. Defaults to Screen.

public CssMediaType MediaType { get; set; }

Property Value

CssMediaType

OutputPath

public string OutputPath { get; set; }

Property Value

string

PaperFormat

public string PaperFormat { get; set; }

Property Value

string

PrintBackground

public bool PrintBackground { get; set; }

Property Value

bool

Url

public string Url { get; set; }

Property Value

string

WaitStrategy

The wait strategy to use after the page is idle and 'JavaScriptToRun' has executed. Defaults to WaitOptions.DefaultNetworkIdle.

public WaitOptions WaitStrategy { get; set; }

Property Value

WaitOptions