LONG PDFPAGE_TextOutBox2 ( DOUBLE x, DOUBLE y, DOUBLE boxWidth, DOUBLE boxHeight, TxHorJust horizontalJustification, TxVertJust verticalJustification, BSTR contents ) |
This method draws a text line inside the bounding rectangle with left-top corner at (left, top), box size of (boxWidth, boxHeight), and with the horizontal and vertical justifications specified.
Equivalent in new interface: IPDFDocument4::ShowTextLines.
{ PDF object is supposed to be created } PDF.BeginDoc; PDF.PDFPAGE_SetActiveFont('Helvetica', false, false, false, false, 12.0, 0); PDF.PDFPAGE_Rectangle(100, 100, 240, 140); PDF.PDFPAGE_Stroke; long cnt = PDF.PDFPAGE_TextOutBox2(100, 100, 140, 40, 0, 0,'Here is long text in the box.'); PDF.PDFPAGE_Rectangle(100, 150, 240, 190); PDF.PDFPAGE_Stroke; cnt = PDF.PDFPAGE_TextOutBox2(100, 150, 140, 40, 1, 1, 'Here is long text in the box.'); PDF.PDFPAGE_Rectangle(100, 200, 240, 240); PDF.PDFPAGE_Stroke; cnt = PDF.PDFPAGE_TextOutBox2(100, 200, 140, 40, 2, 2, 'Here is long text in the box.'); PDF.EndDoc;
// PDF object is supposed to be created PDF->BeginDoc(); PDF->PDFPAGE_SetActiveFont("Helvetica", FALSE, FALSE, FALSE, FALSE, 12.0, 0); PDF->PDFPAGE_Rectangle(100, 100, 240, 140); PDF->PDFPAGE_Stroke(); LONG cnt = PDF->PDFPAGE_TextOutBox2(100, 100, 140, 40, 0, 0, "Here is long text in the box."); PDF->PDFPAGE_Rectangle(100, 150, 240, 190); PDF->PDFPAGE_Stroke(); cnt = PDF->PDFPAGE_TextOutBox2(100, 150, 140, 40, 1, 1, "Here is long text in the box."); PDF->PDFPAGE_Rectangle(100, 200, 240, 240); PDF->PDFPAGE_Stroke(); cnt = PDF->PDFPAGE_TextOutBox2(100, 200, 140, 40, 2, 2, "Here is long text in the box."); PDF->EndDoc();
// PDF object is supposed to be created PDF.BeginDoc(); PDF.PDFPAGE_SetActiveFont("Helvetica", false, false, false, false, 12.0, 0); PDF.PDFPAGE_Rectangle(100, 100, 240, 140); PDF.PDFPAGE_Stroke(); long cnt = PDF.PDFPAGE_TextOutBox2(100, 100, 140, 40, 0, 0, "Here is long text in the box."); PDF.PDFPAGE_Rectangle(100, 150, 240, 190); PDF.PDFPAGE_Stroke(); cnt = PDF.PDFPAGE_TextOutBox2(100, 150, 140, 40, 1, 1, "Here is long text in the box."); PDF.PDFPAGE_Rectangle(100, 200, 240, 240); PDF.PDFPAGE_Stroke(); cnt = PDF.PDFPAGE_TextOutBox2(100, 200, 140, 40, 2, 2, "Here is long text in the box."); PDF.EndDoc();
' PDF object is supposed to be created PDF.BeginDoc PDF.PDFPAGE_SetActiveFont "Helvetica", False, False, False, False, 12.0, 0 PDF.PDFPAGE_Rectangle 100, 100, 240, 140 PDF.PDFPAGE_Stroke cnt = PDF.PDFPAGE_TextOutBox2(100, 100, 140, 40, 0, 0, "Here is long text in the box.") PDF.PDFPAGE_Rectangle 100, 150, 240, 190 PDF.PDFPAGE_Stroke cnt = PDF.PDFPAGE_TextOutBox2(100, 150, 140, 40, 1, 1, "Here is long text in the box.") PDF.PDFPAGE_Rectangle 100, 200, 240, 240 PDF.PDFPAGE_Stroke cnt = PDF.PDFPAGE_TextOutBox2(100, 200, 140, 40, 2, 2, "Here is long text in the box.") PDF.EndDoc