Class PdfBookletCreator
- Namespace
- Syncfusion.Pdf
- Assembly
- Syncfusion.Pdf.Portable.dll
Represents a booklet creator, which allows to create a booklet from a PDF document.
public sealed class PdfBookletCreator
- Inheritance
-
PdfBookletCreator
- Inherited Members
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.
public static PdfDocument CreateBooklet(PdfLoadedDocument loadedDocument, SizeF pageSize)
Parameters
loadedDocument
PdfLoadedDocumentThe existing PDF document.
pageSize
SizeFSize of the page.
Returns
- 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
CreateBooklet(PdfLoadedDocument, SizeF, bool)
Initializes a new instance of the PdfBookletCreator class PdfLoadedDocument, page size and flag to set two side print.
public static PdfDocument CreateBooklet(PdfLoadedDocument loadedDocument, SizeF pageSize, bool twoSide)
Parameters
loadedDocument
PdfLoadedDocumentThe PdfLoadedDocument.
pageSize
SizeFSize of the page.
twoSide
boolif set to
true
if the result in document should be printed on both sides of paper.
Returns
- 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
CreateBooklet(PdfLoadedDocument, SizeF, bool, PdfMargins)
Initializes a new instance of the PdfBookletCreator class.
public static PdfDocument CreateBooklet(PdfLoadedDocument loadedDocument, SizeF pageSize, bool twoSide, PdfMargins margin)
Parameters
loadedDocument
PdfLoadedDocumentpageSize
SizeFSize of the page.
twoSide
boolif set to
true
if the result in document should be printed on both sides of paper.margin
PdfMarginsThe margin value for generated PDF document.
Returns
- 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