public class FileAttachment
extends java.lang.Object
| Constructor and Description |
|---|
FileAttachment(Document doc,
java.lang.String fileName)
Allows to add attachment into the PDF document.
|
| Modifier and Type | Method and Description |
|---|---|
void |
delete() |
float |
getCollectionItemNumber(CollectionSchemaField collectionField)
GetCollectionItemNumber allows to obtain collection item according to the specified schema field.
|
java.lang.String |
getCollectionItemString(CollectionSchemaField collectionField)
GetCollectionItemString allows to obtain collection item value according to the specified schema field.
|
java.lang.String |
getFileName()
Allow to obtain attachment's file name.
|
long |
getFileSize()
Allows to obtain attachment's size.
|
void |
saveToFile(java.lang.String fileName)
Allows to save attachment to the specified file.
|
void |
saveToStream(javax.imageio.stream.ImageOutputStream stream)
Saves a FileAttachment to a javax.imageio.stream.ImageInputStream.
|
void |
setCollectionItemNumber(CollectionSchemaField collectionField,
float value)
SetCollectionItemNumber allows to add key to the collection item dictionary.
|
void |
setCollectionItemString(CollectionSchemaField collectionField,
java.lang.String value)
SetCollectionItemString allows to add key to the collection item dictionary.
|
void |
updateFromFile(java.lang.String fileName)
Allows to update attachment from another file.
|
public FileAttachment(Document doc, java.lang.String fileName)
doc - The PDF document (reference).fileName - The path to file which will be attached to the document.public void delete()
public void saveToStream(javax.imageio.stream.ImageOutputStream stream)
throws java.io.IOException
stream - The stream from which to save the FileAttachment.java.io.IOExceptionpublic void saveToFile(java.lang.String fileName)
fileName - The path where attachment will be saved.public void updateFromFile(java.lang.String fileName)
fileName - The path to the file from which attachment will be updated.public long getFileSize()
public java.lang.String getFileName()
public void setCollectionItemNumber(CollectionSchemaField collectionField, float value)
collectionField - schema field which contains information about data type. The parameter's subtype should be a Number.value - the item's value.public float getCollectionItemNumber(CollectionSchemaField collectionField)
collectionField - the field for which item value should be retrieved.public void setCollectionItemString(CollectionSchemaField collectionField, java.lang.String value)
collectionField - schema field which contains information about data type. The parameter's subtype should be a Text.value - the item's value.public java.lang.String getCollectionItemString(CollectionSchemaField collectionField)
collectionField - the field for which item value should be retrieved.