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

Free Support Forum - aspose.com

HtmlFragment.IsKeptWithNext not working

Hi,

I am trying to use a property of a class HtmlFragment.IsKeptWithNext in my code as well as in your demo code.
In both cases, its not working.

Below is the sample code of your demo, I just added this property for testing purpose and its failing.

Please review the below code and identify the issue:

        Document doc = new Document();
        // Add a page to pages collection of PDF file
        Page page = doc.Pages.Add();
        // Instantiate HtmlFragment with HTML contnets
        for (int i = 0; i < 100; i++)
        {
            HtmlFragment title = new HtmlFragment("<p style='font-family: Verdana'><b><i>Table contains text " + i + "</i></b></p>");
            if (i == 46)
                title.IsKeptWithNext = true;               
            page.Paragraphs.Add(title);
        }
        // Save PDF file
        dataDir = dataDir + "AddHTMLUsingDOMAndOverwrite_out.pdf";
        doc.Save(dataDir);

AddHTMLUsingDOMAndOverwrite_out.pdf (98.0 KB)

Thanks

@ovais

Thank you for contacting support.

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

We are sorry for the inconvenience.

Hi Farhan,
Thank you for the prior response and reproduce the issue at your environment.
Please do let me know that is there any timeline defined for this issue resolution by your development team. As we are working on highest priority task for the client and this issue comes as a blocker for us.
Please do let me know if it can be resolved by your development team on as early as possible.

Again thank you for your support.

Regards,
Ovais

@ovais

Please note that the ticket is logged under free support model where tickets are scheduled on first come first serve basis. So the resolution of this ticket may take some months. We appreciate your patience and comprehension in this regard.

Moreover, 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-46931) have been fixed in Aspose.PDF for .NET 19.11.