public class PDComplexFileSpecification
extends org.apache.pdfbox.pdmodel.common.filespecification.PDFileSpecification
Constructor and Description |
---|
PDComplexFileSpecification()
Default Constructor.
|
PDComplexFileSpecification(org.apache.pdfbox.cos.COSDictionary dict)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
org.apache.pdfbox.cos.COSDictionary |
getCOSObject()
Convert this standard java object to a COS object.
|
org.apache.pdfbox.pdmodel.common.filespecification.PDEmbeddedFile |
getEmbeddedFile()
Get the embedded file.
|
org.apache.pdfbox.pdmodel.common.filespecification.PDEmbeddedFile |
getEmbeddedFileDos()
Get the embedded dos file.
|
org.apache.pdfbox.pdmodel.common.filespecification.PDEmbeddedFile |
getEmbeddedFileMac()
Get the embedded Mac file.
|
org.apache.pdfbox.pdmodel.common.filespecification.PDEmbeddedFile |
getEmbeddedFileUnicode()
Get the embedded unicode file.
|
org.apache.pdfbox.pdmodel.common.filespecification.PDEmbeddedFile |
getEmbeddedFileUnix()
Get the embedded Unix file.
|
String |
getFile()
This will get the file name.
|
String |
getFileDescription()
This will get the description.
|
String |
getFileDos()
This will get the name representing a Dos file.
|
String |
getFileMac()
This will get the name representing a Mac file.
|
String |
getFilename()
Preferred method for getting the filename.
|
String |
getFileUnicode()
This will get the unicode file name.
|
String |
getFileUnix()
This will get the name representing a Unix file.
|
boolean |
isVolatile()
Get if the file is volatile.
|
void |
setEmbeddedFile(org.apache.pdfbox.pdmodel.common.filespecification.PDEmbeddedFile file)
Set the embedded file for this spec.
|
void |
setEmbeddedFileUnicode(org.apache.pdfbox.pdmodel.common.filespecification.PDEmbeddedFile file)
Set the embedded Unicode file for this spec.
|
void |
setFile(String file)
This will set the file name.
|
void |
setFileDescription(String description)
Set the file description.
|
void |
setFileUnicode(String file)
This will set the unicode file name.
|
void |
setVolatile(boolean fileIsVolatile)
Tell if the underlying file is volatile and should not be cached by the
reader application.
|
public PDComplexFileSpecification()
public PDComplexFileSpecification(org.apache.pdfbox.cos.COSDictionary dict)
dict
- The dictionary that fulfils this file specification.public org.apache.pdfbox.cos.COSDictionary getCOSObject()
public String getFilename()
Preferred method for getting the filename. It will determinate the recommended file name.
First of all we try to get the unicode filename if it exist. If it doesn't exist we take a look at the DOS, MAC UNIX filenames. If no one exist the required F entry will be returned.
public String getFileUnicode()
public void setFileUnicode(String file)
setFile(String)
or the attachment will not be visible on
some viewers.file
- The name of the file.public String getFile()
getFile
in class org.apache.pdfbox.pdmodel.common.filespecification.PDFileSpecification
public void setFile(String file)
setFileUnicode(String)
for cross-platform and
cross-language compatibility.setFile
in class org.apache.pdfbox.pdmodel.common.filespecification.PDFileSpecification
file
- The name of the file.public String getFileDos()
public String getFileMac()
public String getFileUnix()
public boolean isVolatile()
public void setVolatile(boolean fileIsVolatile)
fileIsVolatile
- The new value for the volatility of the file.public org.apache.pdfbox.pdmodel.common.filespecification.PDEmbeddedFile getEmbeddedFile()
public void setEmbeddedFile(org.apache.pdfbox.pdmodel.common.filespecification.PDEmbeddedFile file)
setEmbeddedFileUnicode(PDEmbeddedFile)
for cross-platform and cross-language compatibility.file
- The file to be embedded.public org.apache.pdfbox.pdmodel.common.filespecification.PDEmbeddedFile getEmbeddedFileDos()
public org.apache.pdfbox.pdmodel.common.filespecification.PDEmbeddedFile getEmbeddedFileMac()
public org.apache.pdfbox.pdmodel.common.filespecification.PDEmbeddedFile getEmbeddedFileUnix()
public org.apache.pdfbox.pdmodel.common.filespecification.PDEmbeddedFile getEmbeddedFileUnicode()
public void setEmbeddedFileUnicode(org.apache.pdfbox.pdmodel.common.filespecification.PDEmbeddedFile file)
setEmbeddedFile(PDEmbeddedFile)
or the attachment will not be visible on some viewers.file
- The Unicode file to be embedded.public String getFileDescription()
public void setFileDescription(String description)
description
- The file descriptionCopyright © 2025. All rights reserved.