PdfReader pdfReader = new PdfReader(bytes);
AcroFields acroFields = pdfReader.getAcroFields();
Map<String, AcroFields.Item> map = acroFields.getFields();
List<String> keyList = new ArrayList<>();
map.forEach((k, v) -> {
try {
String[] arr = acroFields.getAppearanceStates(k);
System.out.println(k+":"+Arrays.toString(arr));
keyList.add(k);
} catch (Exception e) {
e.printStackTrace();
} });
No comments:
Post a Comment