Call the Save method with the output document path or stream. Specify the SaveOptions class as a parameter.
The following code snippet shows how to save only annotated pages:
// for this example input file ("input.pdf") must have at least 10 pagesusing(Annotatorannotator=newAnnotator("input.pdf")){AreaAnnotationarea=newAreaAnnotation(){Box=newRectangle(100,100,100,100),BackgroundColor=65535,PageNumber=1};EllipseAnnotationellipse=newEllipseAnnotation(){Box=newRectangle(100,100,100,100),BackgroundColor=123456,PageNumber=9};//Result file will be contain only two pages (1 and 9)annotator.Add(newList<AnnotationBase>(){area,ellipse});annotator.Save("result.pdf"newSaveOptions{OnlyAnnotatedPages=true});}
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.
On this page
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.