Aspose.Pdf.Examples.CSharp.AsposePDFFacades.WorkingDocument.PageBreak.PageBreakWithStream C# (CSharp) Method

PageBreakWithStream() public static method

public static PageBreakWithStream ( ) : void
return void
        public static void PageBreakWithStream()
        {
            try
            {
                // ExStart:PageBreakWithStream
                // The path to the documents directory.
                string dataDir = RunExamples.GetDataDir_AsposePdfFacades_WorkingDocuments();

                Stream src = new FileStream( dataDir + "input.pdf", FileMode.Open, FileAccess.Read);
                Stream dest = new FileStream(dataDir + "PageBreakWithStream_out.pdf", FileMode.Create, FileAccess.ReadWrite);
                PdfFileEditor fileEditor = new PdfFileEditor();
                fileEditor.AddPageBreak(src, dest, new PdfFileEditor.PageBreak[] 
                { 
                    new PdfFileEditor.PageBreak(1, 450) 
                });
                dest.Close();
                src.Close();
                // ExEnd:PageBreakWithStream  
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message + "\nThis example will only work if you apply a valid Aspose License. You can purchase full license or get 30 day temporary license from http:// Www.aspose.com/purchase/default.aspx.");
            }
        }
    }