@Deprecated public class PDFreactor extends Object
PDFreactor
converts HTML and XML documents into PDF and provides
a large number of settings for the conversion process.
This sample demonstrates the use of PDFreactor:
PDFreactor
pdfReactor = new PDFreactor
();
FileOutputStream
outputStream = new FileOutputStream
("realobjects.pdf");
pdfReactor.setAddBookmarks(true);
pdfReactor.setAddLinks(true);
byte[] pdf = pdfReactor.renderDocumentFromURL("https://www.realobjects.com/");
outputStream.write(pdf);
outputStream.close();
Please note: A new instance of PDFreactor
should be created for every conversion.
Important: On a system without a graphical environment you have to enable the headless mode by setting the appropriate system property. Please see the manual for details.
For more information please have a look at the PDFreactor manual.
This API is deprecated. Use PDFreactor
instead.
Modifier and Type | Field and Description |
---|---|
static int |
CLEANUP_CYBERNEKO
Deprecated.
Indicates that the CyberNeko HTML parser will be used to perform a
cleanup when loading a non-well-formed document.
|
static int |
CLEANUP_JTIDY
Deprecated.
Indicates that JTidy will be used to perform a cleanup when loading a
non-well-formed document.
|
static int |
CLEANUP_NONE
Deprecated.
Indicates that no cleanup will be performed when loading a document.
|
static int |
CLEANUP_TAGSOUP
Deprecated.
Indicates that tagsoup will be used to perform a
cleanup when loading a non-well-formed document.
|
static int |
COLOR_SPACE_CMYK
Deprecated.
The color space CMYK.
|
static int |
COLOR_SPACE_RGB
Deprecated.
The color space RGB.
|
static int |
CONFORMANCE_PDF
Deprecated.
PDF with no additional restrictions (default).
|
static int |
CONFORMANCE_PDFA
Deprecated.
As of PDFreactor 7.0, replaced by
PDFreactor.CONFORMANCE_PDFA1A . |
static int |
CONFORMANCE_PDFA1A
Deprecated.
PDF/A-1a (ISO 19005-1:2005 Level A).
|
static int |
CONFORMANCE_PDFA1A_PDFUA1
Deprecated.
PDF/A-1a + PDF/UA-1 (ISO 19005-1:2005 Level A + ISO 14289-1:2014).
|
static int |
CONFORMANCE_PDFA1B
Deprecated.
PDF/A-1b (ISO 19005-1:2005 Level B).
|
static int |
CONFORMANCE_PDFA2A
Deprecated.
PDF/A-2a (ISO 19005-2:2011 Level A).
|
static int |
CONFORMANCE_PDFA2A_PDFUA1
Deprecated.
PDF/A-2a + PDF/UA-1 (ISO 19005-2:2011 Level A + ISO 14289-1:2014).
|
static int |
CONFORMANCE_PDFA2B
Deprecated.
PDF/A-2b (ISO 19005-2:2011 Level B).
|
static int |
CONFORMANCE_PDFA2U
Deprecated.
PDF/A-2u (ISO 19005-2:2011 Level U).
|
static int |
CONFORMANCE_PDFA3A
Deprecated.
PDF/A-3a (ISO 19005-3:2012 Level A).
|
static int |
CONFORMANCE_PDFA3A_PDFUA1
Deprecated.
PDF/A-3a + PDF/UA-1 (ISO 19005-3:2012 Level A + ISO 14289-1:2014).
|
static int |
CONFORMANCE_PDFA3B
Deprecated.
PDF/A-3b (ISO 19005-3:2012 Level B).
|
static int |
CONFORMANCE_PDFA3U
Deprecated.
PDF/A-3u (ISO 19005-3:2012 Level U).
|
static int |
CONFORMANCE_PDFUA1
Deprecated.
PDF/UA-1 (ISO 14289-1:2014).
|
static int |
CONFORMANCE_PDFX1A_2001
Deprecated.
PDF/X-1a:2001 (ISO 15930-1:2001).
|
static int |
CONFORMANCE_PDFX1A_2003
Deprecated.
PDF/X-1a:2003 (ISO 15930-4:2003).
|
static int |
CONFORMANCE_PDFX3_2002
Deprecated.
PDF/X-3:2002 (ISO 15930-3:2002).
|
static int |
CONFORMANCE_PDFX3_2003
Deprecated.
PDF/X-3:2003 (ISO 15930-6:2003).
|
static int |
CONFORMANCE_PDFX4
Deprecated.
PDF/X-4 (ISO 15930-7:2008).
|
static int |
CONFORMANCE_PDFX4P
Deprecated.
PDF/X-4p (ISO 15930-7:2008).
|
static int |
DOCTYPE_AUTODETECT
Deprecated.
Indicates that the document type will be detected automatically.
|
static int |
DOCTYPE_HTML5
Deprecated.
Indicates that the document type will be set to HTML5.
|
static int |
DOCTYPE_XHTML
Deprecated.
Indicates that the document type will be set to XHTML.
|
static int |
DOCTYPE_XML
Deprecated.
Indicates that the document type will be set to generic XML.
|
static int |
ENCRYPTION_128
Deprecated.
Indicates that the document will be encrypted using RC4 128 bit encryption.
|
static int |
ENCRYPTION_40
Deprecated.
Indicates that the document will be encrypted using RC4 40 bit encryption.
|
static int |
ENCRYPTION_NONE
Deprecated.
Indicates that the document will not be encrypted.
|
static int |
ERROR_POLICY_LICENSE
Deprecated.
Whether an exception should be thrown when no legal full license key is set.
|
static int |
ERROR_POLICY_MISSING_RESOURCE
Deprecated.
Whether an exception should be thrown when resources could not be loaded.
|
static int |
EXCEEDING_CONTENT_AGAINST_NONE
Deprecated.
Do not log exceeding content.
|
static int |
EXCEEDING_CONTENT_AGAINST_PAGE_BORDERS
Deprecated.
Log content exceeding the edges of its page.
|
static int |
EXCEEDING_CONTENT_AGAINST_PAGE_CONTENT
Deprecated.
Log content exceeding its page content area (overlaps the page margin).
|
static int |
EXCEEDING_CONTENT_AGAINST_PARENT
Deprecated.
Log content exceeding its container.
|
static int |
EXCEEDING_CONTENT_ANALYZE_CONTENT
Deprecated.
Log exceeding content.
|
static int |
EXCEEDING_CONTENT_ANALYZE_CONTENT_AND_BOXES
Deprecated.
Log exceeding content and all boxes.
|
static int |
EXCEEDING_CONTENT_ANALYZE_CONTENT_AND_STATIC_BOXES
Deprecated.
Log exceeding content and boxes without absolute positioning.
|
static int |
EXCEEDING_CONTENT_ANALYZE_NONE
Deprecated.
Do not log exceeding content.
|
static int |
HTTPS_MODE_LENIENT
Deprecated.
Indicates lenient HTTPS behavior.
|
static int |
HTTPS_MODE_STRICT
Deprecated.
Indicates strict HTTPS behavior.
|
static int |
JAVASCRIPT_MODE_DISABLED
Deprecated.
Indicates that JavaScript is disabled.
|
static int |
JAVASCRIPT_MODE_ENABLED
Deprecated.
Indicates that JavaScript is enabled.
|
static int |
JAVASCRIPT_MODE_ENABLED_NO_LAYOUT
Deprecated.
Indicates that JavaScript is enabled, without access to layout data.
|
static int |
JAVASCRIPT_MODE_ENABLED_REAL_TIME
Deprecated.
Indicates that JavaScript is enabled,
without converter-specific optimizations to timeouts and intervals.
|
static int |
JAVASCRIPT_MODE_ENABLED_TIME_LAPSE
Deprecated.
Indicates that JavaScript is enabled,
with time stamps increasing more quickly.
|
static String |
KEYSTORE_TYPE_JKS
Deprecated.
Keystore type "jks".
|
static String |
KEYSTORE_TYPE_PKCS12
Deprecated.
Keystore type "pkcs12".
|
static int |
LOG_LEVEL_DEBUG
Deprecated.
Indicates that debug, info, warn and fatal log events will be logged.
|
static int |
LOG_LEVEL_FATAL
Deprecated.
Indicates that only fatal log events will be logged.
|
static int |
LOG_LEVEL_INFO
Deprecated.
Indicates that info, warn and fatal log events will be logged.
|
static int |
LOG_LEVEL_NONE
Deprecated.
Indicates that no log events will be logged.
|
static int |
LOG_LEVEL_PERFORMANCE
Deprecated.
Indicates that all log events will be logged.
|
static int |
LOG_LEVEL_WARN
Deprecated.
Indicates that warn and fatal log events will be logged.
|
static int |
MEDIA_FEATURE_ASPECT_RATIO
Deprecated.
CSS 3 Media Feature describing the aspect ratio of the page content.
|
static int |
MEDIA_FEATURE_COLOR
Deprecated.
CSS 3 Media Feature describing the number of bits per color component.
|
static int |
MEDIA_FEATURE_COLOR_INDEX
Deprecated.
CSS 3 Media Feature describing the number of entries in the color lookup table.
|
static int |
MEDIA_FEATURE_DEVICE_ASPECT_RATIO
Deprecated.
CSS 3 Media Feature describing the aspect ratio of the page.
|
static int |
MEDIA_FEATURE_DEVICE_HEIGHT
Deprecated.
CSS 3 Media Feature describing the height of the page.
|
static int |
MEDIA_FEATURE_DEVICE_WIDTH
Deprecated.
CSS 3 Media Feature describing the width of the page.
|
static int |
MEDIA_FEATURE_GRID
Deprecated.
CSS 3 Media Feature defining whether the output is grid-based.
|
static int |
MEDIA_FEATURE_HEIGHT
Deprecated.
CSS 3 Media Feature height of page content.
|
static int |
MEDIA_FEATURE_MONOCHROME
Deprecated.
CSS 3 Media Feature describing the number of bits per pixel in a monochrome frame buffer.
|
static int |
MEDIA_FEATURE_ORIENTATION
Deprecated.
CSS 3 Media Feature describing the page orientation.
|
static int |
MEDIA_FEATURE_RESOLUTION
Deprecated.
CSS 3 Media Feature describing the resolution of the output device.
|
static int |
MEDIA_FEATURE_WIDTH
Deprecated.
CSS 3 Media Feature width of page content.
|
static int |
MERGE_MODE_APPEND
Deprecated.
Default merge mode: Append converted document to existing PDF.
|
static int |
MERGE_MODE_ARRANGE
Deprecated.
Advanced merge mode: Allows to insert specific pages from existing PDFs into
the converted document.
|
static int |
MERGE_MODE_OVERLAY
Deprecated.
Alternate merge mode (overlay): Adding converted document above the existing PDF.
|
static int |
MERGE_MODE_OVERLAY_BELOW
Deprecated.
Alternate merge mode (overlay): Adding converted document below the existing PDF.
|
static int |
MERGE_MODE_PREPEND
Deprecated.
Alternate merge mode: Prepend converted document to existing PDF.
|
static int |
OUTPUT_FORMAT_BMP
Deprecated.
BMP output format.
|
static int |
OUTPUT_FORMAT_GIF
Deprecated.
GIF output format.
|
static int |
OUTPUT_FORMAT_JPEG
Deprecated.
JPEG output format.
|
static int |
OUTPUT_FORMAT_PDF
Deprecated.
PDF output format<./p>
|
static int |
OUTPUT_FORMAT_PNG
Deprecated.
PNG output format (using Java Image I/O).
|
static int |
OUTPUT_FORMAT_PNG_AI
Deprecated.
PNG output format (using Apache Imaging).
|
static int |
OUTPUT_FORMAT_PNG_TRANSPARENT
Deprecated.
Transparent PNG output format (using Java Image I/O).
|
static int |
OUTPUT_FORMAT_PNG_TRANSPARENT_AI
Deprecated.
Transparent PNG output format (using Apache Imaging).
|
static int |
OUTPUT_FORMAT_TIFF_CCITT_1D
Deprecated.
Monochrome CCITT 1D compressed TIFF output format.
|
static int |
OUTPUT_FORMAT_TIFF_CCITT_GROUP_3
Deprecated.
Monochrome CCITT Group 3 compressed TIFF output format.
|
static int |
OUTPUT_FORMAT_TIFF_CCITT_GROUP_4
Deprecated.
Monochrome CCITT Group 4 compressed TIFF output format.
|
static int |
OUTPUT_FORMAT_TIFF_LZW
Deprecated.
LZW compressed TIFF output format.
|
static int |
OUTPUT_FORMAT_TIFF_PACKBITS
Deprecated.
PackBits compressed TIFF output format.
|
static int |
OUTPUT_FORMAT_TIFF_UNCOMPRESSED
Deprecated.
Uncompressed TIFF output format.
|
static String |
OUTPUT_INTENT_DEFAULT_PROFILE_FOGRA39
Deprecated.
"Coated FOGRA39" output intent default profile.
|
static String |
OUTPUT_INTENT_DEFAULT_PROFILE_GRACOL
Deprecated.
"Coated GRACoL 2006" output intent default profile.
|
static String |
OUTPUT_INTENT_DEFAULT_PROFILE_IFRA
Deprecated.
"ISO News print 26% (IFRA)" output intent default profile.
|
static String |
OUTPUT_INTENT_DEFAULT_PROFILE_JAPAN
Deprecated.
"Japan Color 2001 Coated" output intent default profile.
|
static String |
OUTPUT_INTENT_DEFAULT_PROFILE_JAPAN_NEWSPAPER
Deprecated.
"Japan Color 2001 Newspaper" output intent default profile.
|
static String |
OUTPUT_INTENT_DEFAULT_PROFILE_JAPAN_UNCOATED
Deprecated.
"Japan Color 2001 Uncoated" output intent default profile.
|
static String |
OUTPUT_INTENT_DEFAULT_PROFILE_JAPAN_WEB
Deprecated.
"Japan Web Coated (Ad)" output intent default profile.
|
static String |
OUTPUT_INTENT_DEFAULT_PROFILE_SWOP
Deprecated.
"US Web Coated (SWOP) v2" output intent default profile.
|
static String |
OUTPUT_INTENT_DEFAULT_PROFILE_SWOP_3
Deprecated.
"Web Coated SWOP 2006 Grade 3 Paper" output intent default profile.
|
static int |
OVERLAY_REPEAT_ALL_PAGES
Deprecated.
All pages of the shorter document are repeated, to overlay all pages of the longer document.
|
static int |
OVERLAY_REPEAT_LAST_PAGE
Deprecated.
Last page of the shorter document is repeated, to overlay all pages of the longer document.
|
static int |
OVERLAY_REPEAT_NONE
Deprecated.
No pages of the shorter document are repeated, leaving some pages of the longer document without overlay.
|
static int |
OVERLAY_REPEAT_TRIM
Deprecated.
The resulting PDF is trimmed to the number of pages of the shorter document.
|
static String |
PAGE_ORDER_BOOKLET
Deprecated.
Page order mode to arrange all pages in booklet order.
|
static String |
PAGE_ORDER_BOOKLET_RTL
Deprecated.
Page order mode to arrange all pages in right-to-left booklet order.
|
static String |
PAGE_ORDER_EVEN
Deprecated.
Page order mode to keep even pages only.
|
static String |
PAGE_ORDER_ODD
Deprecated.
Page order mode to keep odd pages only.
|
static String |
PAGE_ORDER_REVERSE
Deprecated.
Page order mode to reverse the page order.
|
static int |
PAGES_PER_SHEET_DIRECTION_DOWN_LEFT
Deprecated.
Arranges the pages on a sheet from top to bottom and right to left.
|
static int |
PAGES_PER_SHEET_DIRECTION_DOWN_RIGHT
Deprecated.
Arranges the pages on a sheet from top to bottom and left to right.
|
static int |
PAGES_PER_SHEET_DIRECTION_LEFT_DOWN
Deprecated.
Arranges the pages on a sheet from right to left and top to bottom.
|
static int |
PAGES_PER_SHEET_DIRECTION_LEFT_UP
Deprecated.
Arranges the pages on a sheet from right to left and bottom to top.
|
static int |
PAGES_PER_SHEET_DIRECTION_RIGHT_DOWN
Deprecated.
Arranges the pages on a sheet from left to right and top to bottom.
|
static int |
PAGES_PER_SHEET_DIRECTION_RIGHT_UP
Deprecated.
Arranges the pages on a sheet from left to right and bottom to top.
|
static int |
PAGES_PER_SHEET_DIRECTION_UP_LEFT
Deprecated.
Arranges the pages on a sheet from bottom to top and right to left.
|
static int |
PAGES_PER_SHEET_DIRECTION_UP_RIGHT
Deprecated.
Arranges the pages on a sheet from bottom to top and left to right.
|
static int |
PDF_SCRIPT_TRIGGER_EVENT_AFTER_PRINT
Deprecated.
This event is triggered after the PDF has been printed by the viewer application.
|
static int |
PDF_SCRIPT_TRIGGER_EVENT_AFTER_SAVE
Deprecated.
This event is triggered after the PDF has been saved by the viewer application.
|
static int |
PDF_SCRIPT_TRIGGER_EVENT_BEFORE_PRINT
Deprecated.
This event is triggered before the PDF is printed by the viewer application.
|
static int |
PDF_SCRIPT_TRIGGER_EVENT_BEFORE_SAVE
Deprecated.
This event is triggered before the PDF is saved by the viewer application.
|
static int |
PDF_SCRIPT_TRIGGER_EVENT_CLOSE
Deprecated.
This event is triggered when the PDF is closed by the viewer application.
|
static int |
PDF_SCRIPT_TRIGGER_EVENT_OPEN
Deprecated.
This event is triggered when the PDF is opened in the viewer application.
|
static int |
PROCESSING_PREFERENCES_SAVE_MEMORY_IMAGES
Deprecated.
Processing preferences flag for the memory saving mode for images.
|
static int |
SIGNING_MODE_SELF_SIGNED
Deprecated.
Signing mode for self-signed certificates.
|
static int |
SIGNING_MODE_VERISIGN_SIGNED
Deprecated.
Signing mode for VeriSign certificates.
|
static int |
SIGNING_MODE_WINCER_SIGNED
Deprecated.
Signing mode for Windows certificates.
|
static Version |
VERSION
Deprecated.
The version of PDFreactor.
|
static int |
VIEWER_PREFERENCES_CENTER_WINDOW
Deprecated.
Position the document's window in the center of the screen.
|
static int |
VIEWER_PREFERENCES_DIRECTION_L2R
Deprecated.
Position pages in ascending order from left to right.
|
static int |
VIEWER_PREFERENCES_DIRECTION_R2L
Deprecated.
Position pages in ascending order from right to left.
|
static int |
VIEWER_PREFERENCES_DISPLAY_DOC_TITLE
Deprecated.
Display the document's title in the top bar.
|
static int |
VIEWER_PREFERENCES_DUPLEX_FLIP_LONG_EDGE
Deprecated.
Print dialog default setting: duplex (long edge).
|
static int |
VIEWER_PREFERENCES_DUPLEX_FLIP_SHORT_EDGE
Deprecated.
Print dialog default setting: duplex (short edge).
|
static int |
VIEWER_PREFERENCES_DUPLEX_SIMPLEX
Deprecated.
Print dialog default setting: simplex.
|
static int |
VIEWER_PREFERENCES_FIT_WINDOW
Deprecated.
Resize the document's window to fit the size of the first displayed page.
|
static int |
VIEWER_PREFERENCES_HIDE_MENUBAR
Deprecated.
Hide the viewer application's menu bar when the document is active.
|
static int |
VIEWER_PREFERENCES_HIDE_TOOLBAR
Deprecated.
Hide the viewer application's tool bars when the document is active.
|
static int |
VIEWER_PREFERENCES_HIDE_WINDOW_UI
Deprecated.
Hide user interface elements in the document's window.
|
static int |
VIEWER_PREFERENCES_NON_FULLSCREEN_PAGE_MODE_USE_NONE
Deprecated.
Show no panel on exiting full-screen mode.
|
static int |
VIEWER_PREFERENCES_NON_FULLSCREEN_PAGE_MODE_USE_OC
Deprecated.
Show optional content group panel on exiting full-screen mode.
|
static int |
VIEWER_PREFERENCES_NON_FULLSCREEN_PAGE_MODE_USE_OUTLINES
Deprecated.
Show bookmarks panel on exiting full-screen mode.
|
static int |
VIEWER_PREFERENCES_NON_FULLSCREEN_PAGE_MODE_USE_THUMBS
Deprecated.
Show thumbnail images panel on exiting full-screen mode.
|
static int |
VIEWER_PREFERENCES_PAGE_LAYOUT_ONE_COLUMN
Deprecated.
Display the pages in one column.
|
static int |
VIEWER_PREFERENCES_PAGE_LAYOUT_SINGLE_PAGE
Deprecated.
Display one page at a time.
|
static int |
VIEWER_PREFERENCES_PAGE_LAYOUT_TWO_COLUMN_LEFT
Deprecated.
Display the pages in two columns, with odd numbered pages on the left.
|
static int |
VIEWER_PREFERENCES_PAGE_LAYOUT_TWO_COLUMN_RIGHT
Deprecated.
Display the pages in two columns, with odd numbered pages on the right.
|
static int |
VIEWER_PREFERENCES_PAGE_LAYOUT_TWO_PAGE_LEFT
Deprecated.
Display two pages at a time, with odd numbered pages on the left.
|
static int |
VIEWER_PREFERENCES_PAGE_LAYOUT_TWO_PAGE_RIGHT
Deprecated.
Display two pages at a time, with odd numbered pages on the right.
|
static int |
VIEWER_PREFERENCES_PAGE_MODE_FULLSCREEN
Deprecated.
Switch to fullscreen mode on startup.
|
static int |
VIEWER_PREFERENCES_PAGE_MODE_USE_ATTACHMENTS
Deprecated.
Show attachments panel on startup.
|
static int |
VIEWER_PREFERENCES_PAGE_MODE_USE_NONE
Deprecated.
Show no panel on startup.
|
static int |
VIEWER_PREFERENCES_PAGE_MODE_USE_OC
Deprecated.
Show optional content group panel on startup.
|
static int |
VIEWER_PREFERENCES_PAGE_MODE_USE_OUTLINES
Deprecated.
Show bookmarks panel on startup.
|
static int |
VIEWER_PREFERENCES_PAGE_MODE_USE_THUMBS
Deprecated.
Show thumbnail images panel on startup.
|
static int |
VIEWER_PREFERENCES_PICKTRAYBYPDFSIZE_FALSE
Deprecated.
Print dialog default setting: do not pick tray by PDF size.
|
static int |
VIEWER_PREFERENCES_PICKTRAYBYPDFSIZE_TRUE
Deprecated.
Print dialog default setting: pick tray by PDF size.
|
static int |
VIEWER_PREFERENCES_PRINTSCALING_APPDEFAULT
Deprecated.
Print dialog default setting: set scaling to application default value.
|
static int |
VIEWER_PREFERENCES_PRINTSCALING_NONE
Deprecated.
Print dialog default setting: disabled scaling.
|
static int |
XMP_PRIORITY_HIGH
Deprecated.
Embed XMP ignoring requirments of the output format.
|
static int |
XMP_PRIORITY_LOW
Deprecated.
Embed XMP if the output format does not have XMP requirements.
|
static int |
XMP_PRIORITY_NONE
Deprecated.
Do not embed XMP.
|
Constructor and Description |
---|
PDFreactor()
Deprecated.
Creates an instance of
PDFreactor . |
Modifier and Type | Method and Description |
---|---|
void |
addAttachment(byte[] data,
String url,
String name,
String description)
Deprecated.
Adds a file attachment to PDF document.
|
void |
addCustomDocumentProperty(String name,
String value)
Deprecated.
Adds a custom property to the PDF document.
|
void |
addCustomUrlStreamHandler(String protocol,
URLStreamHandler handler)
Deprecated.
Adds a
URLStreamHandler for the specified protocol
which will be used for all connections
to retrieve the input document and resources. |
void |
addFont(String source,
String family,
boolean bold,
boolean italic)
Deprecated.
Loads a font from a URL which can be used via the CSS property
font-family . |
void |
addFontAlias(String source,
String family,
boolean bold,
boolean italic)
Deprecated.
Registers an alias font family for an existing font.
|
void |
addFontDirectory(String fontDirectory)
Deprecated.
Registers an additional font directory to load fonts from.
|
void |
addIntegrationStyleSheet(InputSource inputSource)
Deprecated.
Adds a integration style sheet to the document.
|
void |
addIntegrationStyleSheet(String content,
String media,
String title,
String uri)
Deprecated.
Adds an integration style sheet to the document.
|
void |
addProgressEventListener(ProgressEventListener listener)
Deprecated.
Adds a
ProgressEventListener . |
void |
addUserScript(String content,
String uri,
boolean beforeDocumentScripts)
Deprecated.
Adds an user script to the document.
|
void |
addUserStyleSheet(byte[] bytes)
Deprecated.
|
void |
addUserStyleSheet(InputSource inputSource)
Deprecated.
Adds a user style sheet to the document.
|
void |
addUserStyleSheet(String content,
String media,
String title,
String uri)
Deprecated.
Adds a user style sheet to the document.
|
void |
addXSLTStyleSheet(String content,
String uri)
Deprecated.
Adds an XSLT style sheet to the document.
|
void |
enableDebugMode()
Deprecated.
Enables debug mode, which adds additional information to the output.
|
Connection[] |
getConnections()
Deprecated.
|
String |
getError()
Deprecated.
Returns the error messages generated during rendering.
|
ExceedingContent[] |
getExceedingContents()
Deprecated.
Provides information about content exceeding its page or parent.
|
String |
getJavaScriptExports()
Deprecated.
|
String |
getLog()
Deprecated.
Returns the log messages generated during rendering based on the log
level.
|
Logger |
getLogger()
Deprecated.
Returns the
Logger used by this PDFreactor . |
MissingResource[] |
getMissingResources()
Deprecated.
Provides information about content exceeding its page or parent.
|
int |
getNumberOfPages(boolean pdf)
Deprecated.
Returns the number of pages of the document after conversion.
|
void |
removeAllIntegrationStyleSheets()
Deprecated.
Removes all integration style sheets.
|
void |
removeAllUserScripts()
Deprecated.
Removes all user scripts.
|
void |
removeAllUserStyleSheets()
Deprecated.
Removes all user style sheets.
|
void |
removeAllXSLTStyleSheets()
Deprecated.
Removes all XSLT style sheets.
|
void |
removeProgressEventListener(ProgressEventListener listener)
Deprecated.
Removes a
ProgressEventListener . |
void |
renderDocument(InputSource inputSource,
OutputStream outputStream)
Deprecated.
Generates a PDF document from an
InputSource . |
byte[] |
renderDocumentFromByteArray(byte[] array)
Deprecated.
Generates a PDF document or an image from an HTML or XML document inside a byte-array.
|
byte[][] |
renderDocumentFromByteArrayAsArray(byte[] array)
Deprecated.
Generates an array of byte-arrays each containing an image representing
one page of the document from an HTML or XML document inside a byte-array.
|
byte[] |
renderDocumentFromContent(String content)
Deprecated.
Generates a PDF document or an image from an HTML or XML document inside a String.
|
byte[][] |
renderDocumentFromContentAsArray(String content)
Deprecated.
Generates an array of byte-arrays each containing an image representing
one page of the document from an HTML or XML document inside a String.
|
byte[] |
renderDocumentFromURL(String url)
Deprecated.
Generates a PDF document or an image from an HTML or XML document at a URL.
|
byte[][] |
renderDocumentFromURLAsArray(String url)
Deprecated.
Generates an array of byte-arrays each containing an image representing
one page of the document from an HTML or XML document at a URL.
|
void |
setAddAttachments(boolean value)
Deprecated.
Enables or disables attachments specified in style sheets.
|
void |
setAddBookmarks(boolean value)
Deprecated.
Enables or disables bookmarks in the PDF document.
|
void |
setAddComments(boolean value)
Deprecated.
Enables or disables comments in the PDF document.
|
void |
setAddLinks(boolean value)
Deprecated.
Enables or disables links in the PDF document.
|
void |
setAddOverprint(boolean value)
Deprecated.
Enables or disables overprinting.
|
void |
setAddPreviewImages(boolean value)
Deprecated.
Enables or disables embedding of image previews per page in the PDF
document.
|
void |
setAddTags(boolean value)
Deprecated.
Enables or disables tagging of the PDF document.
|
void |
setAllowAnnotations(boolean value)
Deprecated.
Enables or disables the 'annotations' restriction in the PDF
document.
|
void |
setAllowAssembly(boolean value)
Deprecated.
Enables or disables the 'assembly' restriction in the PDF
document.
|
void |
setAllowCopy(boolean value)
Deprecated.
Enables or disables the 'copy' restriction in the PDF document.
|
void |
setAllowDegradedPrinting(boolean value)
Deprecated.
Enables or disables the 'degraded printing' restriction in the PDF
document.
|
void |
setAllowFillIn(boolean value)
Deprecated.
Enables or disables the 'fill in' restriction in the PDF document.
|
void |
setAllowModifyContents(boolean value)
Deprecated.
Enables or disables the 'modify contents' restriction in the PDF
document.
|
void |
setAllowPrinting(boolean value)
Deprecated.
Enables or disables the 'printing' restriction in the PDF
document.
|
void |
setAllowScreenReaders(boolean value)
Deprecated.
Enables or disables the 'screen readers' restriction in the PDF
document.
|
void |
setAppendLog(boolean value)
Deprecated.
Specifies whether or not the log data should be added to the
PDF document.
|
void |
setAuthenticationCredentials(String username,
String password)
Deprecated.
Enables access to resources that are secured via Basic or Digest authentication.
|
void |
setAuthor(String value)
Deprecated.
Sets the value of the author field of the PDF document.
|
void |
setBaseURL(String value)
Deprecated.
Sets the base URL of the document.
|
void |
setBookletMode(String sheetSize,
String sheetMargin,
boolean rtl)
Deprecated.
Convenience method to set pages-per-sheet properties and page order
in one step to create a booklet.
|
void |
setCacheFonts(boolean value)
Deprecated.
Enables or disables caching of font information.
|
void |
setCleanupTool(int value)
Deprecated.
Sets the cleanup tool to use for documents with unparsable content.
|
void |
setConformance(int value)
Deprecated.
Sets the conformance of the PDF.
|
void |
setContentObserver(int logExceedingContentAnalyze,
int logExceedingContentAgainst,
boolean missingResources,
boolean connections)
Deprecated.
Specifies parts of the document's content that should be observed and logged in
greater detail.
|
void |
setContinuousOutput(int width,
int height)
Deprecated.
Enables the conversion of the input document into one image.
|
void |
setConversionName(String name)
Deprecated.
Sets a name for the conversion.
|
void |
setCookie(String key,
String value)
Deprecated.
Adds a cookie to all outgoing HTTP connections.
|
void |
setCreator(String value)
Deprecated.
Sets the value of creator field of the PDF document.
|
void |
setDefaultColorSpace(int value)
Deprecated.
Sets whether to convert color key words to CMYK instead of RGB.
|
void |
setDisableFontEmbedding(boolean disableFontEmbedding)
Deprecated.
Sets whether fonts will not be embedded into the resulting PDF.
|
void |
setDisableFontRegistration(boolean value)
Deprecated.
Enables or disables the font registration.
|
void |
setDisableSystemFonts(boolean value)
Deprecated.
Enables or disables the use of system fonts.
|
void |
setDocumentDefaultLanguage(String languageCode)
Deprecated.
Sets the language used for documents having no explicit language attribute set.
|
void |
setDocumentType(int value)
Deprecated.
Sets the document type.
|
void |
setEncoding(String value)
Deprecated.
Sets the encoding of the document.
|
void |
setEncryption(int value)
Deprecated.
Sets the encryption.
|
void |
setErrorPolicies(int[] errorPolicies)
Deprecated.
Specifies error policies that will be used for the conversion.
|
void |
setFontCachePath(String location)
Deprecated.
Sets the path of the font cache.
|
void |
setFontDirectory(String location)
Deprecated.
As of PDFreactor 6.0, replaced by
PDFreactor.addFontDirectory(String) |
void |
setFontFallback(String[] fontFallback)
Deprecated.
Sets a list of fallback font families used for character substitution.
|
void |
setForceGrayscaleImage(boolean forceGrayscale)
Deprecated.
If the output format is an image format, this setting controls whether a
grayscale image should be returned.
|
void |
setFullCompression(boolean value)
Deprecated.
Enables or disables full compression of the PDF document.
|
void |
setHTTPSMode(int value)
Deprecated.
Sets the HTTPS mode.
|
void |
setIgnoreAlpha(boolean value)
Deprecated.
Sets whether the alpha value of CSS RGBA colors is ignored.
|
void |
setJavaScriptMode(int value)
Deprecated.
Sets the JavaScript Mode.
|
void |
setKeywords(String value)
Deprecated.
Sets the value of the keywords field of the PDF document.
|
void |
setLicenseKey(String content)
Deprecated.
Sets the license key using a string.
|
void |
setLogExceedingContent(int logExceedingContentAnalyze,
int logExceedingContentAgainst)
Deprecated.
As of PDFreactor 9. Use
#setContentObserver(int, int) instead. |
void |
setLogger(Logger object)
Deprecated.
Sets a
Logger to receive log messages. |
void |
setLogLevel(int value)
Deprecated.
Sets the log level.
|
void |
setMediaFeatureValue(int mediaFeature,
String value)
Deprecated.
Defines the value of a Media Feature which is used to resolve CSS3 media queries.
|
void |
setMediaTypes(String[] mediaTypes)
Deprecated.
Sets the media types that are used to resolve CSS3 media queries.
|
void |
setMergeBeforePDF(boolean value)
Deprecated.
As of PDFreactor 5.0, replaced by
PDFreactor.setMergeMode(int) |
void |
setMergeByteArray(byte[] array)
Deprecated.
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 |
setMergeByteArrays(byte[][] arrays)
Deprecated.
This method sets an array of byte arrays that contain multiple external PDFs
which will be merged with the PDF document generated by the XML source.
|
void |
setMergeMode(int mode)
Deprecated.
Sets the merge mode.
|
void |
setMergeURL(String url)
Deprecated.
This method sets a URL of an external PDF document which will be
merged with the PDF document generated by the XML source.
|
void |
setMergeURLs(String[] urls)
Deprecated.
This method sets an array of URLs of external PDF documents which will be
merged with the PDF document generated by the XML source.
|
void |
setOutputFormat(int format,
int outputWidth,
int outputHeight)
Deprecated.
Sets the output format.
|
void |
setOutputIntent(String identifier,
byte[] profileData,
String profileUrl)
Deprecated.
Sets the output intent including the identifier and the ICC profile to be embedded into the PDF.
|
void |
setOutputIntentFromByteArray(String identifier,
byte[] profileData)
Deprecated.
Use
PDFreactor.setOutputIntent(String, byte[], String) instead. |
void |
setOutputIntentFromURL(String identifier,
String profileUrl)
Deprecated.
Use
PDFreactor.setOutputIntent(String, byte[], String) instead. |
void |
setOverlayRepeat(int value)
Deprecated.
If one of the documents of an overlay process is shorter than the other, this method
allows repeating either its last page or all of its pages in order to overlay all pages of
the longer document.
|
void |
setOwnerPassword(String value)
Deprecated.
Sets the owner password of the PDF document.
|
void |
setPageOrder(String order)
Deprecated.
Sets the page order of the direct result of the conversion.
|
void |
setPagesPerSheetProperties(int cols,
int rows,
String sheetSize,
String sheetMargin,
String spacing,
int direction)
Deprecated.
Sets the properties of a sheet on which multiple pages are being arranged.
|
void |
setPdfScriptAction(int triggerEvent,
String script)
Deprecated.
Sets a pair of trigger event and PDF script.
|
void |
setPixelsPerInch(int ppi)
Deprecated.
Sets the pixels per inch.
|
void |
setPixelsPerInchShrinkToFit(boolean pixelsPerInchShrinkToFit)
Deprecated.
Whether the pixels per inch should be adapted automatically to avoid content exceeding pages.
|
void |
setPostTransformationDocumentType(int value)
Deprecated.
Sets the document type after the XSL-Transformations have been applied.
|
void |
setPrintDialogPrompt(boolean value)
Deprecated.
Enables or disables a print dialog to be shown upon opening
the generated PDF document by a PDF viewer.
|
void |
setProcessingPreferences(int processingPreferences)
Deprecated.
Preferences that influence the conversion process without changing
the output
|
void |
setRawCookie(String key,
String value)
Deprecated.
Adds a cookie to all outgoing HTTP connections.
|
void |
setRequestHeader(String key,
String value)
Deprecated.
Adds a request header to all outgoing HTTP connections.
|
void |
setResourceRequestTimeout(int timeout)
Deprecated.
Sets a timeout in milliseconds for requests to resources, such as HTTP requests to
style sheets, images etc.
|
void |
setSecuritySettings(Configuration.SecuritySettings securitySettings)
Deprecated.
|
void |
setSignPDF(String keystoreURL,
String keyAlias,
String keystorePassword,
String keystoreType,
int signingMode)
Deprecated.
Sets a digital certificate to sign the newly created PDF.
|
void |
setSubject(String value)
Deprecated.
Sets the value of the subject field of the PDF document.
|
void |
setThrowLicenseExceptions(boolean throwLicenseExceptions)
Deprecated.
As of PDFreactor 9. Use
#setErrorPolicies(int) instead. |
void |
setTitle(String value)
Deprecated.
Sets the value of the title field of the PDF document.
|
void |
setUserPassword(String value)
Deprecated.
Sets the user password of the PDF document.
|
void |
setViewerPreferences(int viewerPreferences)
Deprecated.
Sets the page layout and page mode preferences of the PDF.
|
void |
setXmp(String content,
String uri,
int priority)
Deprecated.
Sets custom XMP to be embedded into the PDF document.
|
void |
setXSLTMode(boolean value)
Deprecated.
Enables or disables XSLT transformations.
|
public static final Version VERSION
The version of PDFreactor.
public static final int CLEANUP_NONE
Indicates that no cleanup will be performed when loading a document. If the loaded document is not well-formed, an exception will be thrown.
public static final int CLEANUP_JTIDY
Indicates that JTidy will be used to perform a cleanup when loading a non-well-formed document.
public static final int CLEANUP_CYBERNEKO
Indicates that the CyberNeko HTML parser will be used to perform a cleanup when loading a non-well-formed document.
public static final int CLEANUP_TAGSOUP
Indicates that tagsoup will be used to perform a cleanup when loading a non-well-formed document.
public static final int DOCTYPE_AUTODETECT
Indicates that the document type will be detected automatically.
A document has the type PDFreactor.DOCTYPE_HTML5
if the name of the root element
is "html" (ignoring case considerations). In all other cases the
document type is PDFreactor.DOCTYPE_XML
.
public static final int DOCTYPE_XML
Indicates that the document type will be set to generic XML. No default style sheet is used and the document is loaded as is without regards to style elements or attributes.
public static final int DOCTYPE_XHTML
Indicates that the document type will be set to XHTML. The HTML default style sheet is used and the document is loaded regarding style elements, style attributes and link stylesheets.
public static final int DOCTYPE_HTML5
Indicates that the document type will be set to HTML5. The HTML default style sheet is used and the document is loaded regarding style elements, style attributes and link stylesheets.
public static final int ENCRYPTION_NONE
Indicates that the document will not be encrypted. If encryption is disabled then no user password and no owner password can be used.
public static final int ENCRYPTION_40
Indicates that the document will be encrypted using RC4 40 bit encryption.
public static final int ENCRYPTION_128
Indicates that the document will be encrypted using RC4 128 bit encryption. For normal purposes this value should be used.
public static final String KEYSTORE_TYPE_PKCS12
Keystore type "pkcs12".
public static final String KEYSTORE_TYPE_JKS
Keystore type "jks".
public static final int SIGNING_MODE_SELF_SIGNED
Signing mode for self-signed certificates.
public static final int SIGNING_MODE_VERISIGN_SIGNED
Signing mode for VeriSign certificates.
public static final int SIGNING_MODE_WINCER_SIGNED
Signing mode for Windows certificates.
public static final int LOG_LEVEL_NONE
Indicates that no log events will be logged.
PDFreactor.setLogLevel(int)
,
Constant Field Valuespublic static final int LOG_LEVEL_FATAL
Indicates that only fatal log events will be logged.
PDFreactor.setLogLevel(int)
,
Constant Field Valuespublic static final int LOG_LEVEL_WARN
Indicates that warn and fatal log events will be logged.
PDFreactor.setLogLevel(int)
,
Constant Field Valuespublic static final int LOG_LEVEL_INFO
Indicates that info, warn and fatal log events will be logged.
PDFreactor.setLogLevel(int)
,
Constant Field Valuespublic static final int LOG_LEVEL_DEBUG
Indicates that debug, info, warn and fatal log events will be logged.
PDFreactor.setLogLevel(int)
,
Constant Field Valuespublic static final int LOG_LEVEL_PERFORMANCE
Indicates that all log events will be logged.
PDFreactor.setLogLevel(int)
,
Constant Field Valuespublic static final int JAVASCRIPT_MODE_DISABLED
Indicates that JavaScript is disabled.
public static final int JAVASCRIPT_MODE_ENABLED
Indicates that JavaScript is enabled.
public static final int JAVASCRIPT_MODE_ENABLED_NO_LAYOUT
Indicates that JavaScript is enabled, without access to layout data.
public static final int JAVASCRIPT_MODE_ENABLED_REAL_TIME
Indicates that JavaScript is enabled, without converter-specific optimizations to timeouts and intervals.
This mode is significantly more time consuming and should only be used when no other mode provides the expected results.
public static final int JAVASCRIPT_MODE_ENABLED_TIME_LAPSE
Indicates that JavaScript is enabled, with time stamps increasing more quickly.
This makes some kinds of JS based animations (e.g. when using jQuery)
finish immediately, which has the same effect as
PDFreactor.JAVASCRIPT_MODE_ENABLED_REAL_TIME
, but is significantly faster.
Only Date.getTime()
is affected by this.
public static final int PDF_SCRIPT_TRIGGER_EVENT_OPEN
This event is triggered when the PDF is opened in the viewer application.
public static final int PDF_SCRIPT_TRIGGER_EVENT_CLOSE
This event is triggered when the PDF is closed by the viewer application.
public static final int PDF_SCRIPT_TRIGGER_EVENT_BEFORE_SAVE
This event is triggered before the PDF is saved by the viewer application.
public static final int PDF_SCRIPT_TRIGGER_EVENT_AFTER_SAVE
This event is triggered after the PDF has been saved by the viewer application.
public static final int PDF_SCRIPT_TRIGGER_EVENT_BEFORE_PRINT
This event is triggered before the PDF is printed by the viewer application.
public static final int PDF_SCRIPT_TRIGGER_EVENT_AFTER_PRINT
This event is triggered after the PDF has been printed by the viewer application.
public static final int HTTPS_MODE_STRICT
Indicates strict HTTPS behavior. This matches the default behavior of Java.
public static final int HTTPS_MODE_LENIENT
Indicates lenient HTTPS behavior. This means that many certificate issues are ignored.
public static final String PAGE_ORDER_REVERSE
Page order mode to reverse the page order.
public static final String PAGE_ORDER_ODD
Page order mode to keep odd pages only.
public static final String PAGE_ORDER_EVEN
Page order mode to keep even pages only.
public static final String PAGE_ORDER_BOOKLET
Page order mode to arrange all pages in booklet order.
public static final String PAGE_ORDER_BOOKLET_RTL
Page order mode to arrange all pages in right-to-left booklet order.
public static final int PAGES_PER_SHEET_DIRECTION_RIGHT_DOWN
Arranges the pages on a sheet from left to right and top to bottom.
public static final int PAGES_PER_SHEET_DIRECTION_LEFT_DOWN
Arranges the pages on a sheet from right to left and top to bottom.
public static final int PAGES_PER_SHEET_DIRECTION_RIGHT_UP
Arranges the pages on a sheet from left to right and bottom to top.
public static final int PAGES_PER_SHEET_DIRECTION_LEFT_UP
Arranges the pages on a sheet from right to left and bottom to top.
public static final int PAGES_PER_SHEET_DIRECTION_DOWN_RIGHT
Arranges the pages on a sheet from top to bottom and left to right.
public static final int PAGES_PER_SHEET_DIRECTION_DOWN_LEFT
Arranges the pages on a sheet from top to bottom and right to left.
public static final int PAGES_PER_SHEET_DIRECTION_UP_RIGHT
Arranges the pages on a sheet from bottom to top and left to right.
public static final int PAGES_PER_SHEET_DIRECTION_UP_LEFT
Arranges the pages on a sheet from bottom to top and right to left.
public static final int MERGE_MODE_APPEND
Default merge mode: Append converted document to existing PDF.
public static final int MERGE_MODE_PREPEND
Alternate merge mode: Prepend converted document to existing PDF.
public static final int MERGE_MODE_OVERLAY
Alternate merge mode (overlay): Adding converted document above the existing PDF.
public static final int MERGE_MODE_OVERLAY_BELOW
Alternate merge mode (overlay): Adding converted document below the existing PDF.
public static final int MERGE_MODE_ARRANGE
Advanced merge mode: Allows to insert specific pages from existing PDFs into the converted document.
This is done via a special syntax of PDFreactor.setPageOrder(String)
.
public static final int OVERLAY_REPEAT_NONE
No pages of the shorter document are repeated, leaving some pages of the longer document without overlay.
public static final int OVERLAY_REPEAT_LAST_PAGE
Last page of the shorter document is repeated, to overlay all pages of the longer document.
public static final int OVERLAY_REPEAT_ALL_PAGES
All pages of the shorter document are repeated, to overlay all pages of the longer document.
public static final int OVERLAY_REPEAT_TRIM
The resulting PDF is trimmed to the number of pages of the shorter document.
public static final int VIEWER_PREFERENCES_PAGE_LAYOUT_SINGLE_PAGE
Display one page at a time. (default)
public static final int VIEWER_PREFERENCES_PAGE_LAYOUT_ONE_COLUMN
Display the pages in one column.
public static final int VIEWER_PREFERENCES_PAGE_LAYOUT_TWO_COLUMN_LEFT
Display the pages in two columns, with odd numbered pages on the left.
public static final int VIEWER_PREFERENCES_PAGE_LAYOUT_TWO_COLUMN_RIGHT
Display the pages in two columns, with odd numbered pages on the right.
public static final int VIEWER_PREFERENCES_PAGE_LAYOUT_TWO_PAGE_LEFT
Display two pages at a time, with odd numbered pages on the left.
public static final int VIEWER_PREFERENCES_PAGE_LAYOUT_TWO_PAGE_RIGHT
Display two pages at a time, with odd numbered pages on the right.
public static final int VIEWER_PREFERENCES_PAGE_MODE_USE_NONE
Show no panel on startup.
public static final int VIEWER_PREFERENCES_PAGE_MODE_USE_OUTLINES
Show bookmarks panel on startup.
public static final int VIEWER_PREFERENCES_PAGE_MODE_USE_THUMBS
Show thumbnail images panel on startup.
public static final int VIEWER_PREFERENCES_PAGE_MODE_FULLSCREEN
Switch to fullscreen mode on startup.
public static final int VIEWER_PREFERENCES_PAGE_MODE_USE_OC
Show optional content group panel on startup.
public static final int VIEWER_PREFERENCES_PAGE_MODE_USE_ATTACHMENTS
Show attachments panel on startup.
public static final int VIEWER_PREFERENCES_HIDE_TOOLBAR
Hide the viewer application's tool bars when the document is active.
public static final int VIEWER_PREFERENCES_HIDE_MENUBAR
Hide the viewer application's menu bar when the document is active.
public static final int VIEWER_PREFERENCES_HIDE_WINDOW_UI
Hide user interface elements in the document's window.
public static final int VIEWER_PREFERENCES_FIT_WINDOW
Resize the document's window to fit the size of the first displayed page.
public static final int VIEWER_PREFERENCES_CENTER_WINDOW
Position the document's window in the center of the screen.
public static final int VIEWER_PREFERENCES_DISPLAY_DOC_TITLE
Display the document's title in the top bar.
public static final int VIEWER_PREFERENCES_NON_FULLSCREEN_PAGE_MODE_USE_NONE
Show no panel on exiting full-screen mode. Has to be combined with PDFreactor.VIEWER_PREFERENCES_PAGE_MODE_FULLSCREEN
.
public static final int VIEWER_PREFERENCES_NON_FULLSCREEN_PAGE_MODE_USE_OUTLINES
Show bookmarks panel on exiting full-screen mode. Has to be combined with PDFreactor.VIEWER_PREFERENCES_PAGE_MODE_FULLSCREEN
.
public static final int VIEWER_PREFERENCES_NON_FULLSCREEN_PAGE_MODE_USE_THUMBS
Show thumbnail images panel on exiting full-screen mode. Has to be combined with PDFreactor.VIEWER_PREFERENCES_PAGE_MODE_FULLSCREEN
.
public static final int VIEWER_PREFERENCES_NON_FULLSCREEN_PAGE_MODE_USE_OC
Show optional content group panel on exiting full-screen mode. Has to be combined with PDFreactor.VIEWER_PREFERENCES_PAGE_MODE_FULLSCREEN
.
public static final int VIEWER_PREFERENCES_DIRECTION_L2R
Position pages in ascending order from left to right.
public static final int VIEWER_PREFERENCES_DIRECTION_R2L
Position pages in ascending order from right to left.
public static final int VIEWER_PREFERENCES_PRINTSCALING_NONE
Print dialog default setting: disabled scaling.
public static final int VIEWER_PREFERENCES_PRINTSCALING_APPDEFAULT
Print dialog default setting: set scaling to application default value.
public static final int VIEWER_PREFERENCES_DUPLEX_SIMPLEX
Print dialog default setting: simplex.
public static final int VIEWER_PREFERENCES_DUPLEX_FLIP_SHORT_EDGE
Print dialog default setting: duplex (short edge).
public static final int VIEWER_PREFERENCES_DUPLEX_FLIP_LONG_EDGE
Print dialog default setting: duplex (long edge).
public static final int VIEWER_PREFERENCES_PICKTRAYBYPDFSIZE_FALSE
Print dialog default setting: do not pick tray by PDF size.
public static final int VIEWER_PREFERENCES_PICKTRAYBYPDFSIZE_TRUE
Print dialog default setting: pick tray by PDF size.
public static final int PROCESSING_PREFERENCES_SAVE_MEMORY_IMAGES
Processing preferences flag for the memory saving mode for images.
public static final int COLOR_SPACE_RGB
The color space RGB.
public static final int COLOR_SPACE_CMYK
The color space CMYK.
public static final int XMP_PRIORITY_NONE
Do not embed XMP.
public static final int XMP_PRIORITY_LOW
Embed XMP if the output format does not have XMP requirements.
public static final int XMP_PRIORITY_HIGH
Embed XMP ignoring requirments of the output format. This may cause output PDFs to not archive a specified conformance.
public static final int EXCEEDING_CONTENT_ANALYZE_NONE
Do not log exceeding content.
#setContentObserver(int, int)
,
Constant Field Valuespublic static final int EXCEEDING_CONTENT_ANALYZE_CONTENT
Log exceeding content.
#setContentObserver(int, int)
,
Constant Field Valuespublic static final int EXCEEDING_CONTENT_ANALYZE_CONTENT_AND_STATIC_BOXES
Log exceeding content and boxes without absolute positioning.
#setContentObserver(int, int)
,
Constant Field Valuespublic static final int EXCEEDING_CONTENT_ANALYZE_CONTENT_AND_BOXES
Log exceeding content and all boxes.
#setContentObserver(int, int)
,
Constant Field Valuespublic static final int EXCEEDING_CONTENT_AGAINST_NONE
Do not log exceeding content.
#setContentObserver(int, int)
,
Constant Field Valuespublic static final int EXCEEDING_CONTENT_AGAINST_PAGE_BORDERS
Log content exceeding the edges of its page.
#setContentObserver(int, int)
,
Constant Field Valuespublic static final int EXCEEDING_CONTENT_AGAINST_PAGE_CONTENT
Log content exceeding its page content area (overlaps the page margin).
#setContentObserver(int, int)
,
Constant Field Valuespublic static final int EXCEEDING_CONTENT_AGAINST_PARENT
Log content exceeding its container.
#setContentObserver(int, int)
,
Constant Field Valuespublic static final int CONFORMANCE_PDF
PDF with no additional restrictions (default).
public static final int CONFORMANCE_PDFA1A
PDF/A-1a (ISO 19005-1:2005 Level A).
public static final int CONFORMANCE_PDFA3A
PDF/A-3a (ISO 19005-3:2012 Level A).
public static final int CONFORMANCE_PDFA2A
PDF/A-2a (ISO 19005-2:2011 Level A).
public static final int CONFORMANCE_PDFA1B
PDF/A-1b (ISO 19005-1:2005 Level B).
public static final int CONFORMANCE_PDFA3B
PDF/A-3b (ISO 19005-3:2012 Level B).
public static final int CONFORMANCE_PDFA2B
PDF/A-2b (ISO 19005-2:2011 Level B).
public static final int CONFORMANCE_PDFA3U
PDF/A-3u (ISO 19005-3:2012 Level U).
public static final int CONFORMANCE_PDFA2U
PDF/A-2u (ISO 19005-2:2011 Level U).
public static final int CONFORMANCE_PDFX1A_2001
PDF/X-1a:2001 (ISO 15930-1:2001).
public static final int CONFORMANCE_PDFX3_2002
PDF/X-3:2002 (ISO 15930-3:2002).
public static final int CONFORMANCE_PDFX1A_2003
PDF/X-1a:2003 (ISO 15930-4:2003).
public static final int CONFORMANCE_PDFX3_2003
PDF/X-3:2003 (ISO 15930-6:2003).
public static final int CONFORMANCE_PDFX4
PDF/X-4 (ISO 15930-7:2008).
public static final int CONFORMANCE_PDFX4P
PDF/X-4p (ISO 15930-7:2008).
public static final int CONFORMANCE_PDFUA1
PDF/UA-1 (ISO 14289-1:2014).
public static final int CONFORMANCE_PDFA1A_PDFUA1
PDF/A-1a + PDF/UA-1 (ISO 19005-1:2005 Level A + ISO 14289-1:2014).
public static final int CONFORMANCE_PDFA2A_PDFUA1
PDF/A-2a + PDF/UA-1 (ISO 19005-2:2011 Level A + ISO 14289-1:2014).
public static final int CONFORMANCE_PDFA3A_PDFUA1
PDF/A-3a + PDF/UA-1 (ISO 19005-3:2012 Level A + ISO 14289-1:2014).
@Deprecated public static final int CONFORMANCE_PDFA
PDFreactor.CONFORMANCE_PDFA1A
.public static final int OUTPUT_FORMAT_PDF
PDF output format<./p>
public static final int OUTPUT_FORMAT_JPEG
JPEG output format.
public static final int OUTPUT_FORMAT_PNG
PNG output format (using Java Image I/O).
public static final int OUTPUT_FORMAT_PNG_TRANSPARENT
Transparent PNG output format (using Java Image I/O).
public static final int OUTPUT_FORMAT_BMP
BMP output format.
public static final int OUTPUT_FORMAT_GIF
GIF output format.
public static final int OUTPUT_FORMAT_PNG_AI
PNG output format (using Apache Imaging).
public static final int OUTPUT_FORMAT_PNG_TRANSPARENT_AI
Transparent PNG output format (using Apache Imaging).
public static final int OUTPUT_FORMAT_TIFF_LZW
LZW compressed TIFF output format.
public static final int OUTPUT_FORMAT_TIFF_PACKBITS
PackBits compressed TIFF output format.
public static final int OUTPUT_FORMAT_TIFF_UNCOMPRESSED
Uncompressed TIFF output format.
public static final int OUTPUT_FORMAT_TIFF_CCITT_1D
Monochrome CCITT 1D compressed TIFF output format.
public static final int OUTPUT_FORMAT_TIFF_CCITT_GROUP_3
Monochrome CCITT Group 3 compressed TIFF output format.
public static final int OUTPUT_FORMAT_TIFF_CCITT_GROUP_4
Monochrome CCITT Group 4 compressed TIFF output format.
public static final int MEDIA_FEATURE_WIDTH
CSS 3 Media Feature width of page content.
The default width is that of a DIN A4 page with 1cm margin (190mm).
public static final int MEDIA_FEATURE_HEIGHT
CSS 3 Media Feature height of page content.
The default height is that of a DIN A4 page with 1cm margin (277mm).
public static final int MEDIA_FEATURE_DEVICE_WIDTH
CSS 3 Media Feature describing the width of the page.
The default width is that of a DIN A4 page (210mm).
public static final int MEDIA_FEATURE_DEVICE_HEIGHT
CSS 3 Media Feature describing the height of the page.
The default height is that of a DIN A4 page (297mm).
public static final int MEDIA_FEATURE_ORIENTATION
CSS 3 Media Feature describing the page orientation.
By default, this value is computed using the values of PDFreactor.MEDIA_FEATURE_WIDTH
and PDFreactor.MEDIA_FEATURE_HEIGHT
. Setting a specific value does override
the computed value.
Valid values are "portrait" or "landscape"
public static final int MEDIA_FEATURE_ASPECT_RATIO
CSS 3 Media Feature describing the aspect ratio of the page content.
By default, this value is computed using the values of PDFreactor.MEDIA_FEATURE_WIDTH
and
PDFreactor.MEDIA_FEATURE_HEIGHT
. Setting a specific value does override the computed
value.
public static final int MEDIA_FEATURE_DEVICE_ASPECT_RATIO
CSS 3 Media Feature describing the aspect ratio of the page.
By default, this value is computed using the values of PDFreactor.MEDIA_FEATURE_DEVICE_WIDTH
and PDFreactor.MEDIA_FEATURE_DEVICE_HEIGHT
. Setting a specific value does override
the computed value.
public static final int MEDIA_FEATURE_COLOR
CSS 3 Media Feature describing the number of bits per color component.
Default value is 8.
public static final int MEDIA_FEATURE_COLOR_INDEX
CSS 3 Media Feature describing the number of entries in the color lookup table.
Default value is 0, as there is no color lookup table.
public static final int MEDIA_FEATURE_MONOCHROME
CSS 3 Media Feature describing the number of bits per pixel in a monochrome frame buffer.
Default value is 0, as the device is not monochrome.
public static final int MEDIA_FEATURE_RESOLUTION
CSS 3 Media Feature describing the resolution of the output device.
This also defines the value of the window.devicePixelRatio
property available from JavaScript.
Default value is 2dppx.
public static final int MEDIA_FEATURE_GRID
CSS 3 Media Feature defining whether the output is grid-based.
Default value 0, as PDFs are not grid-based.
public static final String OUTPUT_INTENT_DEFAULT_PROFILE_FOGRA39
"Coated FOGRA39" output intent default profile.
public static final String OUTPUT_INTENT_DEFAULT_PROFILE_GRACOL
"Coated GRACoL 2006" output intent default profile.
public static final String OUTPUT_INTENT_DEFAULT_PROFILE_IFRA
"ISO News print 26% (IFRA)" output intent default profile.
public static final String OUTPUT_INTENT_DEFAULT_PROFILE_JAPAN
"Japan Color 2001 Coated" output intent default profile.
public static final String OUTPUT_INTENT_DEFAULT_PROFILE_JAPAN_UNCOATED
"Japan Color 2001 Uncoated" output intent default profile.
public static final String OUTPUT_INTENT_DEFAULT_PROFILE_JAPAN_NEWSPAPER
"Japan Color 2001 Newspaper" output intent default profile.
public static final String OUTPUT_INTENT_DEFAULT_PROFILE_JAPAN_WEB
"Japan Web Coated (Ad)" output intent default profile.
public static final String OUTPUT_INTENT_DEFAULT_PROFILE_SWOP
"US Web Coated (SWOP) v2" output intent default profile.
public static final String OUTPUT_INTENT_DEFAULT_PROFILE_SWOP_3
"Web Coated SWOP 2006 Grade 3 Paper" output intent default profile.
public static final int ERROR_POLICY_LICENSE
Whether an exception should be thrown when no legal full license key is set. This allows to programmatically ensure that documents are not altered due to license issues.
The default value is false
.
public static final int ERROR_POLICY_MISSING_RESOURCE
Whether an exception should be thrown when resources could not be loaded.
public PDFreactor()
Creates an instance of PDFreactor
.
public void setLicenseKey(String content)
Sets the license key using a string. If the license key is set
to 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 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.addFontDirectory(String)
public void setDisableSystemFonts(boolean value)
Enables or disables the use of system fonts. If system fonts are disabled, PDFreactor will neither scan for system fonts nor use the respective font cache.
The default value is false
.
value
- The new value of the system font registration setting.PDFreactor.setDisableFontRegistration(boolean)
,
PDFreactor.addFontDirectory(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
PDFreactor.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.addFontDirectory(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.addFontDirectory(String)
@Deprecated public void setFontDirectory(String location)
PDFreactor.addFontDirectory(String)
PDFreactor.addFontDirectory(String)
public void addFontDirectory(String fontDirectory)
Registers an additional font directory to load fonts from.
Fonts from subdirectories are also loaded.
fontDirectory
- The path of the font directory.public void addFont(String source, String family, boolean bold, boolean italic)
Loads a font from a URL which can be used via the CSS property font-family
.
source
- The URL to load the font from.family
- The font family name the loaded font will be labeled as.bold
- Whether the font will be labeled bold.italic
- Whether the font will be labeled italic.public void addFontAlias(String source, String family, boolean bold, boolean italic)
Registers an alias font family for an existing font.
This function is limited to fonts loaded automatically from system folders.
source
- The name of an existing font family.family
- The alias name for that font.bold
- Whether the alias will be labeled bold.italic
- Whether the alias will be labeled italic.public void setLogLevel(int value)
Sets the log level.
Use one of the LOG_LEVEL_
constants to specify the log
level.
The default value is PDFreactor.LOG_LEVEL_NONE
.
value
- The new log level setting.PDFreactor.LOG_LEVEL_NONE
,
PDFreactor.LOG_LEVEL_FATAL
,
PDFreactor.LOG_LEVEL_WARN
,
PDFreactor.LOG_LEVEL_INFO
,
PDFreactor.LOG_LEVEL_DEBUG
,
PDFreactor.LOG_LEVEL_PERFORMANCE
,
PDFreactor.getLog()
@Deprecated public void setLogExceedingContent(int logExceedingContentAnalyze, int logExceedingContentAgainst)
#setContentObserver(int, int)
instead.exceedingContentAnalyze
- Enables logging of exceeding content
and optionally of boxes.exceedingContentAgainst
- Enables logging of exceeding content
either against the page edges, page
content areas or containers.public void setContentObserver(int logExceedingContentAnalyze, int logExceedingContentAgainst, boolean missingResources, boolean connections)
Specifies parts of the document's content that should be observed and logged in greater detail. Data logged this way can be programmatically retrieved after the conversion has finished. The following can be observed:
Content exceeding boundary containers.
Use EXCEEDING_CONTENT_ANALYZE_
constants to specify
which kind of content should be observed for exceeding content logging.
The default value is PDFreactor.EXCEEDING_CONTENT_ANALYZE_NONE
.
Use EXCEEDING_CONTENT_AGAINST_
constants to specify
that exceeding this content starts exceeding content logging.
The default value is PDFreactor.EXCEEDING_CONTENT_AGAINST_NONE
.
exceedingContentAnalyze
- Enables observation of exceeding content
and optionally of boxes.exceedingContentAgainst
- Enables observation of exceeding content
either against the page edges, page
content areas or containers.missingResources
- Enables observation of resources that could not be loaded.connections
- Enables observation of URL connections done by PDFreactor.PDFreactor.EXCEEDING_CONTENT_ANALYZE_NONE
,
PDFreactor.EXCEEDING_CONTENT_ANALYZE_CONTENT
,
PDFreactor.EXCEEDING_CONTENT_ANALYZE_CONTENT_AND_BOXES
,
PDFreactor.EXCEEDING_CONTENT_ANALYZE_CONTENT_AND_STATIC_BOXES
,
PDFreactor.EXCEEDING_CONTENT_AGAINST_NONE
,
PDFreactor.EXCEEDING_CONTENT_AGAINST_PARENT
,
PDFreactor.EXCEEDING_CONTENT_AGAINST_PAGE_CONTENT
,
PDFreactor.EXCEEDING_CONTENT_AGAINST_PAGE_BORDERS
@Deprecated public void setThrowLicenseExceptions(boolean throwLicenseExceptions)
#setErrorPolicies(int)
instead.public void setErrorPolicies(int[] errorPolicies)
Specifies error policies that will be used for the conversion. Depending on the policy, the conversion will fail if the appropriate criteria are not met.
errorPolicies
- The error policies.PDFreactor.ERROR_POLICY_LICENSE
,
PDFreactor.ERROR_POLICY_MISSING_RESOURCE
public void setBaseURL(String value)
Sets the base URL of the 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.
The CLEANUP_
constants can be used as value. The
default value specified is PDFreactor.CLEANUP_CYBERNEKO
.
The cleanup tool is only used for PDFreactor.DOCTYPE_XHTML
.
HTML5 utilizes an internal cleanup.
value
- The new cleanup tool.PDFreactor.CLEANUP_NONE
,
PDFreactor.CLEANUP_JTIDY
,
PDFreactor.CLEANUP_CYBERNEKO
,
PDFreactor.CLEANUP_TAGSOUP
public void setJavaScriptMode(int value)
Sets the JavaScript Mode.
The default value specified is PDFreactor.JAVASCRIPT_MODE_DISABLED
.
javaScriptMode
- The JavaScript mode.PDFreactor.JAVASCRIPT_MODE_ENABLED
,
PDFreactor.JAVASCRIPT_MODE_DISABLED
public void setHTTPSMode(int value)
Sets the HTTPS mode. In closed environment lenient can be the preferred setting to avoid HTTPS issues that are not security critical
The default value specified is PDFreactor.HTTPS_MODE_STRICT
.
httpsMode
- The HTTPS Mode.PDFreactor.HTTPS_MODE_STRICT
,
PDFreactor.HTTPS_MODE_LENIENT
public void setResourceRequestTimeout(int timeout)
Sets a timeout in milliseconds for requests to resources, such as HTTP requests to style sheets, images etc. If the server does not respond until the timeout, the request will be aborted and the resource will not be loaded.
A timeout of 0 means that the request will not time out. A negative value means that no timeout will be set. The default value is 60000 (1min).
timeout
- The timeout in milliseconds.PDFreactor.addCustomUrlStreamHandler(String, URLStreamHandler)
public void setDocumentType(int value)
Sets the document type.
The DOCTYPE_
constants can be used to specify the
document type. The default value specified is
PDFreactor.DOCTYPE_AUTODETECT
.
value
- The new document type setting.PDFreactor.DOCTYPE_AUTODETECT
,
PDFreactor.DOCTYPE_XML
,
PDFreactor.DOCTYPE_XHTML
,
PDFreactor.DOCTYPE_HTML5
public void setPostTransformationDocumentType(int value)
Sets the document type after the XSL-Transformations have been applied.
The DOCTYPE_
constants can be used to specify the
document type. The default value specified is
PDFreactor.DOCTYPE_AUTODETECT
.
value
- The new document type setting.PDFreactor.DOCTYPE_AUTODETECT
,
PDFreactor.DOCTYPE_XML
,
PDFreactor.DOCTYPE_XHTML
,
PDFreactor.DOCTYPE_HTML5
,
PDFreactor.setDocumentType(int)
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 InputSource
of the style sheet.IOException
- If the style sheet could not be loaded.PDFreactor.addUserStyleSheet(String,String,String,String)
,
PDFreactor.removeAllUserStyleSheets()
public void addUserStyleSheet(byte[] bytes)
public void addIntegrationStyleSheet(InputSource inputSource) throws IOException
Adds a integration style sheet to the document.
The specified input source will be loaded and then added.
inputSource
- The InputSource
of the style sheet.IOException
- If the style sheet could not be loaded.PDFreactor.addIntegrationStyleSheet(String,String,String,String)
,
PDFreactor.removeAllIntegrationStyleSheets()
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 addIntegrationStyleSheet(String content, String media, String title, String uri)
Adds an integration 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.addIntegrationStyleSheet(InputSource)
,
PDFreactor.removeAllIntegrationStyleSheets()
public void removeAllUserStyleSheets()
Removes all user style sheets.
public void removeAllIntegrationStyleSheets()
Removes all integration style sheets.
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.
public void addUserScript(String content, String uri, boolean beforeDocumentScripts)
Adds an user script to the document.
There are two ways to specify the script:
content
- The content of the script.uri
- The URI of the script.beforeDocumentScripts
- Use true
to cause PDFreactor to run the
script before all scripts inside the document and false
to run it after.PDFreactor.removeAllUserScripts()
public void removeAllUserScripts()
Removes all user scripts.
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 addCustomDocumentProperty(String name, String value)
Adds a custom property to the PDF document. An existing property of the same name will be replaced.
name
- The name of the propertyvalue
- The value of the propertypublic void addAttachment(byte[] data, String url, String name, String description)
Adds a file attachment to PDF document.
data
- The binary content of the attachment. May be null
.url
- If data
is null
, the attachment will be retrieved from this URL
.
If this is "#" the input document URL is used instead.name
- The file name associated with the attachment. It is recommended to specify
the correct file extension. If this is null
the name is derived from the URL
.description
- The description of the attachment. If this is null
the name
is used.public void setXmp(String content, String uri, int priority)
Sets custom XMP to be embedded into the PDF document.
If bothcontent
and URI
are set to null
no custom XMP is embedded.
If priority
is also set to PDFreactor.XMP_PRIORITY_HIGH
automatic generation of required XMP is also suppressed.
This may cause output PDFs to not archive a specified conformance.content
- XMP, as an XML string, to be embedded into the PDF document.uri
- URI to XMP to be embedded into the PDF document, if content
is null
.priority
- Priority of this XMP over XMP generated automatically for the conformance
requirements of certain output formats.PDFreactor.XMP_PRIORITY_NONE
,
PDFreactor.XMP_PRIORITY_LOW
,
PDFreactor.XMP_PRIORITY_HIGH
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 ENCRYPTION_
constants to specify the
encryption. The default value is PDFreactor.ENCRYPTION_NONE
.
value
- The new encryption setting.PDFreactor.ENCRYPTION_NONE
,
PDFreactor.ENCRYPTION_40
,
PDFreactor.ENCRYPTION_128
,
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 is false
.
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
.
value
- Use true
to enable tagging of the document
and false
to disable tagging.public void setAddComments(boolean value)
Enables or disables comments in the PDF document.
The default value is false
.
value
- Use true
to enable comments in the document
and false
to disable comments.public void setAddPreviewImages(boolean value)
Enables or disables embedding of image previews per page in the PDF document.
The default value is false
.
value
- Use true
to enable embedding of image previews
per page in the document and false
to disable embedding of
image previews per page.public void setAddAttachments(boolean value)
Enables or disables attachments specified in style sheets.
The default value is false
.
value
- Whether to enable CSS based attachments.public void setAddOverprint(boolean value)
Enables or disables overprinting.
The default value is false
.
value
- Whether to enable overprinting.public void setPrintDialogPrompt(boolean value)
Enables or disables a print dialog to be shown upon opening the generated PDF document by a PDF viewer.
The default value is false
.
value
- Use true
to enable a print dialog to be shown
upon document opening by a PDF viewer
and false
to disable the print dialog prompt.public void setPdfScriptAction(int triggerEvent, String script)
Sets a pair of trigger event and PDF script. The script is triggered on the specified event.
A PDF script is JavaScript that is executed by a PDF viewer (e.g. Adobe Reader). Note that most viewers do not support this feature.
PDF Scripts can also be set by using the proprietary CSS property
pdf-script-action
. More information on this property can be found
in the manual.
Please note, that scripts set via CSS have a higher priority. If two scripts are registered on the same event, but one via API and the other via the CSS property, the script set in the CSS will override the other one.
triggerEvent
- The event on which the script is executed.
Value is a PDF_SCRIPT_TRIGGER_EVENT_
constant.script
- The script source that should be executed.PDFreactor.PDF_SCRIPT_TRIGGER_EVENT_OPEN
,
PDFreactor.PDF_SCRIPT_TRIGGER_EVENT_CLOSE
,
PDFreactor.PDF_SCRIPT_TRIGGER_EVENT_BEFORE_SAVE
,
PDFreactor.PDF_SCRIPT_TRIGGER_EVENT_AFTER_SAVE
,
PDFreactor.PDF_SCRIPT_TRIGGER_EVENT_BEFORE_PRINT
,
PDFreactor.PDF_SCRIPT_TRIGGER_EVENT_AFTER_PRINT
public void setAppendLog(boolean value)
Specifies whether or not the log data should be added to the PDF document.
The default value is false
.
value
- Use true
to add the log data to the document
and false
if the log data should not be added.public void setAllowAnnotations(boolean value)
Enables or disables the 'annotations' restriction in the PDF document.
The default value is false
.
value
- Use true
to enable 'annotations' in the document
and false
to disable 'annotations'.PDFreactor.setEncryption(int)
public void setAllowAssembly(boolean value)
Enables or disables the 'assembly' restriction in the PDF document.
The default value is false
.
value
- Use true
to enable 'assembly' in the document
and false
to disable 'assembly'.PDFreactor.setEncryption(int)
public void setAllowCopy(boolean value)
Enables or disables the 'copy' restriction in the PDF document.
The default value is false
.
value
- Use true
to enable 'copy' in the document
and false
to disable 'copy'.PDFreactor.setEncryption(int)
public void setAllowDegradedPrinting(boolean value)
Enables or disables the 'degraded printing' restriction in the PDF document.
The default value is false
.
value
- Use true
to enable 'degraded printing' in
the document and false
to disable 'degraded printing'.PDFreactor.setEncryption(int)
public void setAllowFillIn(boolean value)
Enables or disables the 'fill in' restriction in the PDF document.
The default value is false
.
value
- Use true
to enable 'fill in' in the document
and false
to disable 'fill in'.PDFreactor.setEncryption(int)
public void setAllowModifyContents(boolean value)
Enables or disables the 'modify contents' restriction in the PDF document.
The default value is false
.
value
- Use true
to enable 'modify contents' in the
document and false
to disable 'modify contents'.PDFreactor.setEncryption(int)
public void setAllowPrinting(boolean value)
Enables or disables the 'printing' restriction in the PDF document.
The default value is false
.
value
- Use true
to enable 'printing' in the document
and false
to disable 'printing'.PDFreactor.setEncryption(int)
public void setAllowScreenReaders(boolean value)
Enables or disables the 'screen readers' restriction in the PDF document.
The default value is false
.
value
- Use true
to enable 'screen readers' in the
document and false
to disable 'screen readers'.PDFreactor.setEncryption(int)
public void setDisableFontEmbedding(boolean disableFontEmbedding)
Sets whether fonts will not be embedded into the resulting PDF. Setting this to true will reduce the file size of the output document. However, the resulting PDF documents are no longer guaranteed to look identical on all systems.
The default value is false
.
public void setFontFallback(String[] fontFallback)
Sets a list of fallback font families used for character substitution. This
list is iterated for characters that can not be displayed with any of the fonts
specified via the CSS property font-family
.
fontFallback
- an array of font family namespublic void setPixelsPerInch(int ppi)
Sets the pixels per inch.
Changing this value changes the physical length of sizes specified in px (including those specified via HTML attributes).
The default value is 96ppi
.
ppi
- The pixels per inch.public void setPixelsPerInchShrinkToFit(boolean pixelsPerInchShrinkToFit)
Whether the pixels per inch should be adapted automatically to avoid content exceeding pages.
public void setMergeMode(int mode)
Sets the merge mode.
The following merge methods can be used:
PDFreactor.MERGE_MODE_APPEND
)PDFreactor.MERGE_MODE_PREPEND
)PDFreactor.MERGE_MODE_OVERLAY
)PDFreactor.MERGE_MODE_OVERLAY_BELOW
)The default value is PDFreactor.MERGE_MODE_APPEND
.
mode
- The merge mode.PDFreactor.MERGE_MODE_APPEND
,
PDFreactor.MERGE_MODE_PREPEND
,
PDFreactor.MERGE_MODE_OVERLAY
,
PDFreactor.MERGE_MODE_OVERLAY_BELOW
public 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.
public void setMergeURLs(String[] urls)
This method sets an array of URLs of external PDF documents which will be merged with the PDF document generated by the XML source.
public 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.
public void setMergeByteArrays(byte[][] arrays)
This method sets an array of byte arrays that contain multiple external PDFs which will be merged with the PDF document generated by the XML source.
@Deprecated public final void setMergeBeforePDF(boolean value)
PDFreactor.setMergeMode(int)
PDFreactor.setMergeMode(int)
public void setOverlayRepeat(int value)
If one of the documents of an overlay process is shorter than the other, this method allows repeating either its last page or all of its pages in order to overlay all pages of the longer document.
Use one of the OBERLAY_REPEAT_
constants to specify the
overlay repeat. The default value is PDFreactor.OVERLAY_REPEAT_NONE
.
public void setPageOrder(String order)
Sets the page order of the direct result of the conversion.
If PDFreactor.setMergeMode(int)
is set to PDFreactor.MERGE_MODE_ARRANGE
,
this method is also used to specify the position of inserted pages from
an existing PDF.
A description of the syntax can be found in the manual.
order
- A comma-separated list of page numbers and ranges is
intended as parameter. Alternatively, PAGE_ORDER_
constants can be used.PDFreactor.PAGE_ORDER_EVEN
,
PDFreactor.PAGE_ORDER_ODD
,
PDFreactor.PAGE_ORDER_BOOKLET
,
PDFreactor.PAGE_ORDER_BOOKLET_RTL
public void setPagesPerSheetProperties(int cols, int rows, String sheetSize, String sheetMargin, String spacing, int direction)
Sets the properties of a sheet on which multiple pages are being arranged.
If cols
or rows
is less than 1, no
pages-per-sheet processing is done. This is the case by default.
Use one of the PAGES_PER_SHEET_DIRECTION_
constants to
specify the the direction. The default value is PDFreactor.PAGES_PER_SHEET_DIRECTION_RIGHT_DOWN
.
cols
- The number of columns per sheet.rows
- The number of rows per sheet.sheetSize
- The sheet size as CSS size, e.g. A4
, letter landscape
, 15in 20in
,
20cm 30cm
.sheetMargin
- The sheet margin as CSS margin, e.g. 1in
, 1cm 1.5cm
, 10mm 20mm 10mm 30mm
. null
is
interpreted as 0mm
.spacing
- The horizontal and vertical space between pages on a sheet as CSS value, e.g. 0.1in
, 5mm 2mm
. null
is
interpreted as 0mm
.direction
- The direction in which the pages are ordered on a sheet.PDFreactor.PAGES_PER_SHEET_DIRECTION_DOWN_LEFT
,
PDFreactor.PAGES_PER_SHEET_DIRECTION_DOWN_RIGHT
,
PDFreactor.PAGES_PER_SHEET_DIRECTION_LEFT_DOWN
,
PDFreactor.PAGES_PER_SHEET_DIRECTION_LEFT_UP
,
PDFreactor.PAGES_PER_SHEET_DIRECTION_RIGHT_DOWN
,
PDFreactor.PAGES_PER_SHEET_DIRECTION_RIGHT_UP
,
PDFreactor.PAGES_PER_SHEET_DIRECTION_UP_LEFT
,
PDFreactor.PAGES_PER_SHEET_DIRECTION_UP_RIGHT
public void setBookletMode(String sheetSize, String sheetMargin, boolean rtl)
Convenience method to set pages-per-sheet properties and page order in one step to create a booklet.
sheetSize
- The size of the sheet as CSS value, e.g. A3
,
letter landscape
, 15in 20in
,
20cm 30cm
.sheetMargin
- The sheet margin as CSS margin value, e.g.
1in
, 1cm 1.5cm
, 10mm
20mm 10mm 30mm
.
null
is interpreted as 0mm
.rtl
- Whether or not the reading order of the booklet should be
right-to-left.public void setViewerPreferences(int viewerPreferences)
Sets the page layout and page mode preferences of the PDF.
Use the VIEWER_PREFERENCES_
constants to specify the
viewer preferences. By default no viewer preference is set.
viewerPreferences
- A value of ORed VIEWER_PREFERENCES_
constants.PDFreactor.VIEWER_PREFERENCES_CENTER_WINDOW
,
PDFreactor.VIEWER_PREFERENCES_DIRECTION_L2R
,
PDFreactor.VIEWER_PREFERENCES_DIRECTION_R2L
,
PDFreactor.VIEWER_PREFERENCES_DISPLAY_DOC_TITLE
,
PDFreactor.VIEWER_PREFERENCES_DUPLEX_FLIP_LONG_EDGE
,
PDFreactor.VIEWER_PREFERENCES_DUPLEX_FLIP_SHORT_EDGE
,
PDFreactor.VIEWER_PREFERENCES_DUPLEX_SIMPLEX
,
PDFreactor.VIEWER_PREFERENCES_FIT_WINDOW
,
PDFreactor.VIEWER_PREFERENCES_HIDE_MENUBAR
,
PDFreactor.VIEWER_PREFERENCES_HIDE_TOOLBAR
,
PDFreactor.VIEWER_PREFERENCES_HIDE_WINDOW_UI
,
PDFreactor.VIEWER_PREFERENCES_NON_FULLSCREEN_PAGE_MODE_USE_NONE
,
PDFreactor.VIEWER_PREFERENCES_NON_FULLSCREEN_PAGE_MODE_USE_OC
,
PDFreactor.VIEWER_PREFERENCES_NON_FULLSCREEN_PAGE_MODE_USE_OUTLINES
,
PDFreactor.VIEWER_PREFERENCES_NON_FULLSCREEN_PAGE_MODE_USE_THUMBS
,
PDFreactor.VIEWER_PREFERENCES_PAGE_LAYOUT_ONE_COLUMN
,
PDFreactor.VIEWER_PREFERENCES_PAGE_LAYOUT_SINGLE_PAGE
,
PDFreactor.VIEWER_PREFERENCES_PAGE_LAYOUT_TWO_COLUMN_LEFT
,
PDFreactor.VIEWER_PREFERENCES_PAGE_LAYOUT_TWO_COLUMN_RIGHT
,
PDFreactor.VIEWER_PREFERENCES_PAGE_LAYOUT_TWO_PAGE_LEFT
,
PDFreactor.VIEWER_PREFERENCES_PAGE_LAYOUT_TWO_PAGE_RIGHT
,
PDFreactor.VIEWER_PREFERENCES_PAGE_MODE_FULLSCREEN
,
PDFreactor.VIEWER_PREFERENCES_PAGE_MODE_USE_NONE
,
PDFreactor.VIEWER_PREFERENCES_PAGE_MODE_USE_OC
,
PDFreactor.VIEWER_PREFERENCES_PAGE_MODE_USE_OUTLINES
,
PDFreactor.VIEWER_PREFERENCES_PAGE_MODE_USE_THUMBS
,
PDFreactor.VIEWER_PREFERENCES_PICKTRAYBYPDFSIZE_FALSE
,
PDFreactor.VIEWER_PREFERENCES_PICKTRAYBYPDFSIZE_TRUE
,
PDFreactor.VIEWER_PREFERENCES_PRINTSCALING_APPDEFAULT
,
PDFreactor.VIEWER_PREFERENCES_PRINTSCALING_NONE
public void setConformance(int value)
Sets the conformance of the PDF.
The CONFORMANCE_
constants can be used as value. The default
value specified is PDFreactor.CONFORMANCE_PDF
.
conformance
- Any of the conformance constants.PDFreactor.CONFORMANCE_PDF
,
PDFreactor.CONFORMANCE_PDFA1A
,
PDFreactor.CONFORMANCE_PDFA3A
,
PDFreactor.CONFORMANCE_PDFA2A
,
PDFreactor.CONFORMANCE_PDFA1B
,
PDFreactor.CONFORMANCE_PDFA3B
,
PDFreactor.CONFORMANCE_PDFA2B
,
PDFreactor.CONFORMANCE_PDFA3U
,
PDFreactor.CONFORMANCE_PDFA2U
,
PDFreactor.CONFORMANCE_PDFX1A_2001
,
PDFreactor.CONFORMANCE_PDFX3_2002
,
PDFreactor.CONFORMANCE_PDFX1A_2003
,
PDFreactor.CONFORMANCE_PDFX3_2003
,
PDFreactor.CONFORMANCE_PDFX4
,
PDFreactor.CONFORMANCE_PDFX4P
,
PDFreactor.CONFORMANCE_PDFUA1
,
PDFreactor.CONFORMANCE_PDFA1A_PDFUA1
,
PDFreactor.CONFORMANCE_PDFA2A_PDFUA1
,
PDFreactor.CONFORMANCE_PDFA3A_PDFUA1
public void setDefaultColorSpace(int value)
Sets whether to convert color key words to CMYK instead of RGB.
The COLOR_SPACE_
constants can be used as value.
The default value specified is PDFreactor.COLOR_SPACE_RGB
.
defaultColorSpace
- the default color space of the PDFPDFreactor.COLOR_SPACE_CMYK
,
PDFreactor.COLOR_SPACE_RGB
public void setOutputIntentFromURL(String identifier, String profileUrl)
PDFreactor.setOutputIntent(String, byte[], String)
instead.public void setOutputIntentFromByteArray(String identifier, byte[] profileData)
PDFreactor.setOutputIntent(String, byte[], String)
instead.public void setOutputIntent(String identifier, byte[] profileData, String profileUrl)
Sets the output intent including the identifier and the ICC profile to be embedded into the PDF.
Set either the profile URL or the profile data, not both. Certain PDF/X formats require neither, just a known identifier.
identifier
- The identifierprofileData
- The profile dataprofileUrl
- The profile URLpublic void setIgnoreAlpha(boolean value)
Sets whether the alpha value of CSS RGBA colors is ignored.
This can be used to avoid conformance issues in PDF/A-1.
public void setProcessingPreferences(int processingPreferences)
Preferences that influence the conversion process without changing the output
Use the PROCESSING_PREFERENCES_
constants to specify the
processing preferences. By default no processing preference is set.
processingPreferences
- A value of ORed processing preferences flags.PDFreactor.PROCESSING_PREFERENCES_SAVE_MEMORY_IMAGES
public void setAuthenticationCredentials(String username, String password)
Enables access to resources that are secured via Basic or Digest authentication.
username
- The user name for the secured realm.password
- The password for the secured realm.public void setRequestHeader(String key, String value)
Adds a request header to all outgoing HTTP connections. If the key already exists, the pair is overwritten.
key
- The key of the header.value
- The value of the header.public void setCookie(String key, String value)
Adds a cookie to all outgoing HTTP connections.
The parameters are URL encoded (see PDFreactor.setRawCookie(String, String)
).
If the key already exists, the pair is overwritten.
key
- The key of the cookie.value
- The value of the cookie.PDFreactor.setRawCookie(String, String)
public void setRawCookie(String key, String value)
Adds a cookie to all outgoing HTTP connections.
The parameters are not URL encoded (see PDFreactor.setCookie(String, String)
).
If the key already exists, the pair is overwritten.
key
- The key of the cookie.value
- The value of the cookie.PDFreactor.setCookie(String, String)
public void setSignPDF(String keystoreURL, String keyAlias, String keystorePassword, String keystoreType, int signingMode)
Sets a digital certificate to sign the newly created PDF.
Requires a keystore file. The included certificate may be self-signed.
Use the KEYSTORE_TYPE_
constants to specify the keystore type.
Use the SIGNING_MODE_
constants to specify the signing mode.
keystoreURL
- The URL to the keystore file.keyAlias
- The alias of the certificate included in the keystore to be used to sign the PDF.keystorePassword
- The password of the keystore.keystoreType
- The format of the keystore, i.e. pkcs12
or jks
.
Use one of the KEYSTORE_TYPE_
constants as value.signingMode
- The mode that is used to sign the PDF, i.e. self-signed
,
Windows certificate
or VeriSign
.
Use one of the SIGNING_MODE_
constants as value.PDFreactor.KEYSTORE_TYPE_JKS
,
PDFreactor.KEYSTORE_TYPE_PKCS12
,
PDFreactor.SIGNING_MODE_SELF_SIGNED
,
PDFreactor.SIGNING_MODE_VERISIGN_SIGNED
,
PDFreactor.SIGNING_MODE_WINCER_SIGNED
public void setOutputFormat(int format, int outputWidth, int outputHeight)
Sets the output format. The default value is PDF
.
For image formats the width or height in pixels must be specified.
When either dimension is <1 it is computed based on the other dimension and the aspect ratio of the input document.
format
- the output format. See OUTPUT_FORMAT_
constantsoutputWidth
- The with of the output in pixels (image formats only). Values <1 will be computed based on the specified height and the aspect ratio of the input document.outputHeight
- The height of the output in pixels (image formats only). Values <1 will be computed based on the specified width and the aspect ratio of the input document.PDFreactor.OUTPUT_FORMAT_PDF
,
PDFreactor.OUTPUT_FORMAT_JPEG
,
PDFreactor.OUTPUT_FORMAT_PNG
,
PDFreactor.OUTPUT_FORMAT_PNG_TRANSPARENT
,
PDFreactor.OUTPUT_FORMAT_BMP
,
PDFreactor.OUTPUT_FORMAT_GIF
,
PDFreactor.OUTPUT_FORMAT_PNG_AI
,
PDFreactor.OUTPUT_FORMAT_PNG_TRANSPARENT_AI
,
PDFreactor.OUTPUT_FORMAT_TIFF_LZW
,
PDFreactor.OUTPUT_FORMAT_TIFF_PACKBITS
,
PDFreactor.OUTPUT_FORMAT_TIFF_UNCOMPRESSED
,
PDFreactor.OUTPUT_FORMAT_TIFF_CCITT_1D
,
PDFreactor.OUTPUT_FORMAT_TIFF_CCITT_GROUP_3
,
PDFreactor.OUTPUT_FORMAT_TIFF_CCITT_GROUP_4
public void setContinuousOutput(int width, int height)
Enables the conversion of the input document into one image.
width
- Equivalent to the width of a browser window (view port). Values <1 enable paginated output.height
- Equivalent to the height of a browser window (view port). For values <1 the entire height of the document is used.public void setForceGrayscaleImage(boolean forceGrayscale)
If the output format is an image format, this setting controls whether a grayscale image should be returned. This can not be combined with transparency.
forceGrayscale
- Whether the output image should be grayscale.public void setMediaFeatureValue(int mediaFeature, String value)
Defines the value of a Media Feature which is used to resolve CSS3 media queries.
mediaFeature
- The media feature.value
- The value that is associated with the given media feature.PDFreactor.MEDIA_FEATURE_WIDTH
,
PDFreactor.MEDIA_FEATURE_HEIGHT
,
PDFreactor.MEDIA_FEATURE_DEVICE_WIDTH
,
PDFreactor.MEDIA_FEATURE_DEVICE_HEIGHT
,
PDFreactor.MEDIA_FEATURE_ORIENTATION
,
PDFreactor.MEDIA_FEATURE_ASPECT_RATIO
,
PDFreactor.MEDIA_FEATURE_DEVICE_ASPECT_RATIO
,
PDFreactor.MEDIA_FEATURE_COLOR
,
PDFreactor.MEDIA_FEATURE_COLOR_INDEX
,
PDFreactor.MEDIA_FEATURE_MONOCHROME
,
PDFreactor.MEDIA_FEATURE_RESOLUTION
,
PDFreactor.MEDIA_FEATURE_GRID
public void setMediaTypes(String[] mediaTypes)
Sets the media types that are used to resolve CSS3 media queries.
Please note that this overrides the default media types of PDFreactor, which are:
print, paged, visual, bitmap, static, -ro-pdfreactor
mediaTypes
- An array of media type stringspublic void setSecuritySettings(Configuration.SecuritySettings securitySettings)
public void enableDebugMode()
Enables debug mode, which adds additional information to the output.
public void setConversionName(String name)
Sets a name for the conversion. If a name is set, it will be logged at level "info". The name can be an arbitrary string but should be unique for every conversion or application so that the log output can be matched to a specific conversion or application later.
name
- The name for the conversionpublic void renderDocument(InputSource inputSource, OutputStream outputStream) throws SAXException, IOException, TransformerException
Generates a PDF document from an InputSource
.
The resulting PDF document will be written into an OutputStream
.
inputSource
- The InputSource
of the XML document.outputStream
- The OutputStream
where the PDF RAW data will be
written into.TransformerException
com.realobjects.pdfreactor.Exceptions.PDFreactorException
IOException
SAXException
PDFreactor.renderDocumentFromURL(String)
,
PDFreactor.renderDocumentFromByteArray(byte[])
,
PDFreactor.renderDocumentFromContent(String)
public byte[] renderDocumentFromURL(String url) throws SAXException, IOException, TransformerException
Generates a PDF document or an image from an HTML or XML document at a URL.
url
- A URL pointing to the input document.com.realobjects.pdfreactor.Exceptions.PDFreactorException
IOException
SAXException
TransformerException
PDFreactor.renderDocumentFromByteArray(byte[])
,
PDFreactor.renderDocumentFromContent(String)
,
PDFreactor.renderDocumentFromURLAsArray(String)
public byte[][] renderDocumentFromURLAsArray(String url) throws SAXException, IOException, TransformerException
Generates an array of byte-arrays each containing an image representing one page of the document from an HTML or XML document at a URL.
url
- A URL pointing to the input document.com.realobjects.pdfreactor.Exceptions.PDFreactorException
IOException
SAXException
TransformerException
PDFreactor.renderDocumentFromByteArrayAsArray(byte[])
,
PDFreactor.renderDocumentFromContentAsArray(String)
,
PDFreactor.renderDocumentFromURL(String)
public byte[] renderDocumentFromByteArray(byte[] array) throws SAXException, IOException, TransformerException
Generates a PDF document or an image from an HTML or XML document inside a byte-array.
array
- An array containing the content of the HTML or XML document.com.realobjects.pdfreactor.Exceptions.PDFreactorException
IOException
SAXException
TransformerException
PDFreactor.renderDocumentFromURL(String)
,
PDFreactor.renderDocumentFromContent(String)
,
PDFreactor.renderDocumentFromByteArrayAsArray(byte[])
public byte[][] renderDocumentFromByteArrayAsArray(byte[] array) throws SAXException, IOException, TransformerException
Generates an array of byte-arrays each containing an image representing one page of the document from an HTML or XML document inside a byte-array.
array
- An array containing the content of the HTML or XML document.com.realobjects.pdfreactor.Exceptions.PDFreactorException
IOException
SAXException
TransformerException
PDFreactor.renderDocumentFromURLAsArray(String)
,
PDFreactor.renderDocumentFromContentAsArray(String)
,
PDFreactor.renderDocumentFromByteArray(byte[])
public byte[] renderDocumentFromContent(String content) throws SAXException, IOException, TransformerException
Generates a PDF document or an image from an HTML or XML document inside a String.
content
- A String containing the content of the HTML or XML document.com.realobjects.pdfreactor.Exceptions.PDFreactorException
IOException
SAXException
TransformerException
PDFreactor.renderDocumentFromByteArray(byte[])
,
PDFreactor.renderDocumentFromURL(String)
,
PDFreactor.renderDocumentFromContentAsArray(String)
public byte[][] renderDocumentFromContentAsArray(String content) throws SAXException, IOException, TransformerException
Generates an array of byte-arrays each containing an image representing one page of the document from an HTML or XML document inside a String.
array
- An String containing the content of the HTML or XML document.com.realobjects.pdfreactor.Exceptions.PDFreactorException
IOException
SAXException
TransformerException
PDFreactor.renderDocumentFromByteArrayAsArray(byte[])
,
PDFreactor.renderDocumentFromURLAsArray(String)
,
PDFreactor.renderDocumentFromContent(String)
public void addProgressEventListener(ProgressEventListener listener)
Adds a ProgressEventListener
.
listener
- The ProgressEventListener
to add.PDFreactor.removeProgressEventListener(ProgressEventListener)
public void removeProgressEventListener(ProgressEventListener listener)
Removes a ProgressEventListener
.
listener
- The ProgressEventListener
to remove.PDFreactor.addProgressEventListener(ProgressEventListener)
public void setLogger(Logger object)
Sets a Logger
to receive log messages.
The default value is null
.
object
- The Logger
to use.PDFreactor.getLogger()
public Logger getLogger()
Returns the Logger
used by this PDFreactor
.
Logger
.PDFreactor.setLogger(Logger)
public String getError()
Returns the error messages generated during rendering.
String
.public String getLog()
Returns the log messages generated during rendering based on the log level.
String
.PDFreactor.setLogLevel(int)
public ExceedingContent[] getExceedingContents()
Provides information about content exceeding its page or parent. Depends on the mode set via #setContentObserver(int, int)
.
ExceedingContent
objects
or null
if the logging of exceeding content was not enabled, no content exceeded its page or parent
or no conversion was run, yet.public MissingResource[] getMissingResources()
Provides information about content exceeding its page or parent.
Depends on the mode set via #setContentObserver(int, int, boolean)
.
MissingResource
objects or null
if the logging of missing
resources was not enabled, no resources were missing or no conversion was run, yet.public Connection[] getConnections()
public int getNumberOfPages(boolean pdf)
Returns the number of pages of the document after conversion.
The result returned by this method will only be correct if the document has already been laid out by one of the render methods.
pdf
- If true
, returns the number of pages of the
resulting PDF (including, e.g., merge operations), otherwise
it will return the number pages of the laid out input document.public String getJavaScriptExports()
public void addCustomUrlStreamHandler(String protocol, URLStreamHandler handler)
Adds a URLStreamHandler
for the specified protocol
which will be used for all connections
to retrieve the input document and resources.
protocol
- The protocol, e.g. "http" or "https". If the protocol is "" (empty string),
the handler will be used for URLs with any protocol if no handler with a
matching explicit protocol is found.handler
- The handler.This doc was generated on 2020-09-17. Copyright © 2002-2020 RealObjects GmbH. All Rights Reserved.