Search Results for

    Show / Hide Table of Contents

    Class VirtualPaperLayoutManager

    Manages HtmlToPdf page layout behavior when rendering HTML to virtual PDF paper.

    Provides options for Responsive CSS, Zoom, Fit-To-Page and Continuous feed printing options that are not available in standard Chrome.

    Only one option may be selected at a time.

    Inheritance
    System.Object
    VirtualPaperLayoutManager
    Namespace: IronPdf.Engines.Chrome
    Assembly: IronPdf.dll
    Syntax
    public class VirtualPaperLayoutManager : Object

    Chrome engine in IronPDF is handled through VirtualPaperLayoutManager. It is part of the IronPDF Chrome engine API.

    VirtualPaperLayoutManager matters when an application needs to configure or invoke Chrome engine from C# code. The class encapsulates the related options and behavior in a single object that is set up once and reused across render or processing calls. Typical scenarios include batch generation pipelines, templated document workflows, and integration with existing C# document services.

    To use VirtualPaperLayoutManager, instantiate or obtain it from the relevant entry point in the IronPDF C# API. Key methods include UseChromeDefaultRendering, UseContinuousFeedRendering, UseFitToPageRendering, UseResponsiveCssRendering. Assign options or invoke methods on the instance to configure or perform the operation. The ironpdf 2021 chrome rendering engine eap covers typical usage in C# end to end.

    using IronPdf;
    
    // Obtain VirtualPaperLayoutManager from the relevant entry point in the IronPDF API
    void Configure(VirtualPaperLayoutManager instance)
    {
        instance.UseChromeDefaultRendering();
    }

    For the broader workflow, see the custom paper size guide in the IronPDF C# documentation. For broader context, the Chrome engine portion of the IronPDF C# API contains related types that work with VirtualPaperLayoutManager directly. VirtualPaperLayoutManager exposes additional members beyond those highlighted above; the reference tables on this page list the full set. In application code, treat VirtualPaperLayoutManager as a configured object that is constructed once and reused across operations rather than instantiated per call. Configuration is generally idempotent: assigning the same property value twice has the same effect as assigning it once. For diagnostic purposes, inspect the relevant VirtualPaperLayoutManager property after each operation to confirm the configured state. See the constructors, properties, and methods tables below for the complete API surface of VirtualPaperLayoutManager. Application code typically obtains or instantiates a single VirtualPaperLayoutManager and shares it across multiple IronPDF operations rather than recreating it per call.

    The full declaration uses the VirtualPaperLayoutManager<T> generic form; docfx encodes generic arity as a numeric URL suffix, so the URL path reads VirtualPaperLayoutManager-1.html even though the class name itself is the bare form with type parameters.

    Methods

    UseChromeDefaultRendering()

    Lays out PDF pages in the same way as when viewed from Google Chrome's print preview.

    Responsive CSS viewport is interpreted based on the width of the Specified Paper Size. To change this responsive behavior use UseResponsiveCssRendering(Int32)

    Declaration
    public void UseChromeDefaultRendering()

    UseContinuousFeedRendering(Double, Int32)

    Creates a single page PDF which will force its entire content's width and height to fit into one page. Can be used for a consumer bill or receipt.

    Declaration
    public void UseContinuousFeedRendering(double width = 80, int margin = 5)
    Parameters
    Type Name Description
    System.Double width

    The width in millimeters to apply to the PDF page. Default is 80

    System.Int32 margin

    The margin in millimeters to apply to the PDF page. Default is 5

    UseFitToPageRendering(Int32)

    Scales content to fit the specified PaperSize. This mode measures minimum HTML content width after it is rendered by the browser, and then scales that content to fit to 1 sheet of paper wide where possible.

    A minimum width can be set to control scaling and also to ensure that responsive CSS rules are correctly applied.

    Declaration
    public void UseFitToPageRendering(int MinimumPixelWidth = 1)
    Parameters
    Type Name Description
    System.Int32 MinimumPixelWidth

    A pixel based minimum width for the document. Can help HTML elements to display correctly and respond appropriately to CSS3 responsive layout rules.

    UseResponsiveCssRendering(Int32)

    Uses Responsive CSS to define the rendering of the HTML based on the ViewPortWidth parameter.

    Content will attempt to scale the rendered content content to fill the width of the Specified Paper Size.

    \

    Set CssMediaType to choose between paper and screen CSS interpretations.

    Declaration
    public void UseResponsiveCssRendering(int ViewPortWidth = 1280)
    Parameters
    Type Name Description
    System.Int32 ViewPortWidth

    A pixel based virtual browser viewport for responsive CSS designs.

    UseScaledRendering(Int32)

    Adopts a layout which behaves in the same way the 'Chrome Print Preview' does for a given paper size, with an additional zoom level applied to allow content to be manually scaled by the developer.

    Responsive CSS is interpreted based on the width of the Specified Paper Size

    Declaration
    public void UseScaledRendering(int ZoomPercentage = 100)
    Parameters
    Type Name Description
    System.Int32 ZoomPercentage

    A percentage based scale factor on the HTML document.

    See Also

    ChromePdfRenderOptions
    PaperSize
    ☀
    ☾
    Downloads
    • Download with Nuget
    • Start for Free
    In This Article
    Back to top
    Install with Nuget
    IronPDF_for_dotnet_log2o
    Blue key in circleGet started for FREE
    No credit card required
    Test in a live environment

    Test in production without watermarks.
    Works wherever you need it to.

    Fully-functional product

    Get 30 days of fully functional product.
    Have it up and running in minutes.

    24/5 technical support

    Full access to our support engineering team during your product trial

    Grey key in circleGet started for FREE
    The trial form was submitted successfully.
    Calendar in circleBook Free Live Demo
    No contact, no card details, no commitments Book a 30-minute, personal demo.
    Here's what to expect:

    A live demo of our product and its key features

    Get project specific feature recommendations

    All your questions are answered to make sure you have all the information you need. (No commitment whatsoever.)

    Grey key in circleBook Free Live Demo
    Your booking has been completed Check your e-mail for confirmation
    Support Team Member 6 related to The C# PDF Library Support Team Member 14 related to The C# PDF Library Support Team Member 4 related to The C# PDF Library Support Team Member 2 related to The C# PDF Library
    Online 24/5
    Need help? Our sales team would be glad to help you.
    Try the Enterprise Trial
    ironpdf_for_dotnet_log2o
    Key in blue circle
    Get your free 30-day Trial Key instantly.
    bullet_checkedNo credit card or account creation required
    Key in blue circle
    Get your free 30-day Trial Key instantly.
    Blue key in circleNo credit card or account creation required
    Green Check in orange circle
    The trial form was submitted successfully.
    badge_greencheck_in_yellowcircle
    Thank you for starting a trial

    Please check your email for the trial license key.

    If you don’t receive an email, please start a live chat or email support@ironsoftware.com

    Install with NuGet
    View Licensing
    • Logo Aetna
    • Logo NASA
    • Logo GE
    • Logo Porsche
    • Logo USDA
    • Logo Qatar
    Join Millions of Engineers who’ve tried IronPDF