countObject.setValue(countObject.getValue()+1);
}
else // Non-first bookmark.
{
PdfReference oldLastBookmarkReference = (PdfReference)getBaseDataObject().get(PdfName.Last);
getBaseDataObject().put(PdfName.Last,bookmark.getBaseObject()); // Added bookmark is the last in the collection...
((PdfDictionary)File.resolve(oldLastBookmarkReference)).put(PdfName.Next,bookmark.getBaseObject()); // ...and the next of the previously-last bookmark.
bookmark.getBaseDataObject().put(PdfName.Prev,oldLastBookmarkReference);
/*