Search in sources :

Example 36 with COSDictionary

use of com.tom_roush.pdfbox.cos.COSDictionary in project PdfBox-Android by TomRoush.

the class PDAnnotationAdditionalActions method getPO.

/**
 * This will get an action to be performed when the page containing
 * the annotation is opened. The action is executed after the O action
 * in the page's additional actions dictionary and the OpenAction entry
 * in the document catalog, if such actions are present.
 *
 * @return The PO entry of annotation's additional actions dictionary.
 */
public PDAction getPO() {
    COSDictionary po = (COSDictionary) actions.getDictionaryObject("PO");
    PDAction retval = null;
    if (po != null) {
        retval = PDActionFactory.createAction(po);
    }
    return retval;
}
Also used : COSDictionary(com.tom_roush.pdfbox.cos.COSDictionary)

Example 37 with COSDictionary

use of com.tom_roush.pdfbox.cos.COSDictionary in project PdfBox-Android by TomRoush.

the class PDAnnotationAdditionalActions method getE.

/**
 * This will get an action to be performed when the cursor
 * enters the annotation's active area.
 *
 * @return The E entry of annotation's additional actions dictionary.
 */
public PDAction getE() {
    COSDictionary e = (COSDictionary) actions.getDictionaryObject("E");
    PDAction retval = null;
    if (e != null) {
        retval = PDActionFactory.createAction(e);
    }
    return retval;
}
Also used : COSDictionary(com.tom_roush.pdfbox.cos.COSDictionary)

Example 38 with COSDictionary

use of com.tom_roush.pdfbox.cos.COSDictionary in project PdfBox-Android by TomRoush.

the class PDAnnotationAdditionalActions method getFo.

/**
 * This will get an action to be performed when the annotation
 * receives the input focus.
 *
 * @return The Fo entry of annotation's additional actions dictionary.
 */
public PDAction getFo() {
    COSDictionary fo = (COSDictionary) actions.getDictionaryObject("Fo");
    PDAction retval = null;
    if (fo != null) {
        retval = PDActionFactory.createAction(fo);
    }
    return retval;
}
Also used : COSDictionary(com.tom_roush.pdfbox.cos.COSDictionary)

Example 39 with COSDictionary

use of com.tom_roush.pdfbox.cos.COSDictionary in project PdfBox-Android by TomRoush.

the class PDDocumentCatalogAdditionalActions method getWC.

/**
 * This will get a JavaScript action to be performed
 * before closing a document.
 * The name WC stands for "will close".
 *
 * @return The WC entry of document catalog's additional actions dictionary.
 */
public PDAction getWC() {
    COSDictionary wc = (COSDictionary) actions.getDictionaryObject("WC");
    PDAction retval = null;
    if (wc != null) {
        retval = PDActionFactory.createAction(wc);
    }
    return retval;
}
Also used : COSDictionary(com.tom_roush.pdfbox.cos.COSDictionary)

Example 40 with COSDictionary

use of com.tom_roush.pdfbox.cos.COSDictionary in project PdfBox-Android by TomRoush.

the class PDDocumentCatalogAdditionalActions method getWS.

/**
 * This will get a JavaScript action to be performed
 * before saving a document.
 * The name WS stands for "will save".
 *
 * @return The WS entry of document catalog's additional actions dictionary.
 */
public PDAction getWS() {
    COSDictionary ws = (COSDictionary) actions.getDictionaryObject("WS");
    PDAction retval = null;
    if (ws != null) {
        retval = PDActionFactory.createAction(ws);
    }
    return retval;
}
Also used : COSDictionary(com.tom_roush.pdfbox.cos.COSDictionary)

Aggregations

COSDictionary (com.tom_roush.pdfbox.cos.COSDictionary)221 COSArray (com.tom_roush.pdfbox.cos.COSArray)68 COSBase (com.tom_roush.pdfbox.cos.COSBase)68 IOException (java.io.IOException)25 ArrayList (java.util.ArrayList)24 COSName (com.tom_roush.pdfbox.cos.COSName)23 COSObject (com.tom_roush.pdfbox.cos.COSObject)22 COSArrayList (com.tom_roush.pdfbox.pdmodel.common.COSArrayList)15 HashMap (java.util.HashMap)14 COSStream (com.tom_roush.pdfbox.cos.COSStream)13 Map (java.util.Map)12 PDPage (com.tom_roush.pdfbox.pdmodel.PDPage)10 COSString (com.tom_roush.pdfbox.cos.COSString)7 PDDocument (com.tom_roush.pdfbox.pdmodel.PDDocument)6 PDResources (com.tom_roush.pdfbox.pdmodel.PDResources)6 ByteArrayOutputStream (java.io.ByteArrayOutputStream)6 List (java.util.List)6 ByteArrayInputStream (java.io.ByteArrayInputStream)5 File (java.io.File)5 Test (org.junit.Test)5