This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /api/python/settings/format/pdf-settings.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. PdfSettings

Settings for Pdf. Values fall back through three levels: document → SDK → built-in default. Writes target the document only when set on a document’s settings, otherwise the SDK globally when set on SdkSettings.

Tags: Format

from nutrient_sdk import PdfSettings

Construction

PdfSettings is accessed through a Document instance for per-document overrides, or via SdkSettings for SDK-wide defaults.

# Per-document override
with Document.open("input.pdf") as doc:
settings = doc.settings.pdf_settings
settings.some_field = new_value # mutate fields directly
# SDK-wide default (applies to all documents)
SdkSettings.pdf_settings.some_field = new_value

Settings are configured by writing to fields on the returned object. The settings property itself cannot be reassigned — doc.settings.pdf_settings = other_settings is rejected.

Properties

bitonal_image_compression

@property
def bitonal_image_compression(self) -> PdfCompression
@bitonal_image_compression.setter
def bitonal_image_compression(self, value: PdfCompression) -> None

The compression method to use for bitonal (black and white) images in PDF documents.

Type: PdfCompression

Default: PdfCompression.PdfCompressionJBIG2


color_image_compression

@property
def color_image_compression(self) -> PdfCompression
@color_image_compression.setter
def color_image_compression(self, value: PdfCompression) -> None

The compression method to use for color images in PDF documents.

Type: PdfCompression

Default: PdfCompression.PdfCompressionJPEG


conformance

@property
def conformance(self) -> PdfConformance
@conformance.setter
def conformance(self, value: PdfConformance) -> None

The PDF conformance level for the output document.

Type: PdfConformance

Default: PdfConformance.PDF1_7


enable_color_detection

@property
def enable_color_detection(self) -> bool
@enable_color_detection.setter
def enable_color_detection(self, value: bool) -> None

Indicates whether automatic color detection is enabled to determine if an image is bitonal or color.

Type: bool

Default: false


enable_linearization

@property
def enable_linearization(self) -> bool
@enable_linearization.setter
def enable_linearization(self, value: bool) -> None

Indicates whether PDF linearization (fast web view) is enabled. Linearized PDFs can be displayed page-by-page while still downloading.

Type: bool

Default: false


force_image_dpi

@property
def force_image_dpi(self) -> int
@force_image_dpi.setter
def force_image_dpi(self, value: int) -> None

Forces all images in the PDF to a specific DPI (dots per inch) resolution. A value of 0 means no DPI forcing is applied.

Type: int

Default: 0


mode

@property
def mode(self) -> PdfSettingsMode
@mode.setter
def mode(self, value: PdfSettingsMode) -> None

The mode options for PDF processing.

Type: PdfSettingsMode

Default: PdfSettingsMode.Unspecified


optimize

@property
def optimize(self) -> bool
@optimize.setter
def optimize(self, value: bool) -> None

Indicates whether PDF optimization is enabled to reduce file size.

Type: bool

Default: false


save_preferences

@property
def save_preferences(self) -> PdfSavePreferences
@save_preferences.setter
def save_preferences(self, value: PdfSavePreferences) -> None

Preferences for saving PDF documents.

Type: PdfSavePreferences

Default: PdfSavePreferences.None


use_deflate_on_jpeg

@property
def use_deflate_on_jpeg(self) -> bool
@use_deflate_on_jpeg.setter
def use_deflate_on_jpeg(self, value: bool) -> None

Indicates whether Deflate compression should be applied to JPEG images.

Type: bool

Default: false


zlib_level

@property
def zlib_level(self) -> int
@zlib_level.setter
def zlib_level(self, value: int) -> None

The compression level for Zlib/Deflate compression. Higher values provide better compression but take longer to process.

Type: int

Default: 4