THPDFPara Class

 

THPDFPara

Methods         Properties      Visão geral

Topo  Anterior  Próxima

THPDFPara fornece um objeto de parágrafo para o documento PDF

 

Unit

HPDFDoc.pas

 

Descrição

Use THPDFPara para definir justificação, direção bidi, restrições keep-with-next, orphan e widow ao escrever texto de parágrafos

Veja Constrained Streaming Layout para staging de páginas respaldado em arquivo, records de diagnóstico e helpers de parágrafos PDF/UA

 

Using example:

 

uses

  ...

  HPDFDoc,

  ...

 

type

   ...

      HPDF: THotPDF;

   ...

 

procedure TForm1.ParaButtonClick(Sender: TObject);

var

     ParaIndex: Integer;

begin

     HPDF.AutoLaunch := true;                                         // O arquivo PDF será exibido automaticamente

     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.' ); // Imprime o texto do parágrafo

     HPDF.CurrentPage.SetRGBFillColor ( clBlack );

     HPDF.CurrentParagraph.NewLine;                                           // Quebra de linha

     HPDF.CurrentParagraph.NewLine;                                           // Quebra de linha

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

     HPDF.CurrentParagraph.ShowText ( 'HotPDF is PDF Creation Library for Delphi & C++Builder.' ); // Imprime o texto do parágrafo

     HPDF.EndParagraph;                                                             // Fecha o parágrafo atual

 

     HPDF.EndDoc;                                                                    // Fecha o arquivo PDF

end