This example demonstrates how the HotPDF component generates Unicode vertical text.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
unit Unit1; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, HPDFDoc; type TForm1 = class(TForm) Button1: TButton; HotPDF: THotPDF; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.DFM} // Delphi 7 cannot display Unicode characters correctly. // You need Delphi 2007 or above to open this file. procedure TForm1.Button1Click(Sender: TObject); begin HotPDF.BeginDoc; HotPDF.FileName := 'VerticalText.pdf'; HotPDF.CurrentPage.SetFont('Arial Unicode MS', [], 12, 0, False); //Set horizontal text HotPDF.CurrentPage.UnicodeTextOut( 30, 10, 0, 'Horizontal Text Горизонтальный текст 横書き'); //Print horizontal text HotPDF.CurrentPage.SetFont('Arial Unicode MS', [], 12, 0, True); //Set vertical text HotPDF.CurrentPage.UnicodeTextOut( 30, 40, 0, 'Vertical Text'); //Print vertical text HotPDF.CurrentPage.UnicodeTextOut( 70, 40, 0, 'Texto vertical'); HotPDF.CurrentPage.UnicodeTextOut( 110, 40, 0, 'Vertikaler Text'); HotPDF.CurrentPage.UnicodeTextOut( 150, 40, 0, 'Texte vertical'); HotPDF.CurrentPage.UnicodeTextOut( 190, 40, 0, 'Вертикальный текст'); HotPDF.CurrentPage.UnicodeTextOut( 230, 40, 0, 'Testo verticale'); HotPDF.CurrentPage.UnicodeTextOut( 270, 40, 0, '垂直文本'); HotPDF.CurrentPage.UnicodeTextOut( 310, 40, 0, '縦書きテキスト'); HotPDF.CurrentPage.UnicodeTextOut( 350, 40, 0, 'Verticale tekst'); HotPDF.CurrentPage.SetFont('Malgun Gothic Semilight', [], 12, 0, True); //Set Korean Font HotPDF.CurrentPage.UnicodeTextOut( 390, 40, 0, '한국어 텍스트'); HotPDF.EndDoc; end; end. |