sheets_per_booklet property
PageSetup.sheets_per_booklet property
Returns or sets the number of pages to be included in each booklet.
@property
def sheets_per_booklet(self) -> int:
...
@sheets_per_booklet.setter
def sheets_per_booklet(self, value: int):
...
Examples
Shows how to configure a document that can be printed as a book fold.
doc = aw.Document()
# Insert text that spans 16 pages.
builder = aw.DocumentBuilder(doc=doc)
builder.writeln('My Booklet:')
i = 0
while i < 15:
builder.insert_break(aw.BreakType.PAGE_BREAK)
builder.write(f'Booklet face #{i}')
i += 1
# Configure the first section's "PageSetup" property to print the document in the form of a book fold.
# When we print this document on both sides, we can take the pages to stack them
# and fold them all down the middle at once. The contents of the document will line up into a book fold.
page_setup = doc.sections[0].page_setup
page_setup.multiple_pages = aw.settings.MultiplePagesType.BOOK_FOLD_PRINTING
# We can only specify the number of sheets in multiples of 4.
page_setup.sheets_per_booklet = 4
doc.save(file_name=ARTIFACTS_DIR + 'PageSetup.Booklet.docx')
See Also
- module aspose.words
- class PageSetup