THotPDF.CreateParagraph 메서드

 

THotPDF.CreateParagraph

THotPDF

 

맨 위  이전  다음

Creates new paragraph for PDF document.

 

Delphi 구문:

  function CreateParagraph ( Indention: Single; Justification: THPDFJustificationType; LeftMargin, RightMargin: Single ): Integer;

 

C++ 구문:

int __fastcall CreateParagraph(float Indention, THPDFJustificationType Justification, float LeftMargin,

                                          float RightMargin, float TopMargin, float BottomMargin);

 

설명

PDF 문서에 새 단락을 추가하려면 CreateParagraph 함수를 호출합니다. Indention, LeftMargin 및 RightMargin은 단락 설정을 결정하고( 아래 이미지 참조 ), Justification은 기본 단락 정렬 방식을 결정합니다. 함수 CreateParagraph는 새 단락의 내부 번호를 반환합니다.

 

Paragraph margins diagram

 

Code Example


HPDF.CurrentParagraph.Justification := hjLeft;
HPDF.CurrentParagraph.ShowText( 'Text aligned to the left' );
HPDF.CurrentParagraph.NewLine;

HPDF.CurrentParagraph.Justification := hjCenter;
HPDF.CurrentParagraph.ShowText( 'Text aligned in the center' );
HPDF.CurrentParagraph.NewLine;

HPDF.CurrentParagraph.Justification := hjRight;
HPDF.CurrentParagraph.ShowText( 'Text aligned to the right' );
HPDF.CurrentParagraph.NewLine;

HPDF.CurrentParagraph.Justification := hjJustify;
HPDF.CurrentParagraph.ShowText( 'Text is fully justified. This means that spaces between words are adjusted to make the text fill the entire line from margin to margin.' );

 

참조: BeginParagraph,  EndParagraph, ParaAutoAddPage