Large html on dlex

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v12)  /  Large html on dlex

DynamicPDF CoreSuite for .NET (v12) Forum

 Jun 11 2024 2:11 PM
I have a dlex template (created in the DynamicPDF Designer tool), which has a need for rendering a field which contains a potentially unlimited amount of html (coming from the available data for the report). The implementation currently is adding a Placeholder control in the template, and catching it in my c# code:
        private void ReplaceDisclosuresPlaceholder_LaidOut(object sender, PlaceHolderLaidOutEventArgs e)
        {
            string disclosures = (string)e.LayoutWriter.Data["Disclosures"];
            PageElements.ContentArea placeHolder = e.ContentArea;
            HtmlArea htmlArea = new HtmlArea(disclosures, 0, 0, 720, 900);
            Page page = new Page();
            page.Elements.Add(htmlArea);
            placeHolder.Add(page.Elements);
        }

This works great if the html is small and fits on a single page of my report. If it's longer than that, then the html will carry on off the bottom of the page (through the footer of the template) and will not create new page(s) in my report. I am hoping it would behave the same way as the Formatted Record Area control, but it does not.

I have played with the GetOverflowHtmlArea function in a loop, but it only creates separate pages without my header or footer from the report.

Does anyone have any ideas on how to render the html and have it properly spread across multiple pages on my report with header and footer? Ideally, I would love to see the HtmlArea control painted onto the report and support the same behaviour as the Formatted Record Area!
 Jun 11 2024 3:57 PM
Please note that we need to support bullet lists and numbered lists in the html, so the FormattedTextArea control is not quite robust enough.
 Jun 12 2024 6:24 AM
Hey there,
The HTML content you're trying to add is too long for just one page, and it's not making new pages when it overflows. To fix this, you might need to split the HTML into smaller parts and put each part on its own page. But, it looks like the current method you're using doesn't keep headers and footers when it makes new pages.To handle this, you may need to find a different way or make some changes to your current method. Also, if you're using bullet or numbered lists in the HTML, you'll need to make sure they show up correctly on each page.

All times are US Eastern Standard time. The time now is 7:37 AM.