java.lang.Object
com.lowagie.text.pdf.PdfObject
com.lowagie.text.pdf.PdfDictionary
com.lowagie.text.pdf.PdfFileSpecification
Deprecated.
Specifies a file or an URL. The file can be extern or embedded.
- Author:
- Paulo Soares (psoares@consiste.pt)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected PdfIndirectReferenceDeprecated.protected PdfWriterDeprecated. -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Creates a new instance of PdfFileSpecification. -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.Adds the Collection item dictionary.voidaddDescription(String description, boolean unicode) Deprecated.Adds a description for the file that is specified here.static PdfFileSpecificationfileEmbedded(PdfWriter writer, String filePath, String fileDisplay, byte[] fileStore) Deprecated.Creates a file specification with the file embedded.static PdfFileSpecificationfileEmbedded(PdfWriter writer, String filePath, String fileDisplay, byte[] fileStore, boolean compress) Deprecated.Creates a file specification with the file embedded.static PdfFileSpecificationfileEmbedded(PdfWriter writer, String filePath, String fileDisplay, byte[] fileStore, boolean compress, String mimeType, PdfDictionary fileParameter) Deprecated.Creates a file specification with the file embedded.static PdfFileSpecificationfileEmbedded(PdfWriter writer, String filePath, String fileDisplay, byte[] fileStore, int compressionLevel) Deprecated.Creates a file specification with the file embedded.static PdfFileSpecificationfileEmbedded(PdfWriter writer, String filePath, String fileDisplay, byte[] fileStore, String mimeType, PdfDictionary fileParameter, int compressionLevel) Deprecated.Creates a file specification with the file embedded.static PdfFileSpecificationfileExtern(PdfWriter writer, String filePath) Deprecated.Creates a file specification for an external file.Deprecated.Gets the indirect reference to this file specification.voidsetMultiByteFileName(byte[] fileName) Deprecated.Sets the file name (the key /F) string as an hex representation to support multi byte file names.voidsetUnicodeFileName(String filename, boolean unicode) Deprecated.Adds the unicode file name (the key /UF).voidsetVolatile(boolean volatile_file) Deprecated.Sets a flag that indicates whether an external file referenced by the file specification is volatile.static PdfFileSpecificationDeprecated.Creates a file specification of type URL.Methods inherited from class com.lowagie.text.pdf.PdfDictionary
clear, contains, get, getAsArray, getAsBoolean, getAsDict, getAsIndirectObject, getAsName, getAsNumber, getAsStream, getAsString, getDirectObject, getKeys, getKeysAndValues, isCatalog, isFont, isOutlineTree, isPage, isPages, merge, mergeDifferent, put, putAll, putEx, remove, size, toPdf, toStringMethods inherited from class com.lowagie.text.pdf.PdfObject
canBeInObjStm, getBytes, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, length, setContent, setIndRef, type
-
Field Details
-
writer
Deprecated. -
ref
Deprecated.
-
-
Constructor Details
-
PdfFileSpecification
public PdfFileSpecification()Deprecated.Creates a new instance of PdfFileSpecification. The static methods are preferred.
-
-
Method Details
-
url
Deprecated.Creates a file specification of type URL.- Parameters:
writer- thePdfWriterurl- the URL- Returns:
- the file specification
-
fileEmbedded
public static PdfFileSpecification fileEmbedded(PdfWriter writer, String filePath, String fileDisplay, byte[] fileStore) throws IOException Deprecated.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- thePdfWriterfilePath- the file pathfileDisplay- the file information that is presented to the userfileStore- the byte array with the file. If it is notnullit takes precedence overfilePath- Returns:
- the file specification
- Throws:
IOException- on error
-
fileEmbedded
public static PdfFileSpecification fileEmbedded(PdfWriter writer, String filePath, String fileDisplay, byte[] fileStore, int compressionLevel) throws IOException Deprecated.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- thePdfWriterfilePath- the file pathfileDisplay- the file information that is presented to the userfileStore- the byte array with the file. If it is notnullit takes precedence overfilePathcompressionLevel- the compression level to be used for compressing the file it takes precedence overfilePath- Returns:
- the file specification
- Throws:
IOException- on error- Since:
- 2.1.3
-
fileEmbedded
public static PdfFileSpecification fileEmbedded(PdfWriter writer, String filePath, String fileDisplay, byte[] fileStore, boolean compress) throws IOException Deprecated.Creates a file specification with the file embedded. The file may come from the file system or from a byte array.- Parameters:
writer- thePdfWriterfilePath- the file pathfileDisplay- the file information that is presented to the userfileStore- the byte array with the file. If it is notnullit takes precedence overfilePathcompress- sets the compression on the data. Multimedia content will benefit little from compression- Returns:
- the file specification
- Throws:
IOException- on error
-
fileEmbedded
public static PdfFileSpecification fileEmbedded(PdfWriter writer, String filePath, String fileDisplay, byte[] fileStore, boolean compress, String mimeType, PdfDictionary fileParameter) throws IOException Deprecated.Creates a file specification with the file embedded. The file may come from the file system or from a byte array.- Parameters:
writer- thePdfWriterfilePath- the file pathfileDisplay- the file information that is presented to the userfileStore- the byte array with the file. If it is notnullit takes precedence overfilePathcompress- sets the compression on the data. Multimedia content will benefit little from compressionmimeType- the optional mimeTypefileParameter- the optional extra file parameters such as the creation or modification date- Returns:
- the file specification
- Throws:
IOException- on error
-
fileEmbedded
public static PdfFileSpecification fileEmbedded(PdfWriter writer, String filePath, String fileDisplay, byte[] fileStore, String mimeType, PdfDictionary fileParameter, int compressionLevel) throws IOException Deprecated.Creates a file specification with the file embedded. The file may come from the file system or from a byte array.- Parameters:
writer- thePdfWriterfilePath- the file pathfileDisplay- the file information that is presented to the userfileStore- the byte array with the file. If it is notnullit takes precedence overfilePathmimeType- the optional mimeTypefileParameter- the optional extra file parameters such as the creation or modification datecompressionLevel- the level of compression- Returns:
- the file specification
- Throws:
IOException- on error- Since:
- 2.1.3
-
fileExtern
Deprecated.Creates a file specification for an external file.- Parameters:
writer- thePdfWriterfilePath- the file path- Returns:
- the file specification
-
getReference
Deprecated.Gets the indirect reference to this file specification. Multiple invocations will retrieve the same value.- Returns:
- the indirect reference
- Throws:
IOException- on error
-
setMultiByteFileName
public void setMultiByteFileName(byte[] fileName) Deprecated.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
Deprecated.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 filenameunicode- if true, the filename is UTF-16BE encoded; otherwise PDFDocEncoding is used;
-
setVolatile
public void setVolatile(boolean volatile_file) Deprecated.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
-
addDescription
Deprecated.Adds a description for the file that is specified here.- Parameters:
description- some textunicode- if true, the text is added as a unicode string
-
addCollectionItem
Deprecated.Adds the Collection item dictionary.- Parameters:
ci- the PdfCollectionItem to add
-