Skip to main content

Configuration

Version: 12.0

Configuration

By default, DynamicPDF Core Suite for .NET creates single-pass (non-linearized) PDF documents tagged as PDF version 1.7. Change these values either programmatically or through a global configuration file. Apply the configuration values globally through a configuration file. Apply the configuration values to a single Document instance through the instance's PdfVersion and PdfFormat properties.

info

Configuration values set for a Document overrides any global configuration values.

Configuration File​

Specify the default PDF version and global format using the appSettings node in your application's .config (web.config for web applications) file. The following example illustrates.

<appSettings>
<add key=" ceTe.DynamicPDF.Document.DefaultPdfFormat" value="Linearized" />
<add key=" ceTe.DynamicPDF.Document.DefaultPdfVersion" value="1.5" />
</appsettings>

The following table provides the key name and the acceptable values.

KeyAcceptable ValuesDefault
ceTe.DynamicPDF.Document.DefaultPdfFormatSinglePass, LinearizedSinglePass
ceTe.DynamicPDF.Document.DefaultPdfVersion1.3, 1.4, 1.5, 1.6, 1.71.7

Static Properties​

The DefaultPdfFormat and DefaultPdfVersion static properties for a Document object can also be set programmatically rather than in a .config file.

document.DefaultPdfFormat = PdfFormat.Linearized;
document.DefaultPdfVersion = PdfVersion.v1_5;
document.DefaultPdfFormat = PdfFormat.Linearized
document.DefaultPdfVersion = PdfVersion.v1_5
info

This only affects document objects created after the static properties are set.