|
@@ -34,13 +34,14 @@ public class BookmarkTest extends PDFSamples {
|
|
|
super.run(outputListener);
|
|
|
printHead();
|
|
|
outputListener.println();
|
|
|
+ // Open test pdf document
|
|
|
CPDFDocument document = new CPDFDocument(context);
|
|
|
document.open(FileUtils.getAssetsTempFile(context, "CommonFivePage.pdf"));
|
|
|
// Add a bookmark that jumps to the second page of the document
|
|
|
document.addBookmark(new CPDFBookmark(
|
|
|
1, "my bookmark", CPDFDate.toStandardDate(TTimeUtil.getCurrentDate())
|
|
|
));
|
|
|
- // Get a list of bookmarks and output related information
|
|
|
+
|
|
|
List<CPDFBookmark> list = document.getBookmarks();
|
|
|
if (list != null && list.size() > 0) {
|
|
|
for (CPDFBookmark cpdfBookmark : list) {
|