PDF Creator Pilot documentation |
Download CHM version of this manual. |
|
![]() ![]() ![]() ![]() Collapse AllThis method draws a text line in a PDF document starting from the current text position.
|
| HRESULT PDFPAGE_TextShow ( BSTR text ) |
Parameters
text
Text string to be displayed
Return value
If successful, this method returns S_OK. If it fails, this method should return one of the error values.
Remarks
This method draws an ASCII text string starting from the current text position and using the current font. Then current text position moves to the end of the drawn text.
Equivalent in new interface: IPDFDocument4::ShowText.
Example
Drawing Text Using the TextShow Method
Delphi
[copy to clipboard]
// PDF object is supposed to be created
PDF.BeginDoc;
PDF.PDFPAGE_SetActiveFont('Verdana', false, false, false, false, 12.0, 0);
PDF.PDFPAGE_SetTextPosition(100, 100);
PDF.PDFPAGE_TextShow('text1');
PDF.PDFPAGE_SetTextPosition(120, 120);
PDF.PDFPAGE_TextShow('text2');
PDF.EndDoc;
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->BeginDoc();
PDF->PDFPAGE_SetActiveFont("Verdana", FALSE, FALSE, FALSE, FALSE, 12.0, 0);
PDF->PDFPAGE_SetTextPosition(100, 100);
PDF->PDFPAGE_TextShow("text1");
PDF->PDFPAGE_SetTextPosition(120, 120);
PDF->PDFPAGE_TextShow("text2");
PDF->EndDoc();
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.BeginDoc();
PDF.PDFPAGE_SetActiveFont("Verdana", false, false, false, false, 12.0, 0);
PDF.PDFPAGE_SetTextPosition(100, 100);
PDF.PDFPAGE_TextShow("text1");
PDF.PDFPAGE_SetTextPosition(120, 120);
PDF.PDFPAGE_TextShow("text2");
PDF.EndDoc();
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created PDF.BeginDoc PDF.PDFPAGE_SetActiveFont "Verdana", False, False, False, False, 12.0, 0 PDF.PDFPAGE_SetTextPosition 100, 100 PDF.PDFPAGE_TextShow "text1" PDF.PDFPAGE_SetTextPosition 120, 120 PDF.PDFPAGE_TextShow "text2" PDF.EndDoc
See Also
Reference


