The following example shows how to load a document using its URL:
// This example demonstrates loading document from URL.
Stringurl="https://raw.githubusercontent.com/groupdocs-annotation/GroupDocs.Annotation-for-Java/master/Examples/Resources/SampleFiles/input.pdf?raw=true";// Create an instance of Annotator class
Annotatorannotator=newAnnotator(newURL(url).openStream());try{// Create an instance of AreaAnnotation class and set options
AreaAnnotationarea=newAreaAnnotation();area.setBox(newRectangle(100,100,100,100));area.setBackgroundColor(65535);// Add annotation and save to file
annotator.add(area);annotator.save("outputPath");}finally{if(annotator!=null){annotator.dispose();}}
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.