Search Results for

    Show / Hide Table of Contents

    Class LinearizationMode

    Specifies the linearization strategy to use when producing a linearized (web-optimized) PDF.

    Inheritance
    System.Object
    LinearizationMode
    Namespace: IronPdf
    Assembly: IronPdf.dll
    Syntax
    public sealed class LinearizationMode : Enum

    The LinearizationMode enumeration in IronPDF selects the build strategy used when emitting a Fast Web View (linearized) PDF.

    Part of the IronPdf namespace, members are Automatic, FileBased, and InMemory (3 total). FileBased keeps peak memory low for large reports, InMemory is faster for short documents, and Automatic lets IronPDF pick based on document size.

    See linearize PDFs for the SaveAsLinearized workflow.

    Fields

    Automatic

    Automatically selects the optimal linearization method based on system capabilities. This is the default and recommended option for most scenarios.

    Declaration
    public const LinearizationMode Automatic
    Field Value
    Type Description
    LinearizationMode
    Remarks

    Behavior:

    1. First attempts to use FileBased linearization.
    2. If disk access is restricted (e.g., limited permissions, sandboxed environment), automatically falls back to InMemory.

    When to Use:

    Recommended for most applications where you want optimal linearization but need to handle varying system environments gracefully.

    FileBased

    Performs linearization using temporary file operations on disk.

    Declaration
    public const LinearizationMode FileBased
    Field Value
    Type Description
    LinearizationMode
    Remarks

    Characteristics:

    • Disk I/O: Requires writing temporary files to the system temp directory

    System Requirements:

    Requires write permissions to the system temporary directory.

    InMemory

    Performs linearization entirely in memory without any disk I/O operations.

    Declaration
    public const LinearizationMode InMemory
    Field Value
    Type Description
    LinearizationMode
    Remarks

    Characteristics:

    • Speed: Fastest linearization method
    • Security: No temporary files written to disk
    • Disk I/O: Zero disk access required

    When to Use:

    • Compliance requirements mandate zero disk I/O (e.g., HIPAA, PCI-DSS)
    • Processing sensitive documents that must not touch the filesystem
    • Sandboxed or restricted environments without disk write permissions
    • Cloud-based environments where disk I/O introduces latency

    value__

    Declaration
    public int value__
    Field Value
    Type Description
    System.Int32
    ☀
    ☾
    Downloads
    • Download with Nuget
    • Start for Free
    In This Article
    Back to top
    Install with Nuget