Page 1 of 1

BurnAnnotationsToPage

Posted: Thu Apr 09, 2015 8:29 am
by win568
Hi

I tried to burn the Annotations to Page. Unfortunatelly this does not work. Here my Code:

Code: Select all


function TBMDGDNxtAnnotation.BurnToPage: Boolean;
var
  lIndex: Integer;
begin
  Result := Assigned(Document);
  try
    if Result then begin
      // Brenne die Annotationen jeder Seite
      lIndex := 0;
      while (lIndex < GetAnnotationManager.PageCount) and Result do begin
        Result := Document.EvalGDPictureStatus(GetAnnotationManager.SelectPage(lIndex+1));
        if Result then begin
          Result := Document.EvalGDPictureStatus(GetAnnotationManager.BurnAnnotationsToPage(True));
        end;
        inc(lIndex);
      end;
      if Result then begin
        Modified := False;
      end;
    end;
  except
    on E: Exception do begin
      WriteLog(E.Message);
    end;
  end;
end;

After I call the Burn Method, the Annotations are deleted from the PDF Document.

Re: BurnAnnotationsToPage

Posted: Fri Apr 10, 2015 8:47 am
by win568
OK

I Have fixed the Problem. First the Burn Method must be called without True (To See the Annotations). Next i Have to Call SaveAnnotationsToPage to fix the Annotations at the current Page (Why is this necessary. It does not work without it).

Re: BurnAnnotationsToPage

Posted: Fri Apr 10, 2015 11:25 am
by win568
Ok

It works without SaveAnnotationstoPAge. After Burning I have to Redraw the Viewer, than i see the Annotations.

Re: BurnAnnotationsToPage

Posted: Fri Apr 10, 2015 11:40 am
by Loïc
Thank you for the update!