|
THPDFPara |
Top Previous Next |
|
THPDFPara fornisce un oggetto paragrafo per il documento PDF
Unità HPDFDoc.pas
Descrizione Usa THPDFPara per impostare giustificazione, direzione bidi, vincoli keep-with-next, orphan e widow durante la scrittura del testo del paragrafo Vedi Constrained Streaming Layout for file-backed page staging, diagnostic records, and PDF/UA paragraph helpers
Esempio d'uso:
uses ... HPDFDoc, ...
type ... HPDF: THotPDF; ...
procedure TForm1.ParaButtonClick(Sender: TObject); var ParaIndex: Integer; begin HPDF.AutoLaunch := true; // Il file PDF verrà mostrato automaticamente HPDF.FileName := 'ParaDemo.pdf'; HPDF.BeginDoc; // Crea il file PDF
ParaIndex := HPDF.CreateParagraph( 20, jtLeft, 60, 60, 30, 30 ); // Crea il paragrafo
HPDF.ParaAutoAddPage := true; // Il paragrafo aggiungerà pagine automaticamente HPDF.BeginParagraph( ParaIndex ); // Apre il paragrafo principale HPDF.CurrentPage.SetFont( 'Arial', [fsBold], 14 ); // Imposta il font del paragrafo HPDF.CurrentParagraph.Justification := jtCenter; // Imposta la giustificazione centrata del paragrafo HPDF.CurrentPage.SetRGBFillColor ( clGray ); HPDF.CurrentParagraph.ShowText( 'Componente VCL per Delphi per la creazione di documenti PDF.' ); // Stampa il testo del paragrafo HPDF.CurrentPage.SetRGBFillColor ( clBlack ); HPDF.CurrentParagraph.NewLine; // Interruzione di riga HPDF.CurrentParagraph.NewLine; // Interruzione di riga HPDF.CurrentParagraph.Justification := jtLeft; // Imposta la giustificazione a sinistra del paragrafo HPDF.CurrentParagraph.ShowText ( 'HotPDF è la libreria di creazione PDF per Delphi e C++Builder.' ); // Stampa il testo del paragrafo HPDF.EndParagraph; // Chiude il paragrafo corrente
HPDF.EndDoc; // Chiude il file PDF end; |