Components for Developers
© 2000-2012, Two Pilots

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF-X Pilot History In the Lab

PDF Creator Pilot documentation

Download CHM version of this manual.
How to Create Edit Boxes

Example
Collapse All

Example

C++

[copy to clipboard]
const int MAX_LENGHT = 20;
PM_DOCUMENT doc = PM_DOCUMENT_New();

PM_RECT rc = {0, 0, 600, 800};
PM_RECT rcEditBox1 = {10, 760, 140, 790};
PM_RECT rcEditBox2 = {10, 700, 140, 760};
PM_PAGE page = PM_DOCUMENT_AddPage(doc, rc);
	
PM_ANNOTATION editBox1 = PM_PAGE_AddEditBox(page, rcEditBox1, "EditBox1", doc);
PM_ANNOT_WIDGET_EDITBOX_SetMaxLength(editBox1, MAX_LENGHT);
PM_ANNOT_WIDGET_EDITBOX_SetTextAlign(editBox1, taCenter); //taLeft, taRight, taCenter

PM_ANNOTATION editBox2 = PM_PAGE_AddEditBox(page, rcEditBox2, "EditBox2", doc);
PM_ANNOT_WIDGET_EDITBOX_SetMultiline(editBox2, true);
PM_ANNOT_WIDGET_EDITBOX_SetScrollable(editBox2, true);
PM_ANNOT_WIDGET_EDITBOX_SetTextAlign(editBox2, taLeft);

PM_DOCUMENT_Save(doc, "EditBox.pdf");
PM_DOCUMENT_Free(doc);

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF-X Pilot History In the Lab

 

 

PDF Library | Virtual Printer | Converters to PDF

Support | Blog | Forum | Contacts

© 2000-2012, Two Pilots