HRESULT AddPage () |
To add a new page and make it current, use the NewPage method.
{ PDF object is supposed to be created } font := PDF.AddFont('Arial', false, false, false, false, fcDefault); PDF.UseFont(font, 10); PDF.ShowTextAt(10, 10, 'This is the 1st page.'); PDF.AddPage; PDF.ShowTextAt(10, 20, 'This is still the 1st page.'); PDF.CurrentPage := 1; PDF.UseFont(font, 10); PDF.ShowTextAt(10, 10, 'This is the 2nd page.'); PDF.SaveToFile('test.pdf', true);
// PDF object is supposed to be created long font = PDF->AddFont("Arial", false, false, false, false, fcDefault); PDF->UseFont(font, 10); PDF->ShowTextAt(10, 10, "This is the 1st page."); PDF->AddPage(); PDF->ShowTextAt(10, 20, "This is still the 1st page."); PDF->CurrentPage = 1; PDF->UseFont(font, 10); PDF->ShowTextAt(10, 10, "This is the 2nd page."); PDF->SaveToFile("test.pdf", true);
// PDF object is supposed to be created long font = PDF.AddFont("Arial", false, false, false, false, FontCharset.fcDefault); PDF.UseFont(font, 10); PDF.ShowTextAt(10, 10, "This is the 1st page."); PDF.AddPage(); PDF.ShowTextAt(10, 20, "This is still the 1st page."); PDF.CurrentPage = 1; PDF.UseFont(font, 10); PDF.ShowTextAt(10, 10, "This is the 2nd page."); PDF.SaveToFile("test.pdf", true);
' PDF object is supposed to be created font = PDF.AddFont("Arial", False, False, False, False, 1) 'fcDefault PDF.UseFont font, 10 PDF.ShowTextAt 10, 10, "This is the 1st page." PDF.AddPage PDF.ShowTextAt 10, 20, "This is still the 1st page." PDF.CurrentPage = 1 PDF.UseFont font, 10 PDF.ShowTextAt 10, 10, "This is the 2nd page." PDF.SaveToFile "test.pdf", true Set PDF = nothing