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.CreateDiv();
div1.CreateText("First div");
CDiv div2 = page.CreateDiv();
div2.CreateText("Second div"); // Will appear below div1// Create absolutely positioned element
CDiv div = page.CreateDiv();
div.SetAbsolutePosition(
left: 100, // 100 points from page left edge
bottom: 200, // 200 points from page bottom edge
width: 300 // Width 300 points
);
// Or use percentage width
div.SetAbsolutePosition(
left: 100,
bottom: 200,
width: CUnitValue.CreatePercentValue(50)
);