PDF Creator Pilot documentation |
Download CHM version of this manual. |
|
![]() ![]() Collapse AllWith the following steps, you can see how to easily manipulate text using PDF Creator Pilot 4. 1. Choose a color, for example, with SetColor method. Also, choose a line width with SetLineWidth for new text. You can also set character spacing and word spacing and text rendering mode. Delphi : PDF.SetColor(0, 0, 0, 0); PDF.SetLineWidth(1); PDF.SetCharacterSpacing(0.5); PDF.SetWordSpacing(-0.6); Visual Basic or Visual Basic Script : PDF.SetColor 0, 0, 0, 0 PDF.SetLineWidth 1 PDF.SetCharacterSpacing 0.5 PDF.SetWordSpacing -0.6 C/C++ : PDF->SetColor(0, 0, 0, 0); PDF->SetLineWidth(1); PDF->SetCharacterSpacing(0.5f); PDF->SetWordSpacing(-0.6f); C# : PDF.SetColor(0, 0, 0, 0); PDF.SetLineWidth(1); PDF.SetCharacterSpacing(0.5f); PDF.SetWordSpacing(-0.6f); 2. Select a font, with the name, style, weight, and character set, for the new text string. You may select one of system fonts (AddFont method), or some font from file (AddFontFromFile method), or one of standart 14 fonts (AddBuiltInFont method). After you added a font, use it by calling UseFont method. Delphi : fnt := PDF.AddFont('Georgia', false, true, false, false, fcDefault);
PDF.UseFont(fnt, 14);
Visual Basic or Visual Basic Script : fnt = PDF.AddFont("Georgia", false, true, false, false, 1) 'fcDefault = 1
PDF.UseFont(fnt, 14);
C/C++ : long fnt = PDF->AddFont("Georgia", false, true, false, false, fcDefault)
PDF->UseFont(fnt, 14);
C# : long fnt = PDF.AddFont("Georgia", false, true, false, false, FontCharset.fcDefault)
PDF.UseFont(fnt, 14);
The previous line creates text with a Georgia font, size 14, in default character set, italic style. 3. Place your text string at specific coordinates or all text wrapped in a box. Delphi : PDF.ShowTextAt(10, 40, 'Simple test');
PDF.ShowText('Other text.');
Visual Basic or Visual Basic Script : PDF.ShowTextAt 10, 40, "Simple test" PDF.ShowText "Other text." C/C++ : PDF->ShowTextAt(10, 40, "Simple test");
PDF->ShowText("Other text.");
C# : PDF.ShowTextAt(10, 40, "Simple test");
PDF.ShowText("Other text.");
See Text methods for more details.
|



See Also