com.cete.dynamicpdf.pageelements.Html
Class HtmlAreaPadding
Example 1 : This example shows simple HTML being displayed on the page.
import com.cete.dynamicpdf.*;
import com.cete.dynamicpdf.pageelements.html.*;
public class MyClass {
public static void main(String args[]) {
// Create a PageDimensions
PageDimensions dimensions = new PageDimensions(PageSize.LETTER, PageOrientation.PORTRAIT,50.0f);
// Create a HtmlAreaPadding.
HtmlAreaPadding padding = new HtmlAreaPadding(20.0f, 0.0f, 20.0f, 0.0f);
// Create a PDF Document
Document document = Document.fromHtml("[physicalpath]/TestPage.html", dimensions, padding);
// Save the PDF
document.draw("[Physicalpath]/MyDocument.pdf");
}
}