2010-06-22 92 views

回答

8

好吧,我已经找到解决方案

public static void scanFields(String path) throws IOException { 
    PdfReader pdfReader = new PdfReader(path); 
    AcroFields acroFields = pdfReader.getAcroFields(); 
    HashMap<String,AcroFields.Item> fields = acroFields.getFields(); 
    Set<Entry<String, Item>> entrySet = fields.entrySet(); 
    for (Entry<String, Item> entry : entrySet) { 
     String key = entry.getKey(); 
    } 
} 
相关问题