I have a PDF file with 3 types of bookmark
- 1st book mark - 100% zoom
- 2nd book mark - 200% zoom
- 3rd book mark - 300% zoom
I have used following code but its fails in the annotation line.
PdfArray annots = page.getAsArray(PdfName.ANNOTS); // fails
for (int i = 0; i < annots.size(); i++)
{
PdfDictionary annotation = annots.getAsDict(i);
if (PdfName.LINK.equals(annotation.getAsName(PdfName.SUBTYPE)))
{
PdfArray d = annotation.getAsArray(PdfName.DEST);
if (d != null && d.size() == 5 && PdfName.XYZ.equals(d.getAsName(1)))
{
d.set(4, new PdfNumber(0)); //error-does not contain set method in pdfarray
}
}
}
I need to set inherit zoom action for all the bookmarks in the PDF file. How can I set the inherit zoom action for PDF file using iTextSharp
.