Hi! I see an extra line break after a page break using Aspose 8.0. This means that the first line of text of the subsequent pages does not start at the same position as the first line on the first page. I have attached the resulting PDF. Here is the code:
public static void PageBreakTest()
{
Pdf pdf = new Pdf();
pdf.CompressionLevel = 6;
Section section = new Section(pdf);
pdf.Sections.Add(section);
AddTextToSection(section, “Here I am at the top!”);
AddPageBreak(section);
AddTextToSection(section, “I am just a little below”);
AddPageBreak(section);
AddTextToSection(section, “Me too… Why?”);
AddPageBreak(section);
string filename = @“d:\PageBreakTest.pdf”;
pdf.Save(filename);
Process.Start(filename);
}
private static void AddTextToSection(Section section, string text)
{
section.Paragraphs.Add(new Text(text));
}
private static void AddPageBreak(Section section)
{
section.Paragraphs.Add(new Text("#$NP"));
}
Thanks,
Jean-François Rouleau