Get Viewer Preferences
Contents
[
Hide
]
Get the current viewer preference
- Bind the source PDF to the
PdfContentEditorfacade. - Call
getViewerPreference()to read the current value. - Inspect or print the returned preference flag.
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();
}
}