We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Insert a Page Break into existing PDF document using Aspose.PDF

Hello,

Could you please explain if it is possible to insert a Page Break into an existing PDF document using Aspose.PDF, or we must have an Aspose.PDF KIT instead.

Currently we licensed Aspose.PDF, Aspose.Words and Aspose.Cells. All for .NET.

Thank you.

Hello Yuri,

Thanks for considering Aspose.

Aspose.Pdf is a component which is sued to generate PDF files from scratch, whereas if you need to manipulate/edit existing PDF files, please try using Aspose.Pdf.Kit.

By page break, if you mean to insert a new blank page, then I am pleased to inform you that, this feature is supported by Aspose.Pdf.Kit. For further related information, please visit Insert Pages into a PDF Document

If it does not satisfy your requirement, please feel free to share.

I have 200 rows in a single page i want to break the page after each 10 row . and each time i want new page with same header.

Hello Gulam Ansari,

I am afraid currently Aspose.Pdf for .NET does not support the feature to break a table inside an existing PDF document. However for the sake of implementation, I have logged this requirement as PDFNEWNET-30943 under New Features list in our issue tracking system. We will further look into the details of this requirement and will keep you updated on the status of correction. Please be patient and spare us little time. We apologize for this inconvenience.

Hello Gulam Ansari,


Thanks for your patience.

We are pleased to share that the issue reported earlier is fixed and its resolution will be included in upcoming release of Aspose.Pdf for .NET 9.8.0. In order to fulfill your requirements, please try using following code snippet.

[C#]

Document doc = new Document();<o:p></o:p>

doc.Pages.Add();

Aspose.Pdf.Table tab = new Aspose.Pdf.Table();

tab.Border = new Aspose.Pdf.BorderInfo(Aspose.Pdf.BorderSide.All, Aspose.Pdf.Color.Red);

tab.DefaultCellBorder = new Aspose.Pdf.BorderInfo(Aspose.Pdf.BorderSide.All, Aspose.Pdf.Color.Red);

tab.ColumnWidths = "100 100";

for (int counter = 0; counter <= 200; counter++)

{

Aspose.Pdf.Row row = new Aspose.Pdf.Row();

tab.Rows.Add(row);

Aspose.Pdf.Cell cell1 = new Aspose.Pdf.Cell();

cell1.Paragraphs.Add(new TextFragment("Cell " + counter + ", 0"));

row.Cells.Add(cell1); Aspose.Pdf.Cell cell2 = new Aspose.Pdf.Cell();

cell2.Paragraphs.Add(new TextFragment("Cell " + counter + ", 1"));

row.Cells.Add(cell2);

if (counter % 10 == 0 && counter != 0) row.IsInNewPage = true;

}

doc.Pages[1].Paragraphs.Add(tab);

doc.Save("c:/pdftest/200RowTable.pdf");

The issues you have found earlier (filed as PDFNEWNET-30943) have been fixed in Aspose.Pdf for .NET 9.8.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.