Example usage for org.apache.pdfbox.pdmodel.interactive.viewerpreferences PDViewerPreferences PDViewerPreferences

List of usage examples for org.apache.pdfbox.pdmodel.interactive.viewerpreferences PDViewerPreferences PDViewerPreferences

Introduction

In this page you can find the example usage for org.apache.pdfbox.pdmodel.interactive.viewerpreferences PDViewerPreferences PDViewerPreferences.

Prototype

public PDViewerPreferences(COSDictionary dic) 

Source Link

Document

Constructor that is used for a preexisting dictionary.

Usage

From source file:org.pdfsam.pdfbox.component.PDDocumentHandler.java

License:Open Source License

/**
 * @return the view preferences for the underlying {@link PDDocument} or an empty dictionary if no ViewerPreferences is dictionary is found.
 *///w  w  w.ja v a 2s .com
public PDViewerPreferences getViewerPreferences() {
    PDViewerPreferences retVal = document.getDocumentCatalog().getViewerPreferences();
    if (retVal == null) {
        retVal = new PDViewerPreferences(new COSDictionary());
    }
    return retVal;
}