|
THPDFPara |
Oben Zurück Weiter |
|
THPDFPara stellt ein Absatzobjekt für das PDF-Dokument bereit
Unit HPDFDoc.pas
Description Verwenden Sie THPDFPara, um beim Schreiben von Absatztext Ausrichtung, bidirektionale Textrichtung sowie die Regeln für Keep-with-next, Orphan und Widow festzulegen Siehe Constrained Streaming Layout für dateibasiertes Staging von Seiten, Diagnose-Records und PDF/UA-Helper für Absätze
Using example:
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.' ); // Absatztext ausgeben 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.' ); // Absatztext ausgeben HPDF.EndParagraph; // Close current paragraph
HPDF.EndDoc; // Close PDF file end; |