menu

WinUI

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfBookletCreator - WinUI API Reference | Syncfusion

    Show / Hide Table of Contents

    Class PdfBookletCreator

    Represents a booklet creator, which allows to create a booklet from a PDF document.

    Inheritance
    System.Object
    PdfBookletCreator
    Namespace: Syncfusion.Pdf
    Assembly: Syncfusion.Pdf.NET.dll
    Syntax
    public sealed class PdfBookletCreator : Object
    Examples
    //Load a PDF document.
    PdfLoadedDocument ldoc = new PdfLoadedDocument("SourceDoc.pdf");
    //Creates a booklet from the given PDF document.         
    PdfDocument doc = PdfBookletCreator.CreateBooklet(ldoc, new SizeF(300, 500));
    //Save the document.
    doc.Save("Booklet.pdf");
    //Close the document.
    doc.Close(true);
    'Load a PDF document.
    Dim ldoc As PdfLoadedDocument = New PdfLoadedDocument("SourceDoc.pdf")
    'Creates a booklet from the given PDF document.              
    Dim doc As PdfDocument = PdfBookletCreator.CreateBooklet(ldoc, New SizeF(300, 500))
    'Save the document.
    doc.Save("Booklet.pdf")
    'Close the document.
    doc.Close(True);

    Methods

    CreateBooklet(PdfLoadedDocument, SizeF)

    Initializes a new instance of the PdfBookletCreator class with PdfLoadedDocument and page size.

    Declaration
    public static PdfDocument CreateBooklet(PdfLoadedDocument loadedDocument, SizeF pageSize)
    Parameters
    Type Name Description
    PdfLoadedDocument loadedDocument

    The existing PDF document.

    SizeF pageSize

    Size of the page.

    Returns
    Type Description
    PdfDocument

    The initialized PDF document, which could be saved.

    Examples
    //Load a PDF document.
    PdfLoadedDocument ldoc = new PdfLoadedDocument("SourceDoc.pdf");
    // Creates a booklet from the given PDF document.         
    PdfDocument doc = PdfBookletCreator.CreateBooklet(ldoc, new SizeF(300, 500));
    //Save the document.
    doc.Save("Booklet.pdf");
    //Close the documents.
    doc.Close(true);
    ldoc.Close(true);
    'Load a PDF document.
    Dim ldoc As PdfLoadedDocument = New PdfLoadedDocument("SourceDoc.pdf")
    'Creates a booklet from the given PDF document.              
    Dim doc As PdfDocument = PdfBookletCreator.CreateBooklet(ldoc, New SizeF(300, 500))
    'Save the document.
    doc.Save("Booklet.pdf")
    'Close the documents.
    doc.Close(True)
    ldoc.Close(True)
    See Also
    PdfDocument
    PdfLoadedDocument

    CreateBooklet(PdfLoadedDocument, SizeF, Boolean)

    Initializes a new instance of the PdfBookletCreator class PdfLoadedDocument, page size and flag to set two side print.

    Declaration
    public static PdfDocument CreateBooklet(PdfLoadedDocument loadedDocument, SizeF pageSize, bool twoSide)
    Parameters
    Type Name Description
    PdfLoadedDocument loadedDocument

    The PdfLoadedDocument.

    SizeF pageSize

    Size of the page.

    System.Boolean twoSide

    if set to true if the result in document should be printed on both sides of paper.

    Returns
    Type Description
    PdfDocument

    The initialized PDF document, which could be saved.

    Examples
    //Load a PDF document.
    PdfLoadedDocument ldoc = new PdfLoadedDocument("SourceDoc.pdf");
    //Creates a booklet from the given PDF document.  
    PdfDocument doc = PdfBookletCreator.CreateBooklet(ldoc, new SizeF(300, 500), false);
    //Save the document.
    doc.Save("Booklet.pdf");
    //Close the documents.
    doc.Close(true);
    ldoc.Close(true);
    'Load a PDF document.
    Dim ldoc As PdfLoadedDocument = New PdfLoadedDocument("SourceDoc.pdf")
    'Creates a booklet from the given PDF document.             
    Dim doc As PdfDocument = PdfBookletCreator.CreateBooklet(ldoc, New SizeF(300, 500), False)
    'Save the document.
    doc.Save("Booklet.pdf")
    'Close the document.
    doc.Close(True)
    ldoc.Close(True)
    See Also
    PdfDocument
    PdfLoadedDocument

    CreateBooklet(PdfLoadedDocument, SizeF, Boolean, PdfMargins)

    Initializes a new instance of the PdfBookletCreator class.

    Declaration
    public static PdfDocument CreateBooklet(PdfLoadedDocument loadedDocument, SizeF pageSize, bool twoSide, PdfMargins margin)
    Parameters
    Type Name Description
    PdfLoadedDocument loadedDocument

    The PdfLoadedDocument

    SizeF pageSize

    Size of the page.

    System.Boolean twoSide

    if set to true if the result in document should be printed on both sides of paper.

    PdfMargins margin

    The margin value for generated PDF document.

    Returns
    Type Description
    PdfDocument

    The initialized PDF document, which could be saved.

    Examples
    //Loads an existing document.
    PdfLoadedDocument srcDoc = new PdfLoadedDocument("sourceDoc.pdf");
    //Specify the margin.
    PdfMargins margin = new PdfMargins();
    margin.All = 10;
    //Creates a booklet from the given PDF document.        
    PdfDocument doc = PdfBookletCreator.CreateBooklet(srcDoc,new SizeF(300, 500), false,margin);
    //Save the document.
    doc.Save("Booklet.pdf");
    //Close the documents.
    doc.Close(true);
    srcDoc.Close(true);
    'Loads an existing document.
    Dim srcDoc As PdfLoadedDocument = New PdfLoadedDocument("sourceDoc.pdf")
    'Specify the margin.
    Dim margin As PdfMargins = New PdfMargins()
    margin.All = 10
    'Creates a booklet from the given PDF document.         
    Dim doc As PdfDocument = PdfBookletCreator.CreateBooklet(srcDoc,New SizeF(300, 500), False,margin)
    'Save the document
    doc.Save("Booklet.pdf")
    'Close the documents.
    doc.Close(True)
    srcDoc.Close(True)
    See Also
    PdfDocument
    PdfLoadedDocument

    CreateBooklet(String, String, SizeF)

    Initializes a new instance of the PdfBookletCreator class with source PDF path,destination file name and page size.

    Declaration
    public static void CreateBooklet(string inputFilePath, string outputFilePath, SizeF pageSize)
    Parameters
    Type Name Description
    System.String inputFilePath

    The path to the file on the disk, which the booklet should be created from.

    System.String outputFilePath

    The path to the file on the disk, which the booklet should be saved into.

    SizeF pageSize

    Size of the page.

    Remarks

    This method is supported in .NET 8.0 and later. It requires the application to run in an environment with file system access. For restricted environments use the CreateBooklet(PdfLoadedDocument, SizeF) method instead.

    Examples
    //Creates a booklet from the given PDF document.
    PdfDocument doc = PdfBookletCreator.CreateBooklet("SourceDocument.pdf","Booklet.pdf",new SizeF(300, 500));
    //Save the document.
    doc.Save("Booklet.pdf");
    //Close the documents.
    doc.Close(true);
    ldoc.Close(true);
    'Load a PDF document.
    Dim ldoc As PdfLoadedDocument = New PdfLoadedDocument("SourceDoc.pdf")
    'Creates a booklet from the given PDF document.             
    Dim doc As PdfDocument = PdfBookletCreator.CreateBooklet(ldoc, New SizeF(300, 500))
    'Save the document.
    doc.Save("Booklet.pdf")
    'Close the document.
    doc.Close(True)
    ldoc.Close(True)
    See Also
    PdfDocument
    PdfLoadedDocument

    CreateBooklet(String, String, SizeF, Boolean)

    Initializes a new instance of the PdfBookletCreator class with source path,destination,page size and flag to set two side print.

    Declaration
    public static void CreateBooklet(string inputFilePath, string outputFilePath, SizeF pageSize, bool twoSide)
    Parameters
    Type Name Description
    System.String inputFilePath

    The path to the file on the disk, which the booklet should be created from.

    System.String outputFilePath

    The path to the file on the disk, which the booklet should be saved into.

    SizeF pageSize

    Size of the page.

    System.Boolean twoSide

    if set to true if the result in document should be printed on both sides of paper.

    Remarks

    This method is supported in .NET 8.0 and later. It requires the application to run in an environment with file system access. For restricted environments use the CreateBooklet(PdfLoadedDocument, SizeF, Boolean) method instead.

    Examples
    //Load a PDF document.
    PdfLoadedDocument ldoc = new PdfLoadedDocument("SourceDoc.pdf");
    //Create booklet with two sides.         
    PdfDocument doc = PdfBookletCreator.CreateBooklet("SourceDocument.pdf","Booklet.pdf",new SizeF(300, 500), true);
    'Load a PDF document.
    Dim ldoc As PdfLoadedDocument = New PdfLoadedDocument("SourceDoc.pdf")
    'Create booklet with two sides.                 
    Dim doc As PdfDocument = PdfBookletCreator.CreateBooklet("SourceDocument.pdf","Booklet.pdf",New SizeF(300, 500), true)
    'Save the document.
    doc.Save("Booklet.pdf")
    'Close the documents.
    doc.Close(True)
    ldoc.Close(True)
    See Also
    PdfDocument
    PdfLoadedDocument

    See Also

    PdfDocument
    PdfLoadedDocument
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved