EndPageUpdate

페이지 레이아웃

설명

가장 최근의 BeginPageUpdate 호출로 연 일괄 그리기 트랜잭션을 닫고 버퍼링된 그리기 연산자를 현재 페이지의 콘텐츠 스트림에 플러시합니다. 모든 BeginPageUpdate 호출은 정확히 하나의 EndPageUpdate 호출과 짝을 이루어야 합니다

구문

Delphi

Function TPDFlib.EndPageUpdate: Integer;

ActiveX

Function PDFlib::EndPageUpdate() As Long

DLL

int DLEndPageUpdate(int InstanceID);

반환 값

0실패 — 열린 문서가 없거나 현재 선택한 페이지에서 활성 BeginPageUpdate 트랜잭션이 없습니다
1트랜잭션을 닫고 버퍼링된 콘텐츠를 페이지에 커밋했습니다

비고

EndPageUpdate를 일치하는 BeginPageUpdate 없이 호출하면 아무 효과가 없고 0을 반환합니다. 트랜잭션을 연 후 EndPageUpdate를 호출하지 않으면 버퍼링된 그리기 연산자가 커밋되지 않으며 문서를 저장할 때 손실됩니다

예제

// Add a watermark on every page of an existing document
PDF.LoadFromFile('contract.pdf', '');
for I := 1 to PDF.GetPageCount do
begin
  PDF.SelectPage(I);
  PDF.BeginPageUpdate;
    PDF.SetTextColor(0.85, 0.85, 0.85);
    PDF.SetFontSize(72);
    PDF.PrintText(100, 400, 'CONFIDENTIAL');
  PDF.EndPageUpdate;
end;
PDF.SaveToFile('contract-confidential.pdf');

참고 항목

BeginPageUpdate, SelectPage, PageCount, EndPage