use of org.apache.pdfbox.pdmodel.common.filespecification.PDFileSpecification in project pdfbox by apache.
the class FDFDictionary method getEmbeddedFDFs.
/**
* This will get the list of embedded FDF entries, or null if the entry is null. This will return a list of
* PDFileSpecification objects.
*
* @return A list of embedded FDF files.
*
* @throws IOException If there is an error creating the file spec.
*/
public List<PDFileSpecification> getEmbeddedFDFs() throws IOException {
List<PDFileSpecification> retval = null;
COSArray embeddedArray = (COSArray) fdf.getDictionaryObject(COSName.EMBEDDED_FDFS);
if (embeddedArray != null) {
List<PDFileSpecification> embedded = new ArrayList<>();
for (int i = 0; i < embeddedArray.size(); i++) {
embedded.add(PDFileSpecification.createFS(embeddedArray.get(i)));
}
retval = new COSArrayList<>(embedded, embeddedArray);
}
return retval;
}
use of org.apache.pdfbox.pdmodel.common.filespecification.PDFileSpecification in project pdfbox by apache.
the class TestGotoRemoteAction method testGoto_KO_MissingD.
@Test
public void testGoto_KO_MissingD() throws Exception {
PDActionRemoteGoTo gotoAction = new PDActionRemoteGoTo();
gotoAction.setFile(new PDFileSpecification() {
public COSBase getCOSObject() {
return COSName.getPDFName("ADest");
}
@Override
public void setFile(String file) {
}
@Override
public String getFile() {
return "pouey";
}
});
valid(gotoAction, false, PreflightConstants.ERROR_ACTION_MISING_KEY);
}
Aggregations