public class PdfFileSpecification extends PdfDictionary
hashMap| Constructor and Description |
|---|
PdfFileSpecification()
Creates a new instance of PdfFileSpecification.
|
| Modifier and Type | Method and Description |
|---|---|
static PdfFileSpecification |
fileEmbedded(PdfWriter writer,
String filePath,
String fileDisplay,
byte[] fileStore)
Creates a file specification with the file embedded.
|
static PdfFileSpecification |
fileExtern(PdfWriter writer,
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.
|
void |
setVolatile(boolean volatile_file)
Sets a flag that indicates whether an external file referenced by the file
specification is volatile.
|
get, getAsArray, getAsDict, getAsName, getAsNumber, getAsString, getDirectObject, getKeys, isCatalog, isFont, isOutlineTree, isPage, isPages, put, remove, size, toPdf, toStringgetBytes, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, setContent, setIndRef, typepublic PdfFileSpecification()
public static PdfFileSpecification fileEmbedded(PdfWriter writer, String filePath, String fileDisplay, byte[] fileStore) throws 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 filePathIOException - on errorpublic static PdfFileSpecification fileExtern(PdfWriter writer, String filePath)
writer - the PdfWriterfilePath - the file pathpublic PdfIndirectReference getReference() throws IOException
IOException - on errorpublic void setMultiByteFileName(byte[] fileName)
fileName - the file name as a byte arraypublic void setVolatile(boolean volatile_file)
volatile_file - if true, the external file should not be cachedCopyright © 2021. All rights reserved.