Skip to content

Commit a47cacd

Browse files
authored
update readme
1 parent 26b4e34 commit a47cacd

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,26 @@ To use the merge endpoint, supply a list of urls to existing PDFs. The engine wi
228228
**Merge PDFs from array of URLs to existing PDFs (load PDF in browser window (true or false) and specify a file name)****
229229

230230
```
231-
String[] urls = { "your-url-to-pdf1.pdf", "your-url-to-pdf2.pdf" };
231+
String[] urls = { "http://www.api2pdf.com/wp-content/uploads/2021/01/1a082b03-2bd6-4703-989d-0443a88e3b0f-4.pdf", "http://www.api2pdf.com/wp-content/uploads/2021/01/1a082b03-2bd6-4703-989d-0443a88e3b0f-4.pdf" };
232232
Api2PdfResponse response = a2pClient.pdfsharpMerge(urls, true, "test.pdf");
233233
System.out.println(response.getFile());
234234
```
235+
236+
**Add PDF bookmarks to an existing PDF**
237+
238+
```
239+
import com.api2pdf.models.Api2PdfBookmarkItemModel;
240+
String url = "http://www.api2pdf.com/wp-content/uploads/2021/01/1a082b03-2bd6-4703-989d-0443a88e3b0f-4.pdf";
241+
Api2PdfBookmarkItemModel[] bookmarks = new Api2PdfBookmarkItemModel[] { new Api2PdfBookmarkItemModel(0, "Title page") };
242+
Api2PdfResponse response = a2pClient.pdfsharpAddBookmarks(url, bookmarks, true, "test.pdf");
243+
System.out.println(response.getFile());
244+
```
245+
246+
**Add password to existing PDF**
247+
248+
```
249+
String url = "http://www.api2pdf.com/wp-content/uploads/2021/01/1a082b03-2bd6-4703-989d-0443a88e3b0f-4.pdf";
250+
String password = "hello";
251+
Api2PdfResponse response = a2pClient.pdfsharpAddBookmarks(url, password, true, "test.pdf");
252+
System.out.println(response.getFile());
253+
```

0 commit comments

Comments
 (0)