HtmlArea.GetOverflowHtmlArea

Overloads

GetOverflowHtmlArea()Returns a new HtmlArea object containing the overflow html area.
GetOverflowHtmlArea(Single, Single, Single)Returns a new HtmlArea object containing the overflow html area.

GetOverflowHtmlArea()

Returns a new HtmlArea object containing the overflow html area.

public HtmlArea GetOverflowHtmlArea()
Function GetOverflowHtmlArea() As HtmlArea

Returns

HtmlArea

A HtmlArea if there is overflow html area; otherwise, null .

Licensing Info

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Examples

The following example shows you how to use the GetOverflowHtmlArea object.
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.Html;

public class Example
{
    public static void CreatePDF(string inputHTMLPath, string outputPath)
    {        
       // Create a PDF Document
       Document document = new Document();
       
       // Create a Uri
       Uri filePath = new Uri(inputHTMLPath);
        
       // create a html area
       HtmlArea htmlArea = new HtmlArea(filePath, 0, 0, 500, 600);
   
       do
       {
            // Create a new page
            Page page = new Page();
            
            // Add the html area to the page;
            page.Elements.Add(htmlArea);
            
            // Add the page to the document
            document.Pages.Add(page);
            
            // Set the html area object equal to the rest of the html area that did not fit
            // if all the html area did fit, GetOverflowHtmlArea will return null
            htmlArea = htmlArea.GetOverflowHtmlArea(0, 0, 600);           
     
        } while (htmlArea != null);
        
       //Save the PDF
       document.Draw(outputPath); 
    }
}

Remarks

This method returns a new HTML area object that contains the remaining html area that did not fit.

GetOverflowHtmlArea(Single, Single, Single)

Returns a new HtmlArea object containing the overflow html area.

public HtmlArea GetOverflowHtmlArea(float x, float y, float height)
Function GetOverflowHtmlArea(x As Single, y As Single, height As Single) As HtmlArea

Parameters

x
Single

X coordinate of the new object.

y
Single

Y coordinate of the new object.

height
Single

Height of the new object.

Returns

HtmlArea

A HtmlArea if there is overflow html area; otherwise, null .

Licensing Info

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Examples

The following example shows you how to use the GetOverflowHtmlArea object.
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.Html;

public class Example
{
    public static void CreatePDF(string inputHTMLPath, string outputPath)
    {
        
       // Create a PDF Document
       Document document = new Document();
       
       // Create a Uri
       Uri filePath = new Uri(inputHTMLPath);
        
       // create a html area
       HtmlArea htmlArea = new HtmlArea(filePath, 0, 0, 500, 600);
   
       do
       {
            // Create a new page
            Page page = new Page();
            
            // Add the html area to the page;
            page.Elements.Add(htmlArea);
            
            // Add the page to the document
            document.Pages.Add(page);
            
            // Set the html area object equal to the rest of the html area that did not fit
            // if all the html area did fit, GetOverflowHtmlArea will return null
            htmlArea = htmlArea.GetOverflowHtmlArea(0, 0, 600);           
     
        } while (htmlArea != null);
        
       //Save the PDF
       document.Draw(outputPath);  
    }
}

Remarks

This method returns a new HTML area object that contains the remaining html area that did not fit.

See Also

HtmlArea
ceTe.DynamicPDF.PageElements.Html

In this topic