THPDFPara Class

 

THPDFPara Class

Métodos         Propiedades      Resumen

Arriba  Anterior  Siguiente

THPDFPara proporciona un objeto de párrafo para el documento PDF

 

Unidad

HPDFDoc.pas

 

Descripción

Usa THPDFPara para establecer la justificación, la dirección bidi y las restricciones de mantener con el siguiente, líneas huérfanas y líneas viudas mientras escribes texto de párrafo; consulta Disposición de flujo restringido para el staging de páginas respaldado en archivos, los registros de diagnóstico y los helpers de párrafo PDF/UA

 

Ejemplo de uso:

 

uses

  ...

  HPDFDoc,

  ...

 

type

   ...

      HPDF: THotPDF;

   ...

 

procedure TForm1.ParaButtonClick(Sender: TObject);

var

     ParaIndex: Integer;

begin

     HPDF.AutoLaunch := true;                                         // PDF file will be shown automatically

     HPDF.FileName := 'ParaDemo.pdf';

     HPDF.BeginDoc;                                                      // Create PDF file 

 

     ParaIndex := HPDF.CreateParagraph( 20, jtLeft, 60, 60, 30, 30  ); // Create paragraph

 

     HPDF.ParaAutoAddPage := true;   // Paragraph will add pages automatically

     HPDF.BeginParagraph( ParaIndex );                                        // Open  main paragraph

     HPDF.CurrentPage.SetFont( 'Arial', [fsBold], 14  );                   // Set the paragraph font

     HPDF.CurrentParagraph.Justification := jtCenter;                     // Set Center paragraph justification

     HPDF.CurrentPage.SetRGBFillColor ( clGray );

     HPDF.CurrentParagraph.ShowText( 'VCL component for Delphi for creating PDF documents.' ); // Print paragraph text

     HPDF.CurrentPage.SetRGBFillColor ( clBlack );

     HPDF.CurrentParagraph.NewLine;                                           // Line break

     HPDF.CurrentParagraph.NewLine;                                           // Line break

     HPDF.CurrentParagraph.Justification := jtLeft;                         // Set Left paragraph justification

     HPDF.CurrentParagraph.ShowText ( 'HotPDF is PDF Creation Library for Delphi & C++Builder.' ); // Print paragraph text

     HPDF.EndParagraph;                                                             // Close current paragraph

 

     HPDF.EndDoc;                                                                    // Close PDF file

end;

end;