@Test public void dontAddNumberItemToAnotherSubTypeFieldTest() { final String fieldName = "fieldName"; final double numberValue = 0.1234; PdfDictionary pdfObject = new PdfDictionary(); pdfObject.put(PdfName.Subtype, PdfName.F); PdfCollectionField field = new PdfCollectionField(pdfObject); PdfCollectionSchema schema = new PdfCollectionSchema(); schema.addField(fieldName, field); PdfCollectionItem item = new PdfCollectionItem(schema); item.addItem(fieldName, new PdfNumber(numberValue)); Assert.assertNull(item.getPdfObject().getAsString(new PdfName(fieldName))); }
public PdfCollectionItem addItem(String key, String value) { PdfCollectionField field = schema.getField(key); getPdfObject().put(new PdfName(key), field.getValue(value)); return this; }
PdfCollectionItem extends PdfObjectWrapper<PdfDictionary> { public PdfCollectionItem addItem(String key, String value) { PdfCollectionField field = schema.getField(key); getPdfObject().put(new PdfName(key), field.getValue(value)); return this; } }
PdfCollectionItem extends PdfObjectWrapper<PdfDictionary> { public PdfCollectionItem addItem(String key, String value) { PdfCollectionField field = schema.getField(key); getPdfObject().put(new PdfName(key), field.getValue(value)); return this; } PdfCollectionItem(PdfCollectionSchema schema); }
PdfCollectionItem extends PdfObjectWrapper<PdfDictionary> { public PdfCollectionItem addItem(String key, String value) { PdfCollectionField field = schema.getField(key); getPdfObject().put(new PdfName(key), field.getValue(value)); return this; } PdfCollectionItem(PdfCollectionSchema schema); PdfCollectionItem addItem(String key, String value); void addItem(String key, PdfDate date); void addItem(String key, PdfNumber number); PdfCollectionItem setPrefix(String key, String prefix); }
PdfCollectionItem extends PdfObjectWrapper<PdfDictionary> { public PdfCollectionItem addItem(String key, String value) { PdfCollectionField field = schema.getField(key); getPdfObject().put(new PdfName(key), field.getValue(value)); return this; } PdfCollectionItem(PdfCollectionSchema schema); PdfCollectionItem addItem(String key, String value); void addItem(String key, PdfDate date); void addItem(String key, PdfNumber number); PdfCollectionItem setPrefix(String key, String prefix);  }