| java.lang.Object com.lowagie.text.pdf.PdfObject com.lowagie.text.pdf.PdfDictionary com.lowagie.text.pdf.PdfFileSpecification
PdfFileSpecification | public class PdfFileSpecification extends PdfDictionary (Code) | | Specifies a file or an URL. The file can be extern or embedded.
author: Paulo Soares (psoares@consiste.pt) |
Method Summary | |
public void | addCollectionItem(PdfCollectionItem ci) Adds the Collection item dictionary. | public void | addDescription(String description, boolean unicode) Adds a description for the file that is specified here. | public static PdfFileSpecification | fileEmbedded(PdfWriter writer, String filePath, String fileDisplay, byte fileStore) Creates a file specification with the file embedded. | public static PdfFileSpecification | fileEmbedded(PdfWriter writer, String filePath, String fileDisplay, byte fileStore, boolean compress) Creates a file specification with the file embedded. | public static PdfFileSpecification | fileEmbedded(PdfWriter writer, String filePath, String fileDisplay, byte fileStore, boolean compress, String mimeType, PdfDictionary fileParameter) Creates a file specification with the file embedded. | public static PdfFileSpecification | fileExtern(PdfWriter writer, String filePath) Creates a file specification for an external file. | public PdfIndirectReference | getReference() Gets the indirect reference to this file specification. | public void | setMultiByteFileName(byte fileName) Sets the file name (the key /F) string as an hex representation
to support multi byte file names. | public void | setUnicodeFileName(String filename, boolean unicode) Adds the unicode file name (the key /UF). | public void | setVolatile(boolean volatile_file) Sets a flag that indicates whether an external file referenced by the file
specification is volatile. | public static PdfFileSpecification | url(PdfWriter writer, String url) Creates a file specification of type URL. |
PdfFileSpecification | public PdfFileSpecification()(Code) | | Creates a new instance of PdfFileSpecification. The static methods are preferred.
|
addDescription | public void addDescription(String description, boolean unicode)(Code) | | Adds a description for the file that is specified here.
Parameters: description - some text Parameters: unicode - if true, the text is added as a unicode string |
fileEmbedded | public static PdfFileSpecification fileEmbedded(PdfWriter writer, String filePath, String fileDisplay, byte fileStore) throws IOException(Code) | | Creates a file specification with the file embedded. The file may
come from the file system or from a byte array. The data is flate compressed.
Parameters: writer - the PdfWriter Parameters: filePath - the file path Parameters: fileDisplay - the file information that is presented to the user Parameters: fileStore - the byte array with the file. If it is not null it takes precedence over filePath throws: IOException - on error the file specification |
fileEmbedded | public static PdfFileSpecification fileEmbedded(PdfWriter writer, String filePath, String fileDisplay, byte fileStore, boolean compress) throws IOException(Code) | | Creates a file specification with the file embedded. The file may
come from the file system or from a byte array.
Parameters: writer - the PdfWriter Parameters: filePath - the file path Parameters: fileDisplay - the file information that is presented to the user Parameters: fileStore - the byte array with the file. If it is not null it takes precedence over filePath Parameters: compress - sets the compression on the data. Multimedia content will benefit littlefrom compression throws: IOException - on error the file specification |
fileEmbedded | public static PdfFileSpecification fileEmbedded(PdfWriter writer, String filePath, String fileDisplay, byte fileStore, boolean compress, String mimeType, PdfDictionary fileParameter) throws IOException(Code) | | Creates a file specification with the file embedded. The file may
come from the file system or from a byte array.
Parameters: writer - the PdfWriter Parameters: filePath - the file path Parameters: fileDisplay - the file information that is presented to the user Parameters: fileStore - the byte array with the file. If it is not null it takes precedence over filePath Parameters: compress - sets the compression on the data. Multimedia content will benefit littlefrom compression Parameters: mimeType - the optional mimeType Parameters: fileParameter - the optional extra file parameters such as the creation or modification date throws: IOException - on error the file specification |
fileExtern | public static PdfFileSpecification fileExtern(PdfWriter writer, String filePath)(Code) | | Creates a file specification for an external file.
Parameters: writer - the PdfWriter Parameters: filePath - the file path the file specification |
getReference | public PdfIndirectReference getReference() throws IOException(Code) | | Gets the indirect reference to this file specification.
Multiple invocations will retrieve the same value.
throws: IOException - on error the indirect reference |
setMultiByteFileName | public void setMultiByteFileName(byte fileName)(Code) | | Sets the file name (the key /F) string as an hex representation
to support multi byte file names. The name must have the slash and
backslash escaped according to the file specification rules
Parameters: fileName - the file name as a byte array |
setUnicodeFileName | public void setUnicodeFileName(String filename, boolean unicode)(Code) | | Adds the unicode file name (the key /UF). This entry was introduced
in PDF 1.7. The filename must have the slash and backslash escaped
according to the file specification rules.
Parameters: filename - the filename Parameters: unicode - if true, the filename is UTF-16BE encoded; otherwise PDFDocEncoding is used; |
setVolatile | public void setVolatile(boolean volatile_file)(Code) | | Sets a flag that indicates whether an external file referenced by the file
specification is volatile. If the value is true, applications should never
cache a copy of the file.
Parameters: volatile_file - if true, the external file should not be cached |
|
|