
'Declaration <DefaultMemberAttribute("Item")> Public NotInheritable Class PdfPageCollection
[DefaultMember("Item")] public sealed class PdfPageCollection
[DefaultMember("Item")] public __gc __sealed class PdfPageCollection
[DefaultMember("Item")] public ref class PdfPageCollection sealed
''' <summary> ''' Adds a new empty page into PDF document. ''' </summary> ''' <param name="pdfFileName">The filename of PDF document.</param> ''' <param name="pageSize">The size of page.</param> Public Shared Sub AddEmptyPageToPdfDocument(pdfFileName As String, pageSize As System.Drawing.SizeF) ' open PDF document Using document As New Vintasoft.Imaging.Pdf.PdfDocument(pdfFileName) ' get the collection of pages of PDF document Dim pages As Vintasoft.Imaging.Pdf.Tree.PdfPageCollection = document.Pages ' add an empty page into collection of pages pages.Add(pageSize) ' save changes to a file document.SaveChanges() End Using End Sub
/// <summary> /// Adds a new empty page into PDF document. /// </summary> /// <param name="pdfFileName">The filename of PDF document.</param> /// <param name="pageSize">The size of page.</param> public static void AddEmptyPageToPdfDocument(string pdfFileName, System.Drawing.SizeF pageSize) { // open PDF document using (Vintasoft.Imaging.Pdf.PdfDocument document = new Vintasoft.Imaging.Pdf.PdfDocument(pdfFileName)) { // get the collection of pages of PDF document Vintasoft.Imaging.Pdf.Tree.PdfPageCollection pages = document.Pages; // add an empty page into collection of pages pages.Add(pageSize); // save changes to a file document.SaveChanges(); } }
System.Object
Vintasoft.Imaging.Pdf.Tree.PdfPageCollection
Target Platforms: .NET 5; .NET Core 3.1; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5