Skip to content

Instantly share code, notes, and snippets.

@aspose-com-kb
Last active November 2, 2024 03:53
Show Gist options
  • Save aspose-com-kb/cb44566e7da800f524ce63f252a29fdd to your computer and use it in GitHub Desktop.
Save aspose-com-kb/cb44566e7da800f524ce63f252a29fdd to your computer and use it in GitHub Desktop.
Impose PDF using C#. For more details: https://kb.aspose.com/pdf/net/impose-pdf-using-csharp/
using Aspose.Pdf;
using Aspose.Pdf.Facades;
class Program
{
static void Main(string[] args)
{
License lic = new License();
lic.SetLicense("license.lic");
// Create PdfFileEditor object
PdfFileEditor pdfEditor = new PdfFileEditor();
// Set output pages organization
int[] leftPages = new int[] { 1, 3 };
int[] rightPages = new int[] { 2, 4 };
// Make booklet
pdfEditor.MakeBooklet("input.pdf", "output.pdf", leftPages, rightPages);
System.Console.WriteLine("PDF Imposition performed successfully");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment