Xojo Conferences
XDCMay2019MiamiUSA
MBSOct2019CologneDE

DynaPDF Manual - Page 659

Previous Page 658   Index   Next Page 660

Function Reference
Page 659 of 766
pdfSetDocInfo(pdf, diCreator, "Tab order");
pdfCreateNewPDF(pdf, "c:/cppout.pdf");
pdfSetPageCoords(pdf, pcTopDown);
pdfAppend(pdf);
y = 50.0; index = 0;
for (SI32 i = 0; i < 50; i++)
{
sprintf(tmp, "Field %d", i);
if (i & 1)
{
// This is the second column, the field indices can be left
// unchanged because they are above 1000.
pdfCreateTextField(pdf, tmp, -1, false, 0, 210, y, 150, 20);
y += 25.0; // goto the next line
}else
{
field = pdfCreateTextField(pdf, tmp, -1, false,0,50,y,150,20);
pdfSetFieldIndex(pdf, field, index++);
}
}
pdfSortFieldsByIndex(pdf);
pdfEndPage(pdf);
pdfCloseFile(pdf);
pdfDeletePDF(pdf); // Do not forget to delete the PDF instance
}
 

Previous topic: SetFieldIndex

Next topic: SetFieldName