fireSpecialNull(ctx, "version", Float.toString(cosDoc.getVersion()));
ctx.fireStartParseEvent("security");
ctx.fireParseEvent("encrypted", encrypted);
if (encrypted) {
PDEncryptionDictionary encDict = doc.getEncryptionDictionary();
PDFPermissions perms = new PDFPermissions(
encDict.getCOSDictionary().getInt("P"),
encDict.getCOSDictionary().getInt("V"));
fireSpecialNull(ctx, "scheme", encDict.getFilter());
fireSpecialNull(ctx, "scheme-type", schemeVersionNames[encDict.getVersion()]);
ctx.fireParseEvent("key-length", encDict.getLength());
ctx.fireParseEvent("readonly", !perms.allowModify());
ctx.fireParseEvent("allow-print", perms.allowPrint());
ctx.fireParseEvent("allow-copy", perms.allowCopy());
ctx.fireParseEvent("allow-notes", perms.allowTextNotes());
ctx.fireParseEvent("user-password", encDict.getUserKey() != null);
ctx.fireParseEvent("owner-password", encDict.getOwnerKey() != null);
}
ctx.fireEndParseEvent("security");
ctx.fireEndParseEvent("pdf-meta");
}