|
PDFreactor API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.realobjects.pdfreactor.PDFreactor
RealObjects(R) PDFreactor(R)
PDFreactor is a powerful formatting processor for converting XML and XHTML/HTML documents into PDF.
A sample demonstrates the use of PDFreactor:
PDFreactor pdfReactor = new PDFreactor();
InputSource inputSource = new InputSource("http://www.realobjects.com/");
FileOutputStream outputStream = new FileOutputStream("realobjects.pdf");
pdfReactor.setAddBookmarks(true);
pdfReactor.setAddLinks(true);
pdfReactor.renderDocument(inputSource,outputStream);
outputStream.close();
For more information go to: http://www.realobjects.com
| Field Summary | |
static boolean |
ADD_BOOKMARKS_DEFAULT
|
static boolean |
ADD_LINKS_DEFAULT
|
static boolean |
ADD_PREVIEW_IMAGES_DEFAULT
|
static boolean |
ADD_TAGS_DEFAULT
|
static boolean |
ALLOW_ANNOTATIONS_DEFAULT
|
static boolean |
ALLOW_ASSEMBLY_DEFAULT
|
static boolean |
ALLOW_COPY_DEFAULT
|
static boolean |
ALLOW_DEGRADED_PRINTING_DEFAULT
|
static boolean |
ALLOW_FILL_IN_DEFAULT
|
static boolean |
ALLOW_MODIFY_CONTENTS_DEFAULT
|
static boolean |
ALLOW_PRINTING_DEFAULT
|
static boolean |
ALLOW_SCREEN_READERS_DEFAULT
|
static boolean |
APPEND_LOG_DEFAULT
|
static String |
AUTHOR_DEFAULT
|
static String |
BASE_URL_DEFAULT
|
static boolean |
CACHE_FONTS_DEFAULT
|
static int |
CLEANUP_CYBERNEKO
Indicates that the CyberNeko HTML parser will be used to perform a cleanup when loading a document. |
static int |
CLEANUP_DEFAULT
The default cleanup setting. |
static int |
CLEANUP_JTIDY
Indicates that JTidy will be used to perform a cleanup when loading a document. |
static int |
CLEANUP_NONE
Indicates that no cleanup will be performed when loading a document. |
static int |
CLEANUP_TAGSOUP
Indicates that tagsoup will be used to perform a cleanup when loading a document. |
static String |
CREATOR_DEFAULT
|
static boolean |
DISABLE_FONT_REGISTRATION_DEFAULT
|
static int |
DOCTYPE_AUTODETECT
Indicates that the document type will be detected automatically. |
static int |
DOCTYPE_DEFAULT
The default document type setting. |
static int |
DOCTYPE_XHTML
Indicates that the document type will be set to XHTML. |
static int |
DOCTYPE_XML
Indicates that the document type will be set to generic XML. |
static String |
ENCODING_DEFAULT
|
static int |
ENCRYPTION_128
Indicates that the document will be encrypted using RC4 128 bit encryption. |
static int |
ENCRYPTION_40
Indicates that the document will be encrypted using RC4 40 bit encryption. |
static int |
ENCRYPTION_DEFAULT
The default encryption setting. |
static int |
ENCRYPTION_NONE
Indicates that the document will not be encrypted. |
static String |
FONT_CACHE_PATH_DEFAULT
|
static String |
FONT_DIRECTORY_DEFAULT
|
static boolean |
FULL_COMPRESSION_DEFAULT
|
static String |
KEYWORDS_DEFAULT
|
static String |
LICENSE_KEY_DEFAULT
|
static int |
LOG_LEVEL_DEBUG
Indicates that debug, info, warn and fatal log events will be logged. |
static int |
LOG_LEVEL_DEFAULT
The default log level setting. |
static int |
LOG_LEVEL_FATAL
Indicates that only fatal log events will be logged. |
static int |
LOG_LEVEL_INFO
Indicates that info, warn and fatal log events will be logged. |
static int |
LOG_LEVEL_NONE
Indicates that no log events will be logged. |
static int |
LOG_LEVEL_PERFORMANCE
Indicates that all log events will be logged. |
static int |
LOG_LEVEL_WARN
Indicates that warn and fatal log events will be logged. |
static Logger |
LOGGER_DEFAULT
|
static boolean |
MERGE_BEFORE_PDF_DEFAULT
|
static byte[] |
MERGE_BYTE_ARRAY_DEFAULT
|
static String |
MERGE_URL_DEFAULT
|
static String |
OWNER_PASSWORD_DEFAULT
|
static boolean |
PRINT_DIALOG_PROMPT_DEFAULT
|
static String |
SUBJECT_DEFAULT
|
static String |
TITLE_DEFAULT
|
static String |
USER_PASSWORD_DEFAULT
|
static int |
VIEWER_PREFERENCES_CENTER_WINDOW
Position the document's window in the center of the screen. |
static int |
VIEWER_PREFERENCES_DEFAULT
|
static int |
VIEWER_PREFERENCES_DIRECTION_L2R
Position pages in ascending order from left to right. |
static int |
VIEWER_PREFERENCES_DIRECTION_R2L
Position pages in ascending order from right to left. |
static int |
VIEWER_PREFERENCES_DISPLAY_DOC_TITLE
Display the document's title in the top bar. |
static int |
VIEWER_PREFERENCES_FIT_WINDOW
Resize the document's window to fit the size of the first displayed page |
static int |
VIEWER_PREFERENCES_HIDE_MENUBAR
Hide the viewer application's menu bar when the document is active. |
static int |
VIEWER_PREFERENCES_HIDE_TOOLBAR
Hide the viewer application's tool bars when the document is active. |
static int |
VIEWER_PREFERENCES_HIDE_WINDOW_UI
Hide user interface elements in the document's window. |
static int |
VIEWER_PREFERENCES_NON_FULLSCREEN_PAGE_MODE_USE_NONE
Show document outline panel on exiting full-screen mode. |
static int |
VIEWER_PREFERENCES_NON_FULLSCREEN_PAGE_MODE_USE_OC
Show attachments panel on exiting full-screen mode. |
static int |
VIEWER_PREFERENCES_NON_FULLSCREEN_PAGE_MODE_USE_OUTLINES
Show thumbnail images panel on exiting full-screen mode. |
static int |
VIEWER_PREFERENCES_NON_FULLSCREEN_PAGE_MODE_USE_THUMBS
Show optional content group panel on exiting full-screen mode. |
static int |
VIEWER_PREFERENCES_PAGE_LAYOUT_ONE_COLUMN
Display the pages in one column. |
static int |
VIEWER_PREFERENCES_PAGE_LAYOUT_SINGLE_PAGE
Display one page at a time. |
static int |
VIEWER_PREFERENCES_PAGE_LAYOUT_TWO_COLUMN_LEFT
Display the pages in two columns, with odd numbered pages on the left. |
static int |
VIEWER_PREFERENCES_PAGE_LAYOUT_TWO_COLUMN_RIGHT
Display the pages in two columns, with odd numbered pages on the right. |
static int |
VIEWER_PREFERENCES_PAGE_LAYOUT_TWO_PAGE_LEFT
Display two pages at a time, with odd numbered pages on the left. |
static int |
VIEWER_PREFERENCES_PAGE_LAYOUT_TWO_PAGE_RIGHT
Display two pages at a time, with odd numbered pages on the right. |
static int |
VIEWER_PREFERENCES_PAGE_MODE_FULLSCREEN
Switch to fullscreen mode on startup. |
static int |
VIEWER_PREFERENCES_PAGE_MODE_USE_ATTACHMENTS
Show attachments panel on startup. |
static int |
VIEWER_PREFERENCES_PAGE_MODE_USE_NONE
Show no panel on startup. |
static int |
VIEWER_PREFERENCES_PAGE_MODE_USE_OC
Show optional content group panel on startup. |
static int |
VIEWER_PREFERENCES_PAGE_MODE_USE_OUTLINES
Show document outline panel on startup. |
static int |
VIEWER_PREFERENCES_PAGE_MODE_USE_THUMBS
Show thumbnail images panel on startup. |
static boolean |
XSLT_MODE_DEFAULT
|
| Constructor Summary | |
PDFreactor()
Constructs PDFreactor. |
|
| Method Summary | |
void |
addProgressEventListener(ProgressEventListener listener)
Adds a progress event listener. |
void |
addUserStyleSheet(InputSource inputSource)
Adds a user style sheet to the document. |
void |
addUserStyleSheet(String content,
String media,
String title,
String uri)
Adds a user style sheet to the document. |
void |
addXSLTStyleSheet(String content,
String uri)
Adds an XSLT style sheet to the document. |
String |
getError()
Returns the error messages generated during rendering. |
String |
getLog()
Returns the log messages generated during rendering based on the log level. |
Logger |
getLogger()
Returns the current logger. |
static boolean |
isValidCleanup(int value)
Determines whether a specified number is a valid cleanup value or not. |
static boolean |
isValidDocType(int value)
Determines whether a specified number is a valid document type value or not. |
static boolean |
isValidEncryption(int value)
Determines whether a specified number is a valid encryption value or not. |
static boolean |
isValidLogLevel(int value)
Determines whether a specified number is a valid log level value or not. |
void |
removeAllUserStyleSheets()
Removes all user style sheets. |
void |
removeAllXSLTStyleSheets()
Removes all XSLT style sheets. |
void |
removeProgressEventListener(ProgressEventListener listener)
Removes a progress event listener. |
void |
renderDocument(InputSource inputSource,
OutputStream outputStream)
Generates a PDF document from an InputSource based on the current settings. |
byte[] |
renderDocumentFromByteArray(byte[] array)
Generates a PDF document from an XML document based on the current settings. |
byte[] |
renderDocumentFromContent(String content)
Generates a PDF document from an XML document based on the current settings. |
byte[] |
renderDocumentFromURL(String url)
Generates a PDF document from an XML document based on the current settings. |
void |
setAddBookmarks(boolean value)
Enables or disables bookmarks in the PDF document. |
void |
setAddLinks(boolean value)
Enables or disables links in the PDF document. |
void |
setAddPreviewImages(boolean value)
Enables or disables embedding of image previews per page in the PDF document. |
void |
setAddTags(boolean value)
Enables or disables tagging of the PDF document. |
void |
setAllowAnnotations(boolean value)
Enables or disables the 'annotations' restriction in the PDF document. |
void |
setAllowAssembly(boolean value)
Enables or disables the 'assembly' restriction in the PDF document. |
void |
setAllowCopy(boolean value)
Enables or disables the 'copy' restriction in the PDF document. |
void |
setAllowDegradedPrinting(boolean value)
Enables or disables the 'degraded printing' restriction in the PDF document. |
void |
setAllowFillIn(boolean value)
Enables or disables the 'fill in' restriction in the PDF document. |
void |
setAllowModifyContents(boolean value)
Enables or disables the 'modify contents' restriction in the PDF document. |
void |
setAllowPrinting(boolean value)
Enables or disables the 'printing' restriction in the PDF document. |
void |
setAllowScreenReaders(boolean value)
Enables or disables the 'screen readers' restriction in the PDF document. |
void |
setAppendLog(boolean value)
Specifies whether or not the log data should be added to the PDF document. |
void |
setAuthor(String value)
Sets the value of the author field of the PDF document. |
void |
setBaseURL(String value)
Sets the base URL of the XML document. |
void |
setCacheFonts(boolean value)
Enables or disables caching of font information. |
void |
setCleanupTool(int value)
Sets the cleanup tool to use for documents with unparsable content. |
void |
setCreator(String value)
Sets the value of creator field of the PDF document. |
void |
setDisableFontRegistration(boolean value)
Enables or disables the font registration. |
void |
setDocType(String value)
Deprecated. Since PDFreactor version 2. Replaced by setDocumentType(int). |
void |
setDocTypeAsInt(int value)
Deprecated. Since PDFreactor version 2. Replaced by setDocumentType(int). |
void |
setDocumentDefaultLanguage(String languageCode)
Sets the language used for documents having no explicit language attribute set. |
void |
setDocumentType(int value)
Sets the document type. |
void |
setEncoding(String value)
Sets the encoding of the document. |
void |
setEncryption(int value)
Sets the encryption. |
void |
setFontCachePath(String location)
Sets the path of the font cache. |
void |
setFontDirectory(String location)
Sets the font directory from which fonts will be read. |
void |
setFullCompression(boolean value)
Enables or disables full compression of the PDF document. |
void |
setKeywords(String value)
Sets the value of the keywords field of the PDF document. |
void |
setLicenseKey(String content)
Sets the license key using a string. |
void |
setLicenseKeyInputSource(InputSource inputSource)
Deprecated. Since PDFreactor version 2. Replaced by setLicenseKey(String). |
void |
setLogger(Logger object)
Sets a logger to receive log messages. |
void |
setLogLevel(int value)
Sets the log level. |
void |
setMergeBeforePDF(boolean value)
Sets the merge method which describes how the two PDF documents (the PDF from the XML source and the external PDF) will be merged. |
void |
setMergeByteArray(byte[] array)
This method sets a byte array containing an external PDF document which will be merged with the PDF document generated by the XML source. |
void |
setMergeURL(String url)
This method sets a URL of an external PDF document which will be merged with the PDF document generated by the XML source. |
void |
setOwnerPassword(String value)
Sets the owner password of the PDF document. |
void |
setPrintDialogPrompt(boolean value)
Enables or disables a print dialog to be shown upon opening the generated PDF document by a PDF viewer. |
void |
setSubject(String value)
Sets the value of the subject field of the PDF document. |
void |
setTitle(String value)
Sets the value of the title field of the PDF document. |
void |
setUserPassword(String value)
Sets the user password of the PDF document. |
void |
setViewerPreferences(int viewerPreferences)
Sets the page layout and page mode preferences of the PDF. |
void |
setXSLTMode(boolean value)
Enables or disables XSLT transformations. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int CLEANUP_NONE
public static final int CLEANUP_JTIDY
public static final int CLEANUP_CYBERNEKO
public static final int CLEANUP_TAGSOUP
public static final int CLEANUP_DEFAULT
CLEANUP_CYBERNEKO.
public static final int DOCTYPE_AUTODETECT
public static final int DOCTYPE_XML
public static final int DOCTYPE_XHTML
public static final int DOCTYPE_DEFAULT
DOCTYPE_AUTODETECT.
public static final int ENCRYPTION_NONE
public static final int ENCRYPTION_40
public static final int ENCRYPTION_128
public static final int ENCRYPTION_DEFAULT
ENCRYPTION_NONE.
public static final int LOG_LEVEL_NONE
public static final int LOG_LEVEL_FATAL
public static final int LOG_LEVEL_WARN
public static final int LOG_LEVEL_INFO
public static final int LOG_LEVEL_DEBUG
public static final int LOG_LEVEL_PERFORMANCE
public static final int LOG_LEVEL_DEFAULT
LOG_LEVEL_NONE.
public static final String LICENSE_KEY_DEFAULT
public static final boolean DISABLE_FONT_REGISTRATION_DEFAULT
public static final boolean CACHE_FONTS_DEFAULT
public static final String FONT_CACHE_PATH_DEFAULT
public static final String FONT_DIRECTORY_DEFAULT
public static final String BASE_URL_DEFAULT
public static final boolean XSLT_MODE_DEFAULT
public static final String ENCODING_DEFAULT
public static final String AUTHOR_DEFAULT
public static final String CREATOR_DEFAULT
public static final String KEYWORDS_DEFAULT
public static final String TITLE_DEFAULT
public static final String SUBJECT_DEFAULT
public static final boolean FULL_COMPRESSION_DEFAULT
public static final String OWNER_PASSWORD_DEFAULT
public static final String USER_PASSWORD_DEFAULT
public static final boolean ADD_LINKS_DEFAULT
public static final boolean ADD_BOOKMARKS_DEFAULT
public static final boolean ADD_TAGS_DEFAULT
public static final boolean ADD_PREVIEW_IMAGES_DEFAULT
public static final boolean PRINT_DIALOG_PROMPT_DEFAULT
public static final boolean APPEND_LOG_DEFAULT
public static final boolean ALLOW_ANNOTATIONS_DEFAULT
public static final boolean ALLOW_ASSEMBLY_DEFAULT
public static final boolean ALLOW_COPY_DEFAULT
public static final boolean ALLOW_DEGRADED_PRINTING_DEFAULT
public static final boolean ALLOW_FILL_IN_DEFAULT
public static final boolean ALLOW_MODIFY_CONTENTS_DEFAULT
public static final boolean ALLOW_PRINTING_DEFAULT
public static final boolean ALLOW_SCREEN_READERS_DEFAULT
public static final int VIEWER_PREFERENCES_DEFAULT
public static final String MERGE_URL_DEFAULT
public static final byte[] MERGE_BYTE_ARRAY_DEFAULT
public static final boolean MERGE_BEFORE_PDF_DEFAULT
public static final Logger LOGGER_DEFAULT
public static final int VIEWER_PREFERENCES_PAGE_LAYOUT_SINGLE_PAGE
public static final int VIEWER_PREFERENCES_PAGE_LAYOUT_ONE_COLUMN
public static final int VIEWER_PREFERENCES_PAGE_LAYOUT_TWO_COLUMN_LEFT
public static final int VIEWER_PREFERENCES_PAGE_LAYOUT_TWO_COLUMN_RIGHT
public static final int VIEWER_PREFERENCES_PAGE_LAYOUT_TWO_PAGE_LEFT
public static final int VIEWER_PREFERENCES_PAGE_LAYOUT_TWO_PAGE_RIGHT
public static final int VIEWER_PREFERENCES_PAGE_MODE_USE_NONE
public static final int VIEWER_PREFERENCES_PAGE_MODE_USE_OUTLINES
public static final int VIEWER_PREFERENCES_PAGE_MODE_USE_THUMBS
public static final int VIEWER_PREFERENCES_PAGE_MODE_FULLSCREEN
public static final int VIEWER_PREFERENCES_PAGE_MODE_USE_OC
public static final int VIEWER_PREFERENCES_PAGE_MODE_USE_ATTACHMENTS
public static final int VIEWER_PREFERENCES_HIDE_TOOLBAR
public static final int VIEWER_PREFERENCES_HIDE_MENUBAR
public static final int VIEWER_PREFERENCES_HIDE_WINDOW_UI
public static final int VIEWER_PREFERENCES_FIT_WINDOW
public static final int VIEWER_PREFERENCES_CENTER_WINDOW
public static final int VIEWER_PREFERENCES_DISPLAY_DOC_TITLE
public static final int VIEWER_PREFERENCES_NON_FULLSCREEN_PAGE_MODE_USE_NONE
public static final int VIEWER_PREFERENCES_NON_FULLSCREEN_PAGE_MODE_USE_OUTLINES
public static final int VIEWER_PREFERENCES_NON_FULLSCREEN_PAGE_MODE_USE_THUMBS
public static final int VIEWER_PREFERENCES_NON_FULLSCREEN_PAGE_MODE_USE_OC
public static final int VIEWER_PREFERENCES_DIRECTION_L2R
public static final int VIEWER_PREFERENCES_DIRECTION_R2L
| Constructor Detail |
public PDFreactor()
| Method Detail |
public void setLicenseKeyInputSource(InputSource inputSource)
throws IOException
setLicenseKey(String).
Sets the license key using an XML input source. The input source will be
loaded and set by the setLicenseKey(String) method. If the
input source is null then the license key is set to
null.
inputSource - The input source of the license key.
IOException - if an IO error occurs.PDFreactor.setLicenseKey(String)public void setLicenseKey(String content)
null then PDFreactor looks for a 'licensekey.xml' file in
the same directory where the 'PDFreactor.jar' file is located. If no
license key could be found then PDFreactor runs in evaluation mode.
The default value is null.
content - The content of the license key as a string.public void setDisableFontRegistration(boolean value)
Enables or disables the font registration. If font registration is enabled and a valid font cache exists then this font cache will be used. If font registration is disabled, any existing font cache will be ignored and the font directories will be scanned for font information.
The default value is false.
value - The new value of the font registration setting.PDFreactor.setCacheFonts(boolean),
PDFreactor.setFontCachePath(String),
PDFreactor.setFontDirectory(String)public void setCacheFonts(boolean value)
Enables or disables caching of font information.
During the PDF creation PDFreactor requires information about fonts
in the system. The process to get this information takes a long time.
Thus PDFreactor offers an option to cache the collected information
about fonts. A font cache can be reused by PDFreactor on every PDF
creation process but only if font registration is enabled. If font
registration is disabled then the font cache will be ignored. (See
setDisableFontRegistration(boolean) for more information).
The default value is true.
value - The new value of the cache fonts setting.PDFreactor.setDisableFontRegistration(boolean),
PDFreactor.setFontCachePath(String),
PDFreactor.setFontDirectory(String)public void setFontCachePath(String location)
Sets the path of the font cache. This path will be used to read
and write the font cache. If the font cache path is set to
null then the "user.home" directory will be used.
The default value is null.
location - The path of the font cache.PDFreactor.setDisableFontRegistration(boolean),
PDFreactor.setCacheFonts(boolean),
PDFreactor.setFontDirectory(String)public void setFontDirectory(String location)
Sets the font directory from which fonts will be read. All files with the endings ".ttf", ".otf", ".afm" and ".ttc" will be read.
The default value of the font directory is "%system%".
location - The font directory.PDFreactor.setDisableFontRegistration(boolean),
PDFreactor.setCacheFonts(boolean),
PDFreactor.setFontCachePath(String)public void setLogLevel(int value)
Sets the log level. Use one of the following LOG_LEVEL_
constants to specify the log level:
LOG_LEVEL_NONE
LOG_LEVEL_FATAL
LOG_LEVEL_WARN
LOG_LEVEL_INFO
LOG_LEVEL_DEBUG
LOG_LEVEL_PERFORMANCE
LOG_LEVEL_DEFAULT
The default value specified by LOG_LEVEL_DEFAULT is
LOG_LEVEL_NONE.
value - The new log level setting.PDFreactor.getLog()public void setBaseURL(String value)
Sets the base URL of the XML document.
To resolve relative URLs to absolute URLs a reference (base) URL is
required. This reference URL is usually the system id of the document.
This method can be used to specify another reference URL. If this URL
is not null then it will be used instead of the system id.
The default value is null.
value - The base URL for the document.public void setXSLTMode(boolean value)
Enables or disables XSLT transformations. Set this value to
true to enable XSLT transformations or to
false to disable XSLT transformations.
The default value is false.
value - The new XSLT mode.public void setEncoding(String value)
Sets the encoding of the document. If this value is set to
null or it is empty then the encoding will be detected
automatically.
The default value is null.
value - The encoding of the document or null for
autodetection.public void setCleanupTool(int value)
Sets the cleanup tool to use for documents with unparsable content.
Use one of the following CLEANUP_ constants to specify
the cleanup tool:
CLEANUP_NONE
CLEANUP_JTIDY
CLEANUP_CYBERNEKO
CLEANUP_TAGSOUP
CLEANUP_DEFAULT
The default value specified by CLEANUP_DEFAULT is
CLEANUP_CYBERNEKO.
value - The new cleanup tool.public void setDocType(String value)
setDocumentType(int).
Sets the document type by a string. Valid values are
"xhtml", "xml", "auto"
and "default".
value - The new document type setting.PDFreactor.setDocumentType(int)public void setDocTypeAsInt(int value)
setDocumentType(int).
Sets the document type.
value - The new document type setting.PDFreactor.setDocumentType(int)public void setDocumentType(int value)
Sets the document type. Use one of the following DOCTYPE_
constants to specify the document type:
DOCTYPE_AUTODETECT
DOCTYPE_XML
DOCTYPE_XHTML
DOCTYPE_DEFAULT
The default value specified by DOCTYPE_DEFAULT is
DOCTYPE_AUTODETECT.
value - The new document type setting.
public void addUserStyleSheet(InputSource inputSource)
throws IOException
Adds a user style sheet to the document. The specified input source will be loaded and then added.
inputSource - The input source of the style sheet.
IOException - If the stylesheet could not be loaded.PDFreactor.addUserStyleSheet(String,String,String,String),
PDFreactor.removeAllUserStyleSheets()
public void addUserStyleSheet(String content,
String media,
String title,
String uri)
Adds a user style sheet to the document. There are two ways to specify
the style sheet:
content - The content of the style sheet.media - The media type of the style sheet.title - The title of the style sheet.uri - The URI of the style sheet.PDFreactor.addUserStyleSheet(InputSource),
PDFreactor.removeAllUserStyleSheets()public void removeAllUserStyleSheets()
Removes all user style sheets.
PDFreactor.addUserStyleSheet(InputSource),
PDFreactor.addUserStyleSheet(String,String,String,String)
public void addXSLTStyleSheet(String content,
String uri)
Adds an XSLT style sheet to the document. There are two ways to specify
the style sheet:
content - The content of the style sheet.uri - The URI of the style sheet.PDFreactor.removeAllXSLTStyleSheets()public void removeAllXSLTStyleSheets()
Removes all XSLT style sheets.
PDFreactor.addXSLTStyleSheet(String,String)public void setAuthor(String value)
Sets the value of the author field of the PDF document.
value - The author of the document.public void setCreator(String value)
Sets the value of creator field of the PDF document.
value - The creator of the document.public void setKeywords(String value)
Sets the value of the keywords field of the PDF document.
value - The keywords of the document.public void setTitle(String value)
Sets the value of the title field of the PDF document.
value - The title of the document.public void setSubject(String value)
Sets the value of the subject field of the PDF document.
value - The subject of the document.public void setDocumentDefaultLanguage(String languageCode)
Sets the language used for documents having no explicit language attribute set.
The language code is used to resolve the lang() selector correct and to determine the correct language used for hyphenation.
languageCode - the default ISO 639 language code used for documents.public void setEncryption(int value)
Sets the encryption. Use one of the following ENCRYPTION_
constants to specify the encryption:
ENCRYPTION_NONE
ENCRYPTION_40
ENCRYPTION_128
ENCRYPTION_DEFAULT
The default value specified by ENCRYPTION_DEFAULT is
ENCRYPTION_NONE.
value - The new encryption setting.PDFreactor.setOwnerPassword(String),
PDFreactor.setUserPassword(String),
PDFreactor.setAllowAnnotations(boolean),
PDFreactor.setAllowAssembly(boolean),
PDFreactor.setAllowCopy(boolean),
PDFreactor.setAllowDegradedPrinting(boolean),
PDFreactor.setAllowFillIn(boolean),
PDFreactor.setAllowModifyContents(boolean),
PDFreactor.setAllowPrinting(boolean),
PDFreactor.setAllowScreenReaders(boolean)public void setFullCompression(boolean value)
Enables or disables full compression of the PDF document.
The default value is false.
value - Use true to enable full compression of the
document and false to disable full compression.public void setOwnerPassword(String value)
Sets the owner password of the PDF document.
The default value is null.
value - The new owner password.PDFreactor.setEncryption(int),
PDFreactor.setUserPassword(String)public void setUserPassword(String value)
Sets the user password of the PDF document.
The default value is null.
value - The new user password.PDFreactor.setEncryption(int),
PDFreactor.setOwnerPassword(String)public void setAddLinks(boolean value)
Enables or disables links in the PDF document.
The default value is false.
value - Use true to enable links in the document
and false to disable links.public void setAddBookmarks(boolean value)
Enables or disables bookmarks in the PDF document.
The default value isfalse.
value - Use true to enable bookmarks in the document
and false to disable bookmarks.public void setAddTags(boolean value)
Enables or disables tagging of the PDF document.
The default value is false.