PDFium Component Docs

Page-object-edittransacties

Component: TPdf  ·  Unit: PDFium
Bundelt native page-object-mutaties tot één atomaire bewerking die op de pagina is begrensd

Syntax

procedure BeginPageObjectEditTransaction(AllowSignedDocument: Boolean = False);
function CommitPageObjectEditTransaction: Boolean;
procedure RollbackPageObjectEditTransaction;
property PageObjectEditTransactionStatus: TPdfPageObjectEditTransactionStatus;

Description

BeginPageObjectEditTransaction legt een begrensde, reproduceerbare momentopname van het actieve document vast en koppelt de transactie aan de huidige pagina

Page-object-mutaties voor insert, remove, transform, property, content-mark, annotatieobjecten en annotatie-appearance blijven native PDFium-bewerkingen zolang contentgeneratie wordt uitgesteld

CommitPageObjectEditTransaction roept FPDFPage_GenerateContent één keer aan wanneer ten minste één mutatie is geslaagd en geeft True terug, of geeft False terug zonder generatie bij een no-op-transactie

RollbackPageObjectEditTransaction herstelt de gevalideerde baselinemomentopname zonder uitgestelde mutaties te serialiseren

Status

TPdfPageObjectEditTransactionStatus rapporteert Active, Dirty, het 1-gebaseerde PageNumber, het geslaagde MutationCount en ContentGenerationCount

De definitieve mutatie- en generatietellers blijven na de commit beschikbaar voor diagnostiek

Failure behaviour

Example

Pdf.BeginPageObjectEditTransaction;
try
  Pdf.TransformPageObject(0, Matrix);
  Pdf.SetPageObjectMarkParam(0, 0, Param);
  Pdf.CommitPageObjectEditTransaction;
except
  if Pdf.PageObjectEditTransactionStatus.Active then
    Pdf.RollbackPageObjectEditTransaction;
  raise;
end;

See Also

BeginEditTransaction, UpdatePageObject, AddPageObjectMark, RefreshAppearance