BurnAnnotationsToPage

Discussions about annotation support.
Post Reply
win568
Posts: 44
Joined: Tue Mar 24, 2015 1:00 pm

BurnAnnotationsToPage

Post by win568 » Thu Apr 09, 2015 8:29 am

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.

win568
Posts: 44
Joined: Tue Mar 24, 2015 1:00 pm

Re: BurnAnnotationsToPage

Post by win568 » Fri Apr 10, 2015 8:47 am

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).

win568
Posts: 44
Joined: Tue Mar 24, 2015 1:00 pm

Re: BurnAnnotationsToPage

Post by win568 » Fri Apr 10, 2015 11:25 am

Ok

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

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: BurnAnnotationsToPage

Post by Loïc » Fri Apr 10, 2015 11:40 am

Thank you for the update!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest