|
THPDFPage |
Top Previous Next |
|
THPDFPage는 PDF 문서의 한 페이지를 나타냅니다
Unit HPDFDoc.pas
Description THPDFPage로 path를 그리고, 텍스트를 배치하고, 이미지를 렌더링하고, 크기, 방향, 그래픽 상태 같은 페이지 수준 설정을 제어합니다 텍스트 좌표가 기본 상단 가장자리 대신 폰트 baseline을 기준으로 해야 하면 일반 워크플로에서 인스턴스는
Using example:
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!'); // 첫 페이지에 텍스트 쓰기 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;
|