PageSetupSheetsPerBooklet Property |
Namespace: Aspose.Words
Document doc = new Document(); // Use a document builder to create 16 pages of content that will be compiled in a booklet DocumentBuilder builder = new DocumentBuilder(doc); builder.Writeln("My Booklet:"); for (int i = 0; i < 15; i++) { builder.InsertBreak(BreakType.PageBreak); builder.Write($"Booklet face #{i}"); } // Set the number of sheets that will be used by the printer to create the booklet // After being printed on both sides, the sheets can be stacked and folded down the centre // The contents that we placed in such a way that they will be in order once the booklet is folded // We can only specify the number of sheets in multiples of 4 PageSetup pageSetup = doc.Sections[0].PageSetup; pageSetup.MultiplePages = MultiplePagesType.BookFoldPrinting; pageSetup.SheetsPerBooklet = 4; doc.Save(ArtifactsDir + "PageSetup.Booklet.docx");