use of com.tom_roush.pdfbox.cos.COSDictionary in project PdfBox-Android by TomRoush.
the class PDCIDFontType2Embedder method toCIDSystemInfo.
private COSDictionary toCIDSystemInfo(String registry, String ordering, int supplement) {
COSDictionary info = new COSDictionary();
info.setString(COSName.REGISTRY, registry);
info.setString(COSName.ORDERING, ordering);
info.setInt(COSName.SUPPLEMENT, supplement);
return info;
}
use of com.tom_roush.pdfbox.cos.COSDictionary in project PdfBox-Android by TomRoush.
the class PDCIDFontType2Embedder method createCIDFont.
private COSDictionary createCIDFont() throws IOException {
COSDictionary cidFont = new COSDictionary();
// Type, Subtype
cidFont.setItem(COSName.TYPE, COSName.FONT);
cidFont.setItem(COSName.SUBTYPE, COSName.CID_FONT_TYPE2);
// BaseFont
cidFont.setName(COSName.BASE_FONT, fontDescriptor.getFontName());
// CIDSystemInfo
COSDictionary info = toCIDSystemInfo("Adobe", "Identity", 0);
cidFont.setItem(COSName.CIDSYSTEMINFO, info);
// FontDescriptor
cidFont.setItem(COSName.FONT_DESC, fontDescriptor.getCOSObject());
// W - widths
buildWidths(cidFont);
// Vertical metrics
if (vertical) {
buildVerticalMetrics(cidFont);
}
// CIDToGIDMap
cidFont.setItem(COSName.CID_TO_GID_MAP, COSName.IDENTITY);
return cidFont;
}
use of com.tom_roush.pdfbox.cos.COSDictionary in project PdfBox-Android by TomRoush.
the class FDFField method getKids.
/**
* This will get the list of kids. This will return a list of FDFField objects. This will return null if the
* underlying list is null.
*
* @return The list of kids.
*/
public List<FDFField> getKids() {
COSArray kids = (COSArray) field.getDictionaryObject(COSName.KIDS);
List<FDFField> retval = null;
if (kids != null) {
List<FDFField> actuals = new ArrayList<FDFField>();
for (int i = 0; i < kids.size(); i++) {
actuals.add(new FDFField((COSDictionary) kids.getObject(i)));
}
retval = new COSArrayList<FDFField>(actuals, kids);
}
return retval;
}
use of com.tom_roush.pdfbox.cos.COSDictionary in project PdfBox-Android by TomRoush.
the class FDFField method getAdditionalActions.
/**
* This will get a list of additional actions that will get executed based on events.
*
* @return The AA entry in this field dictionary.
*/
public PDAdditionalActions getAdditionalActions() {
PDAdditionalActions retval = null;
COSDictionary dict = (COSDictionary) field.getDictionaryObject(COSName.AA);
if (dict != null) {
retval = new PDAdditionalActions(dict);
}
return retval;
}
use of com.tom_roush.pdfbox.cos.COSDictionary in project PdfBox-Android by TomRoush.
the class FDFPage method getPageInfo.
/**
* This will get the FDF page info object.
*
* @return The Page info.
*/
public FDFPageInfo getPageInfo() {
FDFPageInfo retval = null;
COSDictionary dict = page.getCOSDictionary(COSName.INFO);
if (dict != null) {
retval = new FDFPageInfo(dict);
}
return retval;
}
Aggregations