public class PdfFileSpec extends PdfObjectWrapper<PdfObject>
Modifier | Constructor and Description |
---|---|
protected |
PdfFileSpec(PdfObject pdfObject) |
Modifier and Type | Method and Description |
---|---|
static PdfFileSpec |
createEmbeddedFileSpec(PdfDocument doc, byte[] fileStore, String description, String fileDisplay, PdfName mimeType, PdfDictionary fileParameter, PdfName afRelationshipValue, boolean isUnicodeFileName)
Embed a file to a PdfDocument.
|
static PdfFileSpec |
createEmbeddedFileSpec(PdfDocument doc, InputStream is, String description, String fileDisplay, PdfName mimeType, PdfName afRelationshipValue, boolean isUnicodeFileName) |
static PdfFileSpec |
createEmbeddedFileSpec(PdfDocument doc, String filePath, String description, String fileDisplay, PdfName mimeType, PdfName afRelationshipValue, boolean isUnicodeFileName) |
static PdfFileSpec |
createExternalFileSpec(PdfDocument doc, String filePath, boolean isUnicodeFileName) |
PdfArray |
getFileIdentifier() |
PdfBoolean |
isVolatile() |
protected boolean |
isWrappedObjectMustBeIndirect()
Defines if the object behind this wrapper must be an indirect object in the resultant document.
|
PdfFileSpec |
put(PdfName key, PdfObject value) |
PdfFileSpec |
setCollectionItem(PdfCollectionItem item) |
PdfFileSpec |
setFileIdentifier(PdfArray fileIdentifier) |
PdfFileSpec |
setVolatile(PdfBoolean isVolatile) |
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, flush, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
protected PdfFileSpec(PdfObject pdfObject)
public static PdfFileSpec createExternalFileSpec(PdfDocument doc, String filePath, boolean isUnicodeFileName)
public static PdfFileSpec createEmbeddedFileSpec(PdfDocument doc, byte[] fileStore, String description, String fileDisplay, PdfName mimeType, PdfDictionary fileParameter, PdfName afRelationshipValue, boolean isUnicodeFileName)
doc
- PdfDocument to add the file to
fileStore
- byte[] containing the file
description
- file description
fileDisplay
- actual file name stored in the pdf
mimeType
- mime-type of the file
fileParameter
- Pdfdictionary containing fil parameters
afRelationshipValue
- AFRelationship key value, @see AFRelationshipValue. If null
, @see AFRelationshipValue.Unspecified will be added.
isUnicodeFileName
-
public static PdfFileSpec createEmbeddedFileSpec(PdfDocument doc, String filePath, String description, String fileDisplay, PdfName mimeType, PdfName afRelationshipValue, boolean isUnicodeFileName) throws IOException
doc
-
filePath
-
description
-
fileDisplay
-
mimeType
-
afRelationshipValue
-
isUnicodeFileName
-
IOException
public static PdfFileSpec createEmbeddedFileSpec(PdfDocument doc, InputStream is, String description, String fileDisplay, PdfName mimeType, PdfName afRelationshipValue, boolean isUnicodeFileName)
doc
-
is
-
description
-
fileDisplay
-
mimeType
-
afRelationshipValue
-
isUnicodeFileName
-
public PdfFileSpec setFileIdentifier(PdfArray fileIdentifier)
public PdfArray getFileIdentifier()
public PdfFileSpec setVolatile(PdfBoolean isVolatile)
public PdfBoolean isVolatile()
public PdfFileSpec setCollectionItem(PdfCollectionItem item)
public PdfFileSpec put(PdfName key, PdfObject value)
protected boolean isWrappedObjectMustBeIndirect()
PdfObjectWrapper
isWrappedObjectMustBeIndirect
in class PdfObjectWrapper<PdfObject>
Copyright © 1998–2018 iText Group NV. All rights reserved.