# Load document from FTP The page describes how to load PDF, Word, Excel, PowerPoint documents from FTP using GroupDocs.Annotation for Java. The following code snippet shows how to annotate document from FTP: {{< tabs "example1">}} {{< tab "Java" >}} ```java // This example demonstrates loading document from FTP. String filePath = "sample.pdf"; String server = "localhost"; // Create an instance of Annotator class and create connection and return stream with document Annotator annotator = new Annotator(getFileFromFtp(server, filePath)); try { // Create an instance of AreaAnnotation class and set options AreaAnnotation area = new AreaAnnotation(); area.setBox(new Rectangle(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(); } } //... private static InputStream getFileFromFtp(String server, String filePath) throws IOException { FTPClient client = new FTPClient(); client.connect(server); InputStream inputStream = client.retrieveFileStream(filePath); client.disconnect(); return inputStream; } ``` {{< /tab >}} {{< /tabs >}}