PDF Generation Template Editor
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
Elements are arranged according to normal document flow, which is the default behavior.
CDiv div1 = page.createDivElement();
div1.createTextElement("First div");
CDiv div2 = page.createDivElement();
div2.createTextElement("Second div"); // Will appear below div1// Create absolutely positioned element
CDiv div = page.createDivElement();
div.setAbsolutePosition(
100, // left: 100 points from page left edge
200, // bottom: 200 points from page bottom edge
300 // width: Width 300 points
);
// Or use percentage width
div.setAbsolutePosition(
100,
200,
CUnitValue.CreatePercentValue(50)
);