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 fileDisplay, PdfDictionary fileParameter, PdfName afRelationshipValue)
Create an embedded file specification.
|
static PdfFileSpec |
createEmbeddedFileSpec(PdfDocument doc, byte[] fileStore, String fileDisplay, PdfName afRelationshipValue)
Create an embedded file specification.
|
static PdfFileSpec |
createEmbeddedFileSpec(PdfDocument doc, byte[] fileStore, String description, String fileDisplay, PdfDictionary fileParameter, PdfName afRelationshipValue)
Create an embedded file specification.
|
static PdfFileSpec |
createEmbeddedFileSpec(PdfDocument doc, byte[] fileStore, String description, String fileDisplay, PdfName afRelationshipValue)
Create an embedded file specification.
|
static PdfFileSpec |
createEmbeddedFileSpec(PdfDocument doc, byte[] fileStore, String description, String fileDisplay, PdfName mimeType, PdfDictionary fileParameter, PdfName afRelationshipValue)
Create an embedded file specification.
|
static PdfFileSpec |
createEmbeddedFileSpec(PdfDocument doc, InputStream is, String description, String fileDisplay, PdfName mimeType, PdfDictionary fileParameter, PdfName afRelationshipValue)
Create an embedded file specification.
|
static PdfFileSpec |
createEmbeddedFileSpec(PdfDocument doc, InputStream is, String description, String fileDisplay, PdfName mimeType, PdfName afRelationshipValue)
Create an embedded file specification.
|
static PdfFileSpec |
createEmbeddedFileSpec(PdfDocument doc, String filePath, String fileDisplay, PdfName afRelationshipValue)
Create an embedded file specification.
|
static PdfFileSpec |
createEmbeddedFileSpec(PdfDocument doc, String filePath, String description, String fileDisplay, PdfName afRelationshipValue)
Create an embedded file specification.
|
static PdfFileSpec |
createEmbeddedFileSpec(PdfDocument doc, String filePath, String description, String fileDisplay, PdfName mimeType, PdfDictionary fileParameter, PdfName afRelationshipValue)
Create an embedded file specification.
|
static PdfFileSpec |
createEmbeddedFileSpec(PdfDocument doc, String filePath, String description, String fileDisplay, PdfName mimeType, PdfName afRelationshipValue)
Create an embedded file specification.
|
static PdfFileSpec |
createExternalFileSpec(PdfDocument doc, String filePath)
Create an external file specification.
|
static PdfFileSpec |
createExternalFileSpec(PdfDocument doc, String filePath, PdfName afRelationshipValue)
Create an external file specification.
|
PdfArray |
getFileIdentifier() |
PdfImageXObject |
getThumbnailImage()
PDF 2.0.
|
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 |
setThumbnailImage(PdfImageXObject thumbnailImage)
PDF 2.0.
|
PdfFileSpec |
setVolatile(PdfBoolean isVolatile) |
static PdfFileSpec |
wrapFileSpecObject(PdfObject fileSpecObject)
Wrap the passed PdfObject to the specific PdfFileSpec object, according to the type of the passed pdf object.
|
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, flush, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
protected PdfFileSpec(PdfObject pdfObject)
public static PdfFileSpec wrapFileSpecObject(PdfObject fileSpecObject)
PdfObject
to the specific PdfFileSpec
object, according to the type of the passed pdf object.
fileSpecObject
- object to wrap
PdfFileSpec
instance
public static PdfFileSpec createExternalFileSpec(PdfDocument doc, String filePath, PdfName afRelationshipValue)
doc
- PdfDocument
instance to make this file specification indirect
filePath
- file specification string, describing the path to the external file
afRelationshipValue
- value that represents the relationship between the component of the passed PDF document that refers to this file specification and the associated file. If null
, PdfName.Unspecified
will be added.
PdfFileSpec
containing the file specification of the file
public static PdfFileSpec createExternalFileSpec(PdfDocument doc, String filePath)
doc
- PdfDocument
instance to make this file specification indirect
filePath
- file specification string, describing the path to the external file
PdfFileSpec
containing the file specification of the file
public static PdfFileSpec createEmbeddedFileSpec(PdfDocument doc, byte[] fileStore, String description, String fileDisplay, PdfName mimeType, PdfDictionary fileParameter, PdfName afRelationshipValue)
doc
- PdfDocument
instance to make this file specification indirect
fileStore
- byte[] containing the file
description
- file description
fileDisplay
- actual file name stored in the pdf
mimeType
- subtype of the embedded file. The value of this entry shall conform to the MIME media type names
fileParameter
- PdfDictionary
containing fil parameters
afRelationshipValue
- value that represents the relationship between the component of the passed PDF document that refers to this file specification and the associated file. If null
, PdfName.Unspecified
will be added.
PdfFileSpec
containing the file specification of the file
public static PdfFileSpec createEmbeddedFileSpec(PdfDocument doc, byte[] fileStore, String description, String fileDisplay, PdfDictionary fileParameter, PdfName afRelationshipValue)
doc
- PdfDocument
instance to make this file specification indirect
fileStore
- byte[] containing the file
fileDisplay
- actual file name stored in the pdf
fileParameter
- PdfDictionary
containing fil parameters
afRelationshipValue
- value that represents the relationship between the component of the passed PDF document that refers to this file specification and the associated file. If null
, PdfName.Unspecified
will be added.
description
- the file description
PdfFileSpec
containing the file specification of the file
public static PdfFileSpec createEmbeddedFileSpec(PdfDocument doc, byte[] fileStore, String fileDisplay, PdfDictionary fileParameter, PdfName afRelationshipValue)
doc
- PdfDocument
instance to make this file specification indirect
fileStore
- byte[] containing the file
fileDisplay
- actual file name stored in the pdf
fileParameter
- PdfDictionary
containing fil parameters
afRelationshipValue
- value that represents the relationship between the component of the passed PDF document that refers to this file specification and the associated file. If null
, PdfName.Unspecified
will be added.
PdfFileSpec
containing the file specification of the file
public static PdfFileSpec createEmbeddedFileSpec(PdfDocument doc, byte[] fileStore, String fileDisplay, PdfName afRelationshipValue)
doc
- PdfDocument
instance to make this file specification indirect
fileStore
- byte[] containing the file
fileDisplay
- actual file name stored in the pdf
afRelationshipValue
- value that represents the relationship between the component of the passed PDF document that refers to this file specification and the associated file. If null
, PdfName.Unspecified
will be added.
PdfFileSpec
containing the file specification of the file
public static PdfFileSpec createEmbeddedFileSpec(PdfDocument doc, byte[] fileStore, String description, String fileDisplay, PdfName afRelationshipValue)
doc
- PdfDocument
instance to make this file specification indirect
fileStore
- byte[] containing the file
description
- file description
fileDisplay
- actual file name stored in the pdf
afRelationshipValue
- value that represents the relationship between the component of the passed PDF document that refers to this file specification and the associated file. If null
, PdfName.Unspecified
will be added.
PdfFileSpec
containing the file specification of the file
public static PdfFileSpec createEmbeddedFileSpec(PdfDocument doc, String filePath, String description, String fileDisplay, PdfName mimeType, PdfDictionary fileParameter, PdfName afRelationshipValue) throws IOException
doc
- PdfDocument
instance to make this file specification indirect
filePath
- file specification string, describing the path to the file to embed
description
- file description
fileDisplay
- actual file name stored in the pdf
mimeType
- subtype of the embedded file. The value of this entry shall conform to the MIME media type names
fileParameter
- dictionary with file parameters
afRelationshipValue
- value that represents the relationship between the component of the passed PDF document that refers to this file specification and the associated file. If null
, PdfName.Unspecified
will be added.
PdfFileSpec
containing the file specification of the file
IOException
- if there are errors while creating an URL from the passed file path.
public static PdfFileSpec createEmbeddedFileSpec(PdfDocument doc, String filePath, String description, String fileDisplay, PdfName mimeType, PdfName afRelationshipValue) throws IOException
doc
- PdfDocument
instance to make this file specification indirect
filePath
- file specification string, describing the path to the file to embed
description
- file description
fileDisplay
- actual file name stored in the pdf
mimeType
- subtype of the embedded file. The value of this entry shall conform to the MIME media type names
afRelationshipValue
- value that represents the relationship between the component of the passed PDF document that refers to this file specification and the associated file. If null
, PdfName.Unspecified
will be added.
PdfFileSpec
containing the file specification of the file
IOException
- if there are errors while creating an URL from the passed file path.
public static PdfFileSpec createEmbeddedFileSpec(PdfDocument doc, String filePath, String description, String fileDisplay, PdfName afRelationshipValue) throws IOException
doc
- PdfDocument
instance to make this file specification indirect
filePath
- file specification string, describing the path to the file to embed
description
- file description
fileDisplay
- actual file name stored in the pdf
afRelationshipValue
- value that represents the relationship between the component of the passed PDF document that refers to this file specification and the associated file. If null
, PdfName.Unspecified
will be added.
PdfFileSpec
containing the file specification of the file
IOException
- if there are errors while creating an URL from the passed file path.
public static PdfFileSpec createEmbeddedFileSpec(PdfDocument doc, String filePath, String fileDisplay, PdfName afRelationshipValue) throws IOException
doc
- PdfDocument
instance to make this file specification indirect
filePath
- path to the file to embed
fileDisplay
- actual file name stored in the pdf
afRelationshipValue
- value that represents the relationship between the component of the passed PDF document that refers to this file specification and the associated file. If null
, PdfName.Unspecified
will be added.
PdfFileSpec
containing the file specification of the file
IOException
- if there are errors while creating an URL from the passed file path.
public static PdfFileSpec createEmbeddedFileSpec(PdfDocument doc, InputStream is, String description, String fileDisplay, PdfName mimeType, PdfDictionary fileParameter, PdfName afRelationshipValue)
doc
- PdfDocument
instance to make this file specification indirect
is
- stream containing the file to embed
description
- file description
fileDisplay
- actual file name stored in the pdf
mimeType
- subtype of the embedded file. The value of this entry shall conform to the MIME media type names
fileParameter
- dictionary with file parameters
afRelationshipValue
- value that represents the relationship between the component of the passed PDF document that refers to this file specification and the associated file. If null
, PdfName.Unspecified
will be added.
PdfFileSpec
containing the file specification of the file
public static PdfFileSpec createEmbeddedFileSpec(PdfDocument doc, InputStream is, String description, String fileDisplay, PdfName mimeType, PdfName afRelationshipValue)
doc
- PdfDocument
instance to make this file specification indirect
is
- stream containing the file to embed
description
- file description
fileDisplay
- actual file name stored in the pdf
mimeType
- subtype of the embedded file. The value of this entry shall conform to the MIME media type names
afRelationshipValue
- value that represents the relationship between the component of the passed PDF document that refers to this file specification and the associated file. If null
, PdfName.Unspecified
will be added.
PdfFileSpec
containing the file specification of the file
public PdfFileSpec setFileIdentifier(PdfArray fileIdentifier)
public PdfArray getFileIdentifier()
public PdfFileSpec setVolatile(PdfBoolean isVolatile)
public PdfBoolean isVolatile()
public PdfFileSpec setCollectionItem(PdfCollectionItem item)
public PdfFileSpec setThumbnailImage(PdfImageXObject thumbnailImage)
thumbnailImage
- image used as a thumbnail
PdfFileSpec
instance
public PdfImageXObject getThumbnailImage()
null
if it is not set
public PdfFileSpec put(PdfName key, PdfObject value)
protected boolean isWrappedObjectMustBeIndirect()
PdfObjectWrapper
isWrappedObjectMustBeIndirect
in class PdfObjectWrapper<PdfObject>
Copyright © 1998–2022 iText Group NV. All rights reserved.