|
THPDFPage |
Top Previous Next |
|
THPDFPage representa una única página del documento PDF.
Unidad HPDFDoc.pas
Descripción Use THPDFPage para dibujar trazados, colocar texto, renderizar imágenes y controlar ajustes a nivel de página como tamaño, orientación y estado de gráficos Use En los flujos de trabajo normales las instancias se crean y son propiedad de
Ejemplo de uso:
uses ... HPDFDoc, ...
type ... HPDF: THotPDF; TextBoxResult: THPDFTextOutBoxResult; ...
procedure TForm1.HelloWorldButtonClick(Sender: TObject); begin HPDF.AutoLaunch := true; // Mostrar el PDF después de crearlo HPDF.FileName := '.\HelloWorld.pdf'; HPDF.BeginDoc; // Iniciar la generación del PDF HPDF.CurrentPage.TextOut(10, 10, 0, 'Hello World!'); // Escribir texto en la primera página 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; // Finalizar y guardar el PDF end;
|