|
THPDFPage |
トップへ 前へ 次へ |
|
THPDFPage は、PDF ドキュメント内の1つのページを表します
ユニット HPDFDoc.pas
説明 THPDFPage を使用して、パスの描画、テキストの配置、画像のレンダリング、およびサイズ、向き、グラフィックス状態などのページレベルの設定の制御を行います テキスト座標を既定の上端位置ではなくフォントのベースラインを基準にしたい場合は 通常のワークフローでは、インスタンスは
使用例:
uses ... HPDFDoc, ...
type ... HPDF: THotPDF; TextBoxResult: THPDFTextOutBoxResult; ...
procedure TForm1.HelloWorldButtonClick(Sender: TObject); begin HPDF.AutoLaunch := true; // 作成後に PDF を表示 HPDF.FileName := '.\HelloWorld.pdf'; HPDF.BeginDoc; // Start PDF generation HPDF.CurrentPage.TextOut(10, 10, 0, 'Hello World!'); // 1 ページ目にテキストを書き込む HPDF.CurrentPage.TextFromBaseLine(true); // Treat following text Y values as baselines HPDF.CurrentPage.TextOut(10, 40, 0, 'Baseline text'); HPDF.CurrentPage.TextFromBaseLine(false); TextBoxResult := HPDF.CurrentPage.TextOutBoxEx(10, 70, 2, 180, 48, 'Wrapped text-box content', jtLeft); HPDF.CurrentPage.AppendScopedRawContent('2 w 10 10 120 45 re S'); HPDF.EndDoc; // PDF を確定して保存 end;
|