Index
-
\setasign\SetaPDF2
-
Core
- BitConverter
- Canvas
- ColorSpace
- Core
- DataStructure
- Document
- Document
- EmbeddedFileStream
- Encoding
- Exception
- FileSpecification
- Filter
- Font
- Geometry
- IccProfile
- Image
- OutputIntent
- PageBoundaries
- PageFormats
- Parser
- Reader
- Resource
- SecHandler
- Text
- Tokenizer
- TransparencyGroup
- Type
- Writer
- XObject
- Xmp
- Zugferd
-
Core
setasign\SetaPDF2\Core
FileSpecification Class representing a file specification
File: /SetaPDF v2/Core/FileSpecification.php
Old class name (alias):
\SetaPDF_Core_FileSpecification
Class hierarchy
Summary
Methods
- __construct()
- getCollectionItem()
- getDescription()
- getDictionary()
- getEmbeddedFileStream()
- getFileSpecification()
- getFileSystem()
- getUnicodeFileSpecification()
- getVolatile()
- setCollectionItem()
- setDescription()
- setEmbeddedFileStream()
- setFileSpecification()
- setFileSystem()
- setUnicodeFileSpecification()
- setVolatile()
Constants
FILE_SYSTEM_UNDEFINED
Default file system constant
FILE_SYSTEM_URL
URL file system contant
Properties
Static Methods
createDictionary()
Creates a file specification dictionary.
Parameters
- $fileSpecificationString : string
createEmbedded()
\SetaPDF_Core_Reader_ReaderInterface|string $pathOrReader,
string $filename,
array $fileStreamParams = array ( ),
?string $mimeType = null
Create a file specification with an embedded file stream.
Parameters
- $document : \SetaPDF_Core_Document
- $pathOrReader : \SetaPDF_Core_Reader_ReaderInterface|string
A reader instance or a path to a file.
- $filename : string
The filename in UTF-8 encoding.
- $fileStreamParams : array
See setParams() method.
- $mimeType : ?string
The subtype of the embedded file. Shall conform to the MIME media type names defined in Internet RFC 2046
Exceptions
Throws Document\ObjectNotFoundException
Throws Exception
Throws Parser\Pdf\InvalidTokenException
Throws Reader\Exception
Throws Type\Exception
Throws Type\IndirectReference\Exception
Throws \setasign\SetaPDF2\Exception
Methods
__construct()
The constructor.
If the parameter cannot be evaluated to a dictionary it will be passed to the createDictionary method to create an appropriate dictionary.
Parameters
- $fileSpecification : string|\SetaPDF_Core_Type_IndirectObjectInterface|\SetaPDF_Core_Type_Dictionary|\SetaPDF_Core_Type_StringValue
Exceptions
Throws Type\Exception
See
getDescription()
Get the descriptive text associated with the file specification.
Parameters
- $encoding : string
getEmbeddedFileStream()
Get the embedded file stream object.
Parameters
- $unicode : bool
If true use the UF key, otherwise the F key.
Exceptions
Throws Document\ObjectNotFoundException
Throws Exception
Throws Parser\Pdf\InvalidTokenException
Throws Reader\Exception
Throws Type\Exception
Throws Type\IndirectReference\Exception
Throws \setasign\SetaPDF2\Exception
getUnicodeFileSpecification()
Get the unicode text file specification value.
Parameters
- $encoding : string
setCollectionItem()
setDescription()
Set the descriptive text associated with the file specification.
Parameters
- $desc : ?string
- $encoding : string
setEmbeddedFileStream()
Set the embedded file stream object.
Parameters
- $embeddedFileStream : \SetaPDF_Core_EmbeddedFileStream
- $unicode : bool
If true use the UF key, otherwise the F key.
setUnicodeFileSpecification()
string $encoding = 'UTF-8'
Set the unicode text file specification value.
Parameters
- $fileSpecification : ?string
- $encoding : string