Create PDF Booklet in C#, VB.NET

PDF booklet is pretty helpful when people print a huge PDF document. It enjoys special popularity among book, newspaper and magazine editors. This section will introduce a very simple way to create PDF booklet via a .NET PDF component in C#, VB.NET.

Spire.PDF for .NET is a .NET PDF library which can manipulate PDF documents without Adobe Acrobat or any third party library. Using this PDF component, you can quickly create PDF booklet in your .NET applications. After setting the PDF page width and height by a class Spire.Pdf.PdfPageSize, you can create your PDF booklet through implementing PdfDocument.CreateBooklet(string fileName, float width, float height, bool doubleSide) directly. Below picture shows the effect of this task:

Create PDF Booklet

Here you can quickly download Spire.PDF for .NET and install it on your system. After adding Spire.Pdf reference, please see the detail code of PDF booklet below.

Draw PDF Barcode in C#, VB.NET

[C#]
using System.Drawing;
using Spire.Pdf;

namespace PDF_Booklet
{
    class Program
    {
        static void Main(string[] args)
        {
            //Load a PDF file
            PdfDocument doc = new PdfDocument();
            String srcPdf = @"..\read PDF.pdf";

            //Create PDF booklet
            float width = PdfPageSize.A4.Width * 2;
            float height = PdfPageSize.A4.Height;
            doc.CreateBooklet(srcPdf, width, height, true);

            //Save pdf file.
            doc.SaveToFile("Booklet.pdf");
            doc.Close();
            //Launching the Pdf file.
            System.Diagnostics.Process.Start("Booklet.pdf");
        }
    }
}
[VB.NET]
Imports System.Drawing
Imports Spire.Pdf

Namespace PDF_Booklet
	Class Program
		Private Shared Sub Main(args As String())
			'Load a PDF file
			Dim doc As New PdfDocument()
			Dim srcPdf As [String] = "..\read PDF.pdf"

			'Create PDF booklet
			Dim width As Single = PdfPageSize.A4.Width * 2
			Dim height As Single = PdfPageSize.A4.Height
			doc.CreateBooklet(srcPdf, width, height, True)

			'Save pdf file.
			doc.SaveToFile("Booklet.pdf")
			doc.Close()
			'Launching the Pdf file.
			System.Diagnostics.Process.Start("Booklet.pdf")
		End Sub
	End Class
End Namespace

Spire.PDF for .NET is a PDF component that enables you to create, read, edit and manipulate PDF files in C#, VB.NET