public class PdfFileSpecification extends PdfDictionary
| Modifier and Type | Field and Description |
|---|---|
protected PdfIndirectReference |
ref |
protected PdfWriter |
writer |
| Constructor and Description |
|---|
PdfFileSpecification()
Creates a new instance of PdfFileSpecification.
|
| Modifier and Type | Method and Description |
|---|---|
static PdfFileSpecification |
fileEmbedded(PdfWriter writer,
java.lang.String filePath,
java.lang.String fileDisplay,
byte[] fileStore)
Creates a file specification with the file embedded.
|
static PdfFileSpecification |
fileEmbedded(PdfWriter writer,
java.lang.String filePath,
java.lang.String fileDisplay,
byte[] fileStore,
boolean compress)
Creates a file specification with the file embedded.
|
static PdfFileSpecification |
fileExtern(PdfWriter writer,
java.lang.String filePath)
Creates a file specification for an external file.
|
PdfIndirectReference |
getReference()
Gets the indirect reference to this file specification.
|
void |
setMultiByteFileName(byte[] fileName)
Sets the file name (the key /F) string as an hex representation
to support multi byte file names.
|
static PdfFileSpecification |
url(PdfWriter writer,
java.lang.String url)
Creates a file specification of type URL.
|
contains, get, getKeys, isCatalog, isDictionaryType, isFont, isOutlineTree, isPage, isPages, merge, mergeDifferent, put, putAll, putDel, putEx, remove, size, toPdf, toStringcanBeInObjStm, getBytes, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, length, setContent, setIndRef, typeprotected PdfWriter writer
protected PdfIndirectReference ref
public PdfFileSpecification()
public static PdfFileSpecification url(PdfWriter writer, java.lang.String url)
writer - the PdfWriterurl - the URLpublic static PdfFileSpecification fileEmbedded(PdfWriter writer, java.lang.String filePath, java.lang.String fileDisplay, byte[] fileStore) throws java.io.IOException
writer - the PdfWriterfilePath - the file pathfileDisplay - the file information that is presented to the userfileStore - the byte array with the file. If it is not null
it takes precedence over filePathjava.io.IOException - on errorpublic static PdfFileSpecification fileEmbedded(PdfWriter writer, java.lang.String filePath, java.lang.String fileDisplay, byte[] fileStore, boolean compress) throws java.io.IOException
writer - the PdfWriterfilePath - the file pathfileDisplay - the file information that is presented to the userfileStore - the byte array with the file. If it is not null
it takes precedence over filePathcompress - sets the compression on the data. Multimedia content will benefit little
from compressionjava.io.IOException - on errorpublic static PdfFileSpecification fileExtern(PdfWriter writer, java.lang.String filePath)
writer - the PdfWriterfilePath - the file pathpublic PdfIndirectReference getReference() throws java.io.IOException
java.io.IOException - on errorpublic void setMultiByteFileName(byte[] fileName)
fileName - the file name as a byte array