LONG GetPageCount () |
{ PDF object is supposed to be created } font := PDF.AddFont('Arial', false, false, false, false, fcDefault); PDF.NewPage; PDF.NewPage; for i := 0 to PDF.GetPageCount()-1 do begin PDF.CurrentPage := i; PDF.UseFont(font, 10); PDF.ShowTextAt(10, 10, 'Page ' + IntToStr(i + 1)); end; PDF.SaveToFile('test.pdf', true);
// PDF object is supposed to be created long font = PDF->AddFont("Arial", false, false, false, false, fcDefault); PDF->NewPage(); PDF->NewPage(); for (int i = 0; i < PDF->GetPageCount(); i++) { PDF->CurrentPage = i; PDF->UseFont(font, 10); CString str; str->Format("Page %d", i + 1); PDF->ShowTextAt(10, 10, str); } PDF->SaveToFile("test.pdf", true);
// PDF object is supposed to be created long font = PDF.AddFont("Arial", false, false, false, false, FontCharset.fcDefault); PDF.NewPage(); PDF.NewPage(); for (int i = 0; i < PDF.GetPageCount(); i++) { PDF.CurrentPage = i; PDF.UseFont(font, 10); string str = "Page " + (i + 1).ToString(); PDF.ShowTextAt(10, 10, str); } PDF.SaveToFile("test.pdf", true);
' PDF object is supposed to be created font = PDF.AddFont("Arial", false, false, false, false, 1) 'fcDefault PDF.NewPage PDF.NewPage for i = 0 to PDF.GetPageCount() - 1 PDF.CurrentPage = i PDF.UseFont font, 10 PDF.ShowTextAt 10, 10, "Page " & i + 1 next PDF.SaveToFile "test.pdf", true