Issue with Page break top margin not applied

document (9).pdf (190.3 KB)

I am using Aspose version 24.3.0 for processing html to pdf.
In attached pdf file I am setting some margin at top for every page while PDF creation.
I am applying a page break at page 6, my content is successfully moved to page 7,
but margin which I have set is not applied moreover, some content on page 7 is moved to page 8 while there is still space left on page 7.

@psuryavanshiagy

Would you please share complete sample code snippet that you are using so that we can use it to replicate the issue in our environment and address the issue accordingly. Also, please share the respective source file in .zip format as well.

1596_1.pdf (170.1 KB)

P5.pdf (51.6 KB)

var pdfDoc = new Document(“\Users\Desktop\1596_1.pdf”);
pdfDoc.ProcessParagraphs();
PdfFileEditor fileEditor = new();
MemoryStream streamPageBreak = new();
TextFragmentAbsorber absorber = new(“Section PDF 3”)
{
TextSearchOptions = new TextSearchOptions(true)
};
pdfDoc.Pages.Accept(absorber);
TextFragment textFragment = absorber.TextFragments[1];
fileEditor.AddPageBreak(memory, streamPageBreak, new PdfFileEditor.PageBreak[]
{
new PdfFileEditor.PageBreak(textFragment.Page.Number, textFragment.Rectangle.URY - 1)
});

pdfDoc = new Document(streamPageBreak);
pdfDoc.Save(“\Users\Desktop\P5.pdf”);

@psuryavanshiagy

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFNET-56964

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.