LONG AddFont ( BSTR fontFace, VARIANT_BOOL bold, VARIANT_BOOL italic, VARIANT_BOOL underline, VARIANT_BOOL strikeout, FontCharset charset ) |
{ PDF object is supposed to be created } charSet := fcDefault; font1 := PDF.AddFont('Arial', true, true, true, true, charset); font2 := PDF.AddFont('Georgia', false, false, false, false, charset); font3 := PDF.AddFont('Comic Sans MS', false, false, true, false, charset); str := 'Here is the text. 0123456789.'; PDF.UseFont(font1, 14); PDF.ShowTextAt(20, 20, str); PDF.UseFont(font2, 14); PDF.ShowTextAt(20, 40, str); PDF.UseFont(font3, 14); PDF.ShowTextAt(20, 60, str); PDF.SaveToFile('test.pdf', true);
// PDF object is supposed to be created FontCharset charSet = fcDefault; long font1 = PDF->AddFont("Arial", true, true, true, true, charset); long font2 = PDF->AddFont("Georgia", false, false, false, false, charset); long font3 = PDF->AddFont("Comic Sans MS", false, false, true, false, charset); char* str = "Here is the text. 0123456789."; PDF->UseFont(font1, 14); PDF->ShowTextAt(20, 20, str); PDF->UseFont(font2, 14); PDF->ShowTextAt(20, 40, str); PDF->UseFont(font3, 14); PDF->ShowTextAt(20, 60, str); PDF->SaveToFile("test.pdf", true);
// PDF object is supposed to be created FontCharset charSet = FontCharset.fcDefault; long font1 = PDF.AddFont("Arial", true, true, true, true, charset); long font2 = PDF.AddFont("Georgia", false, false, false, false, charset); long font3 = PDF.AddFont("Comic Sans MS", false, false, true, false, charset); string str = "Here is the text. 0123456789."; PDF.UseFont(font1, 14); PDF.ShowTextAt(20, 20, str); PDF.UseFont(font2, 14); PDF.ShowTextAt(20, 40, str); PDF.UseFont(font3, 14); PDF.ShowTextAt(20, 60, str); PDF.SaveToFile("test.pdf", true);
' PDF object is supposed to be created charSet = 0 'FontCharset.fcDefault font1 = PDF.AddFont("Arial", true, true, true, true, charset) font2 = PDF.AddFont("Georgia", false, false, false, false, charset) font3 = PDF.AddFont("Comic Sans MS", false, false, true, false, charset) str = "Here is the text. 0123456789." PDF.UseFont font1, 14 PDF.ShowTextAt 20, 20, str PDF.UseFont font2, 14 PDF.ShowTextAt 20, 40, str PDF.UseFont font3, 14 PDF.ShowTextAt 20, 60, str PDF.SaveToFile "test.pdf", true