获取查看器首选项

获取当前查看器首选项

  1. 将源 PDF 绑定到 PdfContentEditor 立面。
  2. 呼叫 getViewerPreference() 读取当前值。
  3. 检查或打印返回的偏好标志。
public static void getViewerPreferences(Path inputFile) {
    PdfContentEditor editor = new PdfContentEditor();
    try {
        editor.bindPdf(inputFile.toString());
        System.out.println("Current viewer preference: " + editor.getViewerPreference());
    } finally {
        editor.close();
    }
}