Free Support Forum -

Adding HtmlFragment to existing page changes position of image button

        string dataDir = @"C:\\temp\";
        // Open document
        Document pdfDocument = new Document(dataDir + "TestFile.pdf");

        string html = "Line <b>One</b> </br> Line <b>Two</b> </br> Line <b>Three</b>";

        // create HTML Fragment object
        Aspose.Pdf.HtmlFragment htmlFragment = new Aspose.Pdf.HtmlFragment(html);
        htmlFragment.IsFirstParagraphInColumn = false;
        htmlFragment.IsInLineParagraph = false;
        htmlFragment.IsInNewPage = false;
        htmlFragment.IsKeptWithNext = false;

        // create FloatingBox object to contain HTML Fragment object
        Aspose.Pdf.FloatingBox floatingBox = new Aspose.Pdf.FloatingBox(500, 500);
        floatingBox.Top = 500;
        floatingBox.Left = -50;
        floatingBox.Paragraphs.Insert(0, htmlFragment);

        Aspose.Pdf.Page page = pdfDocument.Pages[1];

        string outFile = dataDir + "TestFileOutput.pdf";

        // Save updated document

TestFile.pdf (10.0 KB)

I need to keep the image button from moving when adding an HtmlFragment to existing page.
I added this issue to the wrong category. The correct category is “Aspose.PDF Product Family category”


No worry. Our Aspose.PDF support team will soon contact you about this issue.


Thank you for contacting support.

I have worked with the data shared by you and have been able to reproduce the issue in our environment. A ticket with ID PDFNET-44344 has been logged in our issue management system for further investigation and resolution. The issue ID has been linked with this thread so that you will receive notification as soon as the issue is resolved.

We are sorry for the inconvenience.

Has this defect been corrected?


We are afraid the the issue reported by you is still pending for investigations owing to previously logged tickets. We will let you know as soon as some significant updates will be available. We appreciate your patience and comprehension in this regard.

However, we also offer Paid Support, where issues are used to be investigated with higher priority. Our customers, who have paid support subscription, report their issue there which are meant to be investigated urgently. In case your reported issue is a blocker, you may please consider subscribing for Paid Support. For further information, please visit Paid Support FAQs.

The issues you have found earlier (filed as PDFNET-44344) have been fixed in Aspose.PDF for .NET 18.11.