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
Licensing Info
This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Ultimate Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Core Suite selected.
- A DynamicPDF Core Suite for .NET v12.X Developer License.
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 coordinate of the new object.
Y coordinate of the new object.
- height
- Single
Height of the new object.
Returns
Licensing Info
This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Ultimate Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Core Suite selected.
- A DynamicPDF Core Suite for .NET v12.X Developer License.
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.