/** * This will set the application to be launched or the document * to be opened or printed. It is required if none of the entries * Win, Mac or Unix is present. If this entry is absent and the * viewer application does not understand any of the alternative * entries it should do nothing. * * @param fs The file specification. */ public void setFile( PDFileSpecification fs ) { getCOSObject().setItem(COSName.F, fs); }
/** * Default constructor. */ public PDActionLaunch() { setSubType( SUB_TYPE ); }
} else if (action instanceof PDActionLaunch) { PDActionLaunch pdActionLaunch = (PDActionLaunch)action; addNonNullAttribute("id", pdActionLaunch.getF(), attributes); addNonNullAttribute("defaultDirectory", pdActionLaunch.getD(), attributes); addNonNullAttribute("operation", pdActionLaunch.getO(), attributes); addNonNullAttribute("parameters", pdActionLaunch.getP(), attributes); processDoc(pdActionLaunch.getF(), pdActionLaunch.getFile(), attributes); } else if (action instanceof PDActionRemoteGoTo) { PDActionRemoteGoTo remoteGoTo = (PDActionRemoteGoTo)action;
break; case PDActionLaunch.SUB_TYPE: retval = new PDActionLaunch(action); break; case PDActionRemoteGoTo.SUB_TYPE:
} else if (action instanceof PDActionLaunch) { PDActionLaunch pdActionLaunch = (PDActionLaunch)action; addNonNullAttribute("id", pdActionLaunch.getF(), attributes); addNonNullAttribute("defaultDirectory", pdActionLaunch.getD(), attributes); addNonNullAttribute("operation", pdActionLaunch.getO(), attributes); addNonNullAttribute("parameters", pdActionLaunch.getP(), attributes); processDoc(pdActionLaunch.getF(), pdActionLaunch.getFile(), attributes); } else if (action instanceof PDActionRemoteGoTo) { PDActionRemoteGoTo remoteGoTo = (PDActionRemoteGoTo)action;
retval = new PDActionLaunch( action );
} else if (action instanceof PDActionLaunch) { PDActionLaunch pdActionLaunch = (PDActionLaunch)action; addNonNullAttribute("id", pdActionLaunch.getF(), attributes); addNonNullAttribute("defaultDirectory", pdActionLaunch.getD(), attributes); addNonNullAttribute("operation", pdActionLaunch.getO(), attributes); addNonNullAttribute("parameters", pdActionLaunch.getP(), attributes); processDoc(pdActionLaunch.getF(), pdActionLaunch.getFile(), attributes); } else if (action instanceof PDActionRemoteGoTo) { PDActionRemoteGoTo remoteGoTo = (PDActionRemoteGoTo)action;
/** * This will specify whether to open the destination document in a new window, in the same * window, or behave in accordance with the current user preference. * * @return A flag specifying how to open the destination document. */ public OpenMode getOpenInNewWindow() { if (getCOSObject().getDictionaryObject(COSName.NEW_WINDOW) instanceof COSBoolean) { COSBoolean b = (COSBoolean) getCOSObject().getDictionaryObject(COSName.NEW_WINDOW); return b.getValue() ? OpenMode.NEW_WINDOW : OpenMode.SAME_WINDOW; } return OpenMode.USER_PREFERENCE; }
/** * Default constructor. */ public PDActionLaunch() { setSubType( SUB_TYPE ); }
break; case PDActionLaunch.SUB_TYPE: retval = new PDActionLaunch(action); break; case PDActionRemoteGoTo.SUB_TYPE:
} else if (action instanceof PDActionLaunch) { PDActionLaunch pdActionLaunch = (PDActionLaunch)action; addNonNullAttribute("id", pdActionLaunch.getF(), attributes); addNonNullAttribute("defaultDirectory", pdActionLaunch.getD(), attributes); addNonNullAttribute("operation", pdActionLaunch.getO(), attributes); addNonNullAttribute("parameters", pdActionLaunch.getP(), attributes); processDoc(pdActionLaunch.getF(), pdActionLaunch.getFile(), attributes); } else if (action instanceof PDActionRemoteGoTo) { PDActionRemoteGoTo remoteGoTo = (PDActionRemoteGoTo)action;
/** * This will specify whether to open the destination document in a new window. * * @param value The flag value. */ public void setOpenInNewWindow(OpenMode value) { if (null == value) { getCOSObject().removeItem(COSName.NEW_WINDOW); return; } switch (value) { case USER_PREFERENCE: getCOSObject().removeItem(COSName.NEW_WINDOW); break; case SAME_WINDOW: getCOSObject().setBoolean(COSName.NEW_WINDOW, false); break; case NEW_WINDOW: getCOSObject().setBoolean(COSName.NEW_WINDOW, true); break; default: // shouldn't happen unless the enum type is changed break; } } }
/** * Default constructor. */ public PDActionLaunch() { super(); setSubType( SUB_TYPE ); }
/** * This will get the application to be launched or the document * to be opened or printed. It is required if none of the entries * Win, Mac or Unix is present. If this entry is absent and the * viewer application does not understand any of the alternative * entries it should do nothing. * * @return The F entry of the specific launch action dictionary. * * @throws IOException If there is an error creating the file spec. */ public PDFileSpecification getFile() throws IOException { return PDFileSpecification.createFS(getCOSObject().getDictionaryObject(COSName.F)); }
/** * This will set the application to be launched or the document * to be opened or printed. It is required if none of the entries * Win, Mac or Unix is present. If this entry is absent and the * viewer application does not understand any of the alternative * entries it should do nothing. * * @param fs The file specification. */ public void setFile( PDFileSpecification fs ) { getCOSObject().setItem(COSName.F, fs); }
/** * This will set the application to be launched or the document * to be opened or printed. It is required if none of the entries * Win, Mac or Unix is present. If this entry is absent and the * viewer application does not understand any of the alternative * entries it should do nothing. * * @param fs The file specification. */ public void setFile( PDFileSpecification fs ) { getCOSObject().setItem(COSName.F, fs); }
/** * This will specify whether to open the destination document in a new window, in the same * window, or behave in accordance with the current user preference. * * @return A flag specifying how to open the destination document. */ public OpenMode getOpenInNewWindow() { if (getCOSObject().getDictionaryObject(COSName.NEW_WINDOW) instanceof COSBoolean) { COSBoolean b = (COSBoolean) getCOSObject().getDictionaryObject(COSName.NEW_WINDOW); return b.getValue() ? OpenMode.NEW_WINDOW : OpenMode.SAME_WINDOW; } return OpenMode.USER_PREFERENCE; }
/** * This will specify whether to open the destination document in a new window. * * @param value The flag value. */ public void setOpenInNewWindow(OpenMode value) { if (null == value) { getCOSObject().removeItem(COSName.NEW_WINDOW); return; } switch (value) { case USER_PREFERENCE: getCOSObject().removeItem(COSName.NEW_WINDOW); break; case SAME_WINDOW: getCOSObject().setBoolean(COSName.NEW_WINDOW, false); break; case NEW_WINDOW: getCOSObject().setBoolean(COSName.NEW_WINDOW, true); break; default: // shouldn't happen unless the enum type is changed break; } } }
/** * This will get the application to be launched or the document * to be opened or printed. It is required if none of the entries * Win, Mac or Unix is present. If this entry is absent and the * viewer application does not understand any of the alternative * entries it should do nothing. * * @return The F entry of the specific launch action dictionary. * * @throws IOException If there is an error creating the file spec. */ public PDFileSpecification getFile() throws IOException { return PDFileSpecification.createFS(getCOSObject().getDictionaryObject(COSName.F)); }
/** * This will get the application to be launched or the document * to be opened or printed. It is required if none of the entries * Win, Mac or Unix is present. If this entry is absent and the * viewer application does not understand any of the alternative * entries it should do nothing. * * @return The F entry of the specific launch action dictionary. * * @throws IOException If there is an error creating the file spec. */ public PDFileSpecification getFile() throws IOException { return PDFileSpecification.createFS(getCOSObject().getDictionaryObject(COSName.F)); }