This is the PDFreactor 7.0 Perl API

RealObjects(R) PDFreactor(R) is a powerful formatting processor for converting HTML and XML documents into PDF.

The simplest sample for the PDFreactor Perl API:

#!/usr/bin/perl -w
use PDFreactor;
my $pdfReactor = PDFreactor -> new();
$result = $pdfReactor -> renderDocumentFromURL("http://www.pdfreactor.com");
print "Content-type: application/pdf\n\n";
print $result;


Class Constants

CLEANUP_NONE

Indicates that no cleanup will be performed when loading document. If the loaded document is not well-formed, an exception will be thrown.

see setCleanupTool()

CLEANUP_JTIDY

Indicates that JTidy will be used to perform a cleanup when loading a non-well-formed document.

see setCleanupTool()

CLEANUP_CYBERNEKO

Indicates that the CyberNeko HTML parser will be used to perform a cleanup when loading a document.

see setCleanupTool()

CLEANUP_TAGSOUP

Indicates that the TagSoup HTML parser will be used to perform a cleanup when loading a document.

see setCleanupTool()

CLEANUP_DEFAULT

The default cleanup setting. It is set to CLEANUP_CYBERNEKO.

see setCleanupTool()


DOCTYPE_AUTODETECT

Indicates that the document type will be detected automatically. A document has the type "HTML" if the name of the root element is "html" (ignoring case considerations).

In all other cases the document type is "XML".

see setDocumentType()

see DOCTYPE_XML

see DOCTYPE_XHTML

see DOCTYPE_HTML5

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.

see setDocumentType()

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.

see setDocumentType()

DOCTYPE_HTML5

Indicates that the document type will be set to HTML5. The HTML5 parser is used for this document. The HTML default style sheet is used and the document is loaded regarding style elements, style attributes and link stylesheets.

see setDocumentType()

DOCTYPE_DEFAULT

The default document type setting.

It is set to DOCTYPE_AUTODETECT.

DOCUMENT_DEFAULT_LANGUAGE_DEFAULT

Indicates the Default language used for a document if no other language is set in the document itself.


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.

see setEncryption()

ENCRYPTION_40

Indicates that the document will be encrypted using 40 bit encryption.

see setEncryption()

ENCRYPTION_128

Indicates that the document will be encrypted using 128 bit encryption.

For normal purposes this value should be used.

see setEncryption()

ENCRYPTION_DEFAULT

The default encryption setting.

It is set to ENCRYPTION_NONE.

see setEncryption()

KEYSTORE_TYPE_PKCS12

Keystore type "pkcs12"

see setSignPDF()

KEYSTORE_TYPE_JKS

Keystore type "jks"

see setSignPDF()

SIGNING_MODE_SELF_SIGNED

Signing mode for self-signed certificates

see setSignPDF()

SIGNING_MODE_VERISIGN_SIGNED

Signing mode for VeriSign certificates

see setSignPDF()

SIGNING_MODE_WINCER_SIGNED

Signing mode for Windows certificates

see setSignPDF()


LOG_LEVEL_NONE

Indicates that no log events will be logged.

see setLogLevel()

LOG_LEVEL_FATAL

Indicates that only fatal log events will be logged.

see setLogLevel()

LOG_LEVEL_WARN

Indicates that warn and fatal log events will be logged.

see setLogLevel()

LOG_LEVEL_INFO

Indicates that info, warn and fatal log events will be logged.

see setLogLevel()

LOG_LEVEL_DEBUG

Indicates that debug, info, warn and fatal log events will be logged.

see setLogLevel()

LOG_LEVEL_PERFORMANCE

Indicates that all log events will be logged.

see setLogLevel()

LOG_LEVEL_DEFAULT

The default log level setting.

It is set to LOG_LEVEL_NONE.

see setLogLevel()


VIEWER_PREFERENCES_PAGE_LAYOUT_SINGLE_PAGE

Display one page at a time. (default)

see setViewerPreferences()

VIEWER_PREFERENCES_PAGE_LAYOUT_ONE_COLUMN

Display the pages in one column.

see setViewerPreferences()

VIEWER_PREFERENCES_PAGE_LAYOUT_TWO_COLUMN_LEFT

Display the pages in two columns, with odd numbered pages on the left.

see setViewerPreferences()

VIEWER_PREFERENCES_PAGE_LAYOUT_TWO_COLUMN_RIGHT

Display the pages in two columns, with odd numbered pages on the right.

see setViewerPreferences()

VIEWER_PREFERENCES_PAGE_LAYOUT_TWO_PAGE_LEFT

Display two pages at a time, with odd numbered pages on the left.

see setViewerPreferences()

VIEWER_PREFERENCES_PAGE_LAYOUT_TWO_PAGE_RIGHT

Display two pages at a time, with odd numbered pages on the right.

see setViewerPreferences()

VIEWER_PREFERENCES_PAGE_MODE_USE_NONE

Show no panel on startup.

see setViewerPreferences()

VIEWER_PREFERENCES_PAGE_MODE_USE_OUTLINES

Show document outline panel on startup.

see setViewerPreferences()

VIEWER_PREFERENCES_PAGE_MODE_USE_THUMBS

Show thumbnail images panel on startup.

see setViewerPreferences()

VIEWER_PREFERENCES_PAGE_MODE_FULLSCREEN

Switch to fullscreen mode on startup.

see setViewerPreferences()

VIEWER_PREFERENCES_PAGE_MODE_USE_OC

Show optional content group panel on startup.

see setViewerPreferences()

VIEWER_PREFERENCES_PAGE_MODE_USE_ATTACHMENTS

Show attachments panel on startup.

see setViewerPreferences()

VIEWER_PREFERENCES_HIDE_TOOLBAR

Hide the viewer application's tool bars when the document is active.

see setViewerPreferences()

VIEWER_PREFERENCES_HIDE_MENUBAR

Hide the viewer application's menu bar when the document is active.

see setViewerPreferences()

VIEWER_PREFERENCES_HIDE_WINDOW_UI

Hide user interface elements in the document's window.

see setViewerPreferences()

VIEWER_PREFERENCES_FIT_WINDOW

Resize the document's window to fit the size of the first displayed page

see setViewerPreferences()

VIEWER_PREFERENCES_CENTER_WINDOW

Position the document's window in the center of the screen.

see setViewerPreferences()

VIEWER_PREFERENCES_DISPLAY_DOC_TITLE

Display the document's title in the top bar.

see setViewerPreferences()

VIEWER_PREFERENCES_NON_FULLSCREEN_PAGE_MODE_USE_NONE

Show document outline panel on exiting full-screen mode.

Has to be combined with VIEWER_PREFERENCES_PAGE_MODE_FULLSCREEN.

see setViewerPreferences()

VIEWER_PREFERENCES_NON_FULLSCREEN_PAGE_MODE_USE_OUTLINES

Show thumbnail images panel on exiting full-screen mode.

Has to be combined with VIEWER_PREFERENCES_PAGE_MODE_FULLSCREEN.

see setViewerPreferences()

VIEWER_PREFERENCES_NON_FULLSCREEN_PAGE_MODE_USE_THUMBS

Show optional content group panel on exiting full-screen mode.

Has to be combined with VIEWER_PREFERENCES_PAGE_MODE_FULLSCREEN.

see setViewerPreferences()

VIEWER_PREFERENCES_NON_FULLSCREEN_PAGE_MODE_USE_OC

Show attachments panel on exiting full-screen mode.

Has to be combined with VIEWER_PREFERENCES_PAGE_MODE_FULLSCREEN.

see setViewerPreferences()

VIEWER_PREFERENCES_DIRECTION_L2R

Position pages in ascending order from left to right.

see setViewerPreferences()

VIEWER_PREFERENCES_DIRECTION_R2L

Position pages in ascending order from right to left.

see setViewerPreferences()

VIEWER_PREFERENCES_PRINTSCALING_NONE

Print dialog default setting: disabled scaling.

see setViewerPreferences()

VIEWER_PREFERENCES_PRINTSCALING_APPDEFAULT

Print dialog default setting: set scaling to application default value.

see setViewerPreferences()

VIEWER_PREFERENCES_DUPLEX_SIMPLEX

Print dialog default setting: simplex

see setViewerPreferences()

VIEWER_PREFERENCES_DUPLEX_FLIP_SHORT_EDGE

Print dialog default setting: duplex (short edge)

see setViewerPreferences()

VIEWER_PREFERENCES_DUPLEX_FLIP_LONG_EDGE

Print dialog default setting: duplex (long edge).

see setViewerPreferences()

VIEWER_PREFERENCES_PICKTRAYBYPDFSIZE_FALSE

Print dialog default setting: do not pick tray by PDF size.

see setViewerPreferences()

VIEWER_PREFERENCES_PICKTRAYBYPDFSIZE_TRUE

Print dialog default setting: pick tray by PDF size.

see setViewerPreferences()

COLOR_SPACE_RGB

The color space RGB

COLOR_SPACE_CMYK

The color space CMYK

CONFORMANCE_PDF

PDF with no additional restrictions (default)

see setConformance()

CONFORMANCE_PDFA1A

PDF/A-1a (ISO 19005-1 Level A)

see setConformance()

CONFORMANCE_PDFA3A

PDF/A-3a (ISO 19005-3 Level A)

see setConformance()

CONFORMANCE_PDFA

deprecated As of PDFreactor 7.0, replaced by CONFORMANCE_PDFA1A

see setConformance()

CONFORMANCE_DEFAULT

The default value of the conformance property which is CONFORMANCE_PDF.

see setConformance()

PROCESSING_PREFERENCES_SAVE_MEMORY_IMAGES

Processing preferences flag for the memory saving mode for images

see setProcessingPreferences()

MERGE_MODE_APPEND

Default merge mode: Append converted document to existing PDF

see setMergeMode()

MERGE_MODE_PREPEND

Alternate merge mode: Prepend converted document to existing PDF

see setMergeMode()

MERGE_MODE_OVERLAY

Alternate merge mode (overlay): Adding new content above the existing PDF.

see setMergeMode()

MERGE_MODE_OVERLAY_BELOW

Alternate merge mode (overlay): Adding new content below the existing PDF.

see setMergeMode()

OVERLAY_REPEAT_NONE

No pages of the shorter document are repeated, leaving some pages of the longer document without overlay.

see setOverlayRepeat()

OVERLAY_REPEAT_LAST_PAGE

Last page of the shorter document is repeated, to overlay all pages of the longer document.

see setOverlayRepeat()

OVERLAY_REPEAT_ALL_PAGES

All pages of the shorter document are repeated, to overlay all pages of the longer document.

see setOverlayRepeat()

PAGE_ORDER_REVERSE

Page order mode to reverse the page order.

see setPageOrder()

PAGE_ORDER_ODD

Page order mode to keep odd pages only.

see setPageOrder()

PAGE_ORDER_EVEN

Page order mode to keep even pages only.

see setPageOrder()

PAGE_ORDER_BOOKLET

Page order mode to arrange all pages in booklet order.

see setPageOrder()

PAGE_ORDER_BOOKLET_RTL

Page order mode to arrange all pages in right-to-left booklet order.

see setPageOrder()

PAGES_PER_SHEET_DIRECTION_RIGHT_DOWN

Arranges the pages on a sheet from left to right and top to bottom.

see setPagesPerSheetProperties()

PAGES_PER_SHEET_DIRECTION_LEFT_DOWN

Arranges the pages on a sheet from right to left and top to bottom.

see setPagesPerSheetProperties()

PAGES_PER_SHEET_DIRECTION_RIGHT_UP

Arranges the pages on a sheet from left to right and bottom to top.

see setPagesPerSheetProperties()

PAGES_PER_SHEET_DIRECTION_LEFT_UP

Arranges the pages on a sheet from right to left and bottom to top.

see setPagesPerSheetProperties()

PAGES_PER_SHEET_DIRECTION_DOWN_RIGHT

Arranges the pages on a sheet from top to bottom and left to right.

see setPagesPerSheetProperties()

PAGES_PER_SHEET_DIRECTION_DOWN_LEFT

Arranges the pages on a sheet from top to bottom and right to left.

see setPagesPerSheetProperties()

PAGES_PER_SHEET_DIRECTION_UP_RIGHT

Arranges the pages on a sheet from bottom to top and left to right.

see setPagesPerSheetProperties()

PAGES_PER_SHEET_DIRECTION_UP_LEFT

Arranges the pages on a sheet from bottom to top and right to left.

see setPagesPerSheetProperties()

EXCEEDING_CONTENT_ANALYZE_NONE

Do not log exceeding content

see setLogExceedingContent()

EXCEEDING_CONTENT_ANALYZE_CONTENT

Log exceeding content

see setLogExceedingContent()

EXCEEDING_CONTENT_ANALYZE_CONTENT_AND_STATIC_BOXES

Log exceeding content and boxes without absolute positioning

see setLogExceedingContent()

EXCEEDING_CONTENT_ANALYZE_CONTENT_AND_BOXES

Log exceeding content and all boxes

see setLogExceedingContent()

EXCEEDING_CONTENT_AGAINST_NONE

Do not log exceeding content

see setLogExceedingContent()

EXCEEDING_CONTENT_AGAINST_PAGE_BORDERS

Log content exceeding the edges of its page

see setLogExceedingContent()

EXCEEDING_CONTENT_AGAINST_PAGE_CONTENT

Log content exceeding its page content area (overlaps the page margin)

see setLogExceedingContent()

EXCEEDING_CONTENT_AGAINST_PARENT

Log content exceeding its container

see setLogExceedingContent()

JAVASCRIPT_MODE_DISABLED

Indicates that JavaScript is disabled.

see setJavaScriptMode()

JAVASCRIPT_MODE_ENABLED

Indicates that JavaScript is enabled.

see setJavaScriptMode()

JAVASCRIPT_MODE_ENABLED_NO_LAYOUT

Indicates that JavaScript is enabled, without access to layout data.

see setJavaScriptMode()

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.

see setJavaScriptMode()

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 JAVASCRIPT_MODE_ENABLED_REAL_TIME, but is significantly faster. Only Date.getTime() is affected by this.

see setJavaScriptMode()

HTTPS_MODE_STRICT

Indicates strict HTTPS behavior. This matches the default behavior of Java.

see setHTTPSMode()

HTTPS_MODE_LENIENT

Indicates lenient HTTPS behavior. This means that many certificate issues are ignored.

see setHTTPSMode()

OUTPUT_FORMAT_PDF

PDF output format

see setOutputFormat()

OUTPUT_FORMAT_JPEG

JPEG output format

see setOutputFormat()

OUTPUT_FORMAT_PNG

PNG output format (using Java Image I/O)

see setOutputFormat()

OUTPUT_FORMAT_PNG_TRANSPARENT

Transparent PNG output format (using Java Image I/O)

see setOutputFormat()

OUTPUT_FORMAT_BMP

BMP output format

see setOutputFormat()

OUTPUT_FORMAT_GIF

GIF output format

see setOutputFormat()

OUTPUT_FORMAT_PNG_AI

PNG output format (using Apache Imaging)

see setOutputFormat()

OUTPUT_FORMAT_PNG_TRANSPARENT_AI

Transparent PNG output format (using Apache Imaging)

see setOutputFormat()

OUTPUT_FORMAT_TIFF_LZW

LZW compressed TIFF output format

see setOutputFormat()

OUTPUT_FORMAT_TIFF_PACKBITS

PackBits compressed TIFF output format

see setOutputFormat()

OUTPUT_FORMAT_TIFF_UNCOMPRESSED

Uncompressed TIFF output format

see setOutputFormat()

OUTPUT_FORMAT_TIFF_CCITT_1D

Monochrome CCITT 1D compressed TIFF output format

see setOutputFormat()

OUTPUT_FORMAT_TIFF_CCITT_GROUP_3

Monochrome CCITT Group 3 compressed TIFF output format

see setOutputFormat()

OUTPUT_FORMAT_TIFF_CCITT_GROUP_4

Monochrome CCITT Group 4 compressed TIFF output format

see setOutputFormat()



Constructor

PDFreactor()

SYNOPSIS

my $PDFreactor = PDFreactor -> new();

DESCRIPTION

The PDFreactor constructor


Class Methods

setLicenseKey()

SYNOPSIS

$PDFreactor -> setLicenseKey(string);

DESCRIPTION

Sets the license key using a string.

If no license key could be found then PDFreactor runs in evaluation mode.

The default value is null.

param string $content The content of the license key as a string.


setDisableFontRegistration()

SYNOPSIS

$PDFreactor -> setDisableFontRegistration(boolean);

DESCRIPTION

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.

param boolean $value The new value of the font registration setting.

see setCacheFonts()

see setFontCachePath()

see addFontDirectory()


setDisableSystemFonts()

SYNOPSIS

$PDFreactor -> setDisableSystemFonts(boolean);

DESCRIPTION

Enables or disables 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.

param boolean $value The new value of the system font registration setting.

see setDisableFontRegistration()

see addFontDirectory()


setCacheFonts()

SYNOPSIS

$PDFreactor -> setCacheFonts(boolean);

DESCRIPTION

Enables or disables caching of font information.

During the PDF creation PDFreactor requires information about fonts in the system. The process to get this information takes a long time. Thus PDFreactor offers an option to cache the collected information about fonts.

A font cache can be reused by PDFreactor on every PDF creation process but only if font registration is enabled. If font registration is disabled then the font cache will be ignored. (See setDisableFontRegistration(boolean) for more information).

The default value is true.

param boolean $value The new value of the cache fonts setting.

see setDisableFontRegistration()

see setFontCachePath()

see addFontDirectory()


setFontCachePath()

SYNOPSIS

$PDFreactor -> setFontCachePath(string);

DESCRIPTION

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.

param string $location The path of the font cache.

see setDisableFontRegistration()

see setCacheFonts()

see addFontDirectory()


setFontDirectory()

SYNOPSIS

$PDFreactor -> setFontDirectory(string);

DESCRIPTION

deprecated As of PDFreactor 6.0, replaced by addFontDirectory().

Sets the font directory from which fonts will be read.

All files with the endings ".ttf", ".otf", ".afm" and ".ttc" will be read.

The default value of the font directory is ""%system%".

param string $location The font directory.

see setDisableFontRegistration()

see setCacheFonts()

see setFontCachePath()


addFont()

SYNOPSIS

$PDFreactor -> addFont(string, string, boolean, boolean);

DESCRIPTION

Loads a font from a URL which can be used via the CSS property "font-family".

param string $source The URL to load the font from.

param string $family The font family name the loaded font will be labeled as.

param boolean $bold Whether the font is bold.

param boolean $italic Whether the font is italic.


addFontAlias()

SYNOPSIS

$PDFreactor -> addFontAlias(string, string, boolean, boolean);

DESCRIPTION

Registers an alias font family for an existing font.

This function is limited to fonts loaded automatically from system folders.

param string $source The name of a existing font family.

param string $family The alias name for that font.

param boolean $bold Whether the font is bold.

param boolean $italic Whether the font is italic.


addFontDirectory()

SYNOPSIS

$PDFreactor -> addFontDirectory(string);

DESCRIPTION

Registers an additional font directory to load fonts from.

param string $fontDirectory The path of the font directory.


setLogLevel()

SYNOPSIS

$PDFreactor -> setLogLevel(int);

DESCRIPTION

Sets the log level.

Use one of the following LOG_LEVEL_ constants to specify the log level:

The default value is LOG_LEVEL_NONE.

param int $value The new log level setting.

see LOG_LEVEL_NONE

see LOG_LEVEL_FATAL

see LOG_LEVEL_WARN

see LOG_LEVEL_INFO

see LOG_LEVEL_DEBUG

see LOG_LEVEL_PERFORMANCE

see LOG_LEVEL_DEFAULT

see getLog()


setLogExceedingContent()

SYNOPSIS

$PDFreactor -> setLogExceedingContent(int, int);

DESCRIPTION

Whether to log content exceeding the page.

Use EXCEEDING_CONTENT_ANALYZE_ constants to specify which kind of content should be observed for exceeding content logging. The default value is EXCEEDING_CONTENT_ANALYZE_NONE.

Use EXCEEDING_CONTENT_AGAINST_ constants to specify that exceeding this content starts exceeding content logging. The default value is EXCEEDING_CONTENT_AGAINST_NONE.

param int $logExceedingContentAnalyze Enables logging of exceeding content and optionally of boxes.

param int $logExceedingContentAgainst Enables logging of exceeding content either against the page edges, page content areas or containers.

see EXCEEDING_CONTENT_ANALYZE_NONE

see EXCEEDING_CONTENT_ANALYZE_CONTENT

see EXCEEDING_CONTENT_ANALYZE_CONTENT_AND_BOXES

see EXCEEDING_CONTENT_ANALYZE_CONTENT_AND_STATIC_BOXES

see EXCEEDING_CONTENT_AGAINST_NONE

see EXCEEDING_CONTENT_AGAINST_PARENT

see EXCEEDING_CONTENT_AGAINST_PAGE_CONTENT

see EXCEEDING_CONTENT_AGAINST_PAGE_BORDERS


setThrowLicenseExceptions()

SYNOPSIS

$PDFreactor -> setThrowLicenseExceptions(boolean)

DESCRIPTION

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.

param boolean $throwLicenseExceptions Whether an exception should be thrown.


setBaseURL()

SYNOPSIS

$PDFreactor -> setBaseURL(string);

DESCRIPTION

Sets the base URL of the XML document.

To resolve relative URLs to absolute URLs a reference (base) URL is required. This reference URL is usually the system id of the document.

This method can be used to specifyanother reference URL. If this URL is not null then it will be used instead of the system id.

The default value is null.

param string $value The base URL for the document.


setXSLTMode()

SYNOPSIS

$PDFreactor -> setXSLTMode(boolean);

DESCRIPTION

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.

param boolean $value The new XSLT mode.


setPostTransformationDocumentType()

SYNOPSIS

$PDFreactor -> setPostTransformationDocumentType(int);

DESCRIPTION

Sets the document type after XSL-Transformations have been applied.

The <code>DOCTYPE_</code> constants can be used to specify the document type.


The default value specified is L</"DOCTYPE_AUTODETECT">.

param int $value The new document type setting.

see DOCTYPE_AUTODETECT

see DOCTYPE_XML

see DOCTYPE_XHTML

see DOCTYPE_HTML5


setEncoding()

SYNOPSIS

$PDFreactor -> setEncoding(string);

DESCRIPTION

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.

param string $value The encoding of the document or null for autodetection.


setCleanupTool()

SYNOPSIS

$PDFreactor -> setCleanupTool(int);

DESCRIPTION

Sets the cleanup tool to use for documents with unparsable content.

The default value specified by CLEANUP_DEFAULT is CLEANUP_CYBERNEKO.

The cleanup tool is only used for DOCTYPE_XHTML. HTML5 utilizes an internal cleanup.

param int $value The new cleanup tool.

Use one of the following CLEANUP_ constants to specify the cleanup tool:

see CLEANUP_NONE

see CLEANUP_JTIDY

see CLEANUP_CYBERNEKO

see CLEANUP_TAGSOUP

see CLEANUP_DEFAULT


setDocumentType()

SYNOPSIS

$PDFreactor -> setDocumentType(int);

DESCRIPTION

Sets the document type.

The DOCTYPE_ constants can be used to specify the document type.

The default value specified by DOCTYPE_DEFAULT is link DOCTYPE_AUTODETECT.

param int $value The new document type setting.

Use one of the following DOCTYPE_ constants to specify the document type:

see DOCTYPE_AUTODETECT

see DOCTYPE_XML

see DOCTYPE_XHTML

see DOCTYPE_HTML5

see DOCTYPE_DEFAULT


setDocumentDefaultLanguage()

SYNOPSIS

$PDFreactor -> setDocumentDefaultLanguage(string);

DESCRIPTION

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.

param string $languageCode the default ISO 639 language code used for documents.


addUserStyleSheet()

SYNOPSIS

$PDFreactor -> addUserStyleSheet(string, string, string, string);

DESCRIPTION

Adds a user style sheet to the document.

There are two ways to specify the style sheet:

  1. Specifying the stylesheet only using an URI.
  2. Specifying the stylesheet by the content of the stylesheet and alternatively setting a URI to resolve relative elements. If no URI is specified then the system id/base URL of the document will be used.

param string $content The content of the style sheet.

param string $media The media type of the style sheet.

param string $title The title of the stylesheet.

param string $uri The URI of the style sheet.

see removeAllUserStyleSheets()


removeAllUserStyleSheets()

SYNOPSIS

$PDFreactor -> removeAllUserStyleSheets();

DESCRIPTION

Removes all user style sheets.

see addUserStyleSheet()


addIntegrationStyleSheet()

SYNOPSIS

$PDFreactor -> addIntegrationStyleSheet(string, string, string, string);

DESCRIPTION

Adds an integration style sheet to the document.

There are two ways to specify the style sheet:

  1. Specifying the stylesheet only using an URI.
  2. Specifying the stylesheet by the content of the stylesheet and alternatively setting a URI to resolve relative elements. If no URI is specified then the system id/base URL of the document will be used.

param string $content The content of the style sheet.

param string $media The media type of the style sheet.

param string $title The title of the stylesheet.

param string $uri The URI of the style sheet.

see removeAllIntegrationStyleSheets()


removeAllIntegrationStyleSheets()

SYNOPSIS

$PDFreactor -> removeAllIntegrationStyleSheets();

DESCRIPTION

Removes all integration style sheets.

see addIntegrationStyleSheet()


addXSLTStyleSheet()

SYNOPSIS

$PDFreactor -> addXSLTStyleSheet(string, string);

DESCRIPTION

Adds a XSLT style sheet to the document.

There are two ways to specify the style sheet:

  1. Specifying the stylesheet only using an URI.
  2. Specifying the stylesheet by the content of the stylesheet and alternatively setting a URI to resolve relative elements. If no URI is specified then the system id/base URL of the document will be used.

param string $content The content of the style sheet.

param string $uri The URI of the style sheet.

see removeAllXSLTStyleSheets()


removeAllXSLTStyleSheets()

SYNOPSIS

$PDFreactor -> removeAllXSLTStyleSheets();

DESCRIPTION

Removes all XSLT style sheets.

see addXSLTStyleSheet()


addUserScript()

SYNOPSIS

$PDFreactor -> addUserScript(string, string, boolean);

DESCRIPTION

Adds an user script to the document.

There are two ways to specify the script:

param string $content The content of the script.

param string $uri The URI of the script.

param boolean $beforeDocumentScripts Use true to cause PDFreactor to run the script before all scripts inside the document and false to run it after.

see removeAllUserScripts()


removeAllUserScripts()

SYNOPSIS

$PDFreactor -> removeAllUserScripts();

DESCRIPTION

Removes all user scripts.

see addUserScript()


setJavaScriptMode()

SYNOPSIS

$PDFreactor -> setJavaScriptMode(int);

DESCRIPTION

Sets the JavaScript Mode. Be default JavaScript is disabled.

param int $javaScriptMode The JavaScript Mode.

See JAVASCRIPT_MODE_DISABLED

See JAVASCRIPT_MODE_ENABLED

See JAVASCRIPT_MODE_ENABLED_NO_LAYOUT

See JAVASCRIPT_MODE_ENABLED_REAL_TIME

See JAVASCRIPT_MODE_ENABLED_TIME_LAPSE


setAuthor()

SYNOPSIS

$PDFreactor -> setAuthor(string);

DESCRIPTION

Sets the value of the author field of the PDF document.

param string $value The author of the document.


setCreator()

SYNOPSIS

$PDFreactor -> setCreator(string);

DESCRIPTION

Sets the value of creator field of the PDF document.

param string $value The creator of the document.


setKeywords()

SYNOPSIS

$PDFreactor -> setKeywords(string);

DESCRIPTION

Sets the value of the keywords field of the PDF document.

param string $value The keywords of the document.


setTitle()

SYNOPSIS

$PDFreactor -> setTitle(string);

DESCRIPTION

Sets the value of the title field of the PDF document.

param string $value The title of the document.


setSubject()

SYNOPSIS

$PDFreactor -> setSubject(string);

DESCRIPTION

Sets the value of the subject field of the PDF document.

param string $value The subject of the document.


addCustomDocumentProperty()

SYNOPSIS

$PDFreactor -> addCustomDocumentProperty(string, string);

DESCRIPTION

Adds a custom property to the PDF document. An existing property of the same name will be replaced.

param string $name The name of the property.

param string $value The value of the property.


addAttachment()

SYNOPSIS

$PDFreactor -> addAttachment(base64string, string, string, string);

DESCRIPTION

Adds a file attachment to PDF document.

param base64string $data The content of the attachment as a base64 encoded string. May be null.

param string $url If data is null, the attachment will be retrieved from this URL. If this is "#" the input document URL is used instead.

param string $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.

param string $description The description of the attachment. If this is null the name is used.


setAddAttachments()

SYNOPSIS

$PDFreactor -> setAddAttachments(boolean);

DESCRIPTION

Enables or disables attachments specified in style sheets.

The default value is false.

param boolean $value Whether to enable CSS based attachments.


setAddOverprint()

SYNOPSIS

$PDFreactor -> setAddOverprint(boolean);

DESCRIPTION

Enables or disables overprinting.

The default value is false.

param boolean $value Whether to enable overprinting.


setEncryption()

SYNOPSIS

$PDFreactor -> setEncryption(int);

DESCRIPTION

Sets the encryption.

The default value specified by ENCRYPTION_DEFAULT is ENCRYPTION_NONE.

param int $value The new encryption setting.

Use one of the following ENCRYPTION_ constants to specify the encryption:

see ENCRYPTION_NONE

see ENCRYPTION_40

see ENCRYPTION_128

see ENCRYPTION_DEFAULT

see setOwnerPassword()

see setUserPassword()

see setAllowAnnotations()

see setAllowAssembly()

see setAllowCopy()

see setAllowDegradedPrinting()

see setAllowFillIn()

see setAllowModifyContents()

see setAllowPrinting()

see setAllowScreenReaders()


setFullCompression()

SYNOPSIS

$PDFreactor -> setFullCompression(boolean);

DESCRIPTION

Enables or disables full compression of the PDF document.

The default value is false.

param boolean $value true to enable full compression of the document and false to disable full compression.


setOwnerPassword()

SYNOPSIS

$PDFreactor -> setOwnerPassword(string);

DESCRIPTION

Sets the owner password of the PDF document.

The default value is null

param string $value The owner password.

see setEncryption()

see setUserPassword()


setUserPassword()

SYNOPSIS

$PDFreactor -> setUserPassword(string);

DESCRIPTION

Sets the user password of the PDF document.

The default value is null.

param string $value The user password.

see setEncryption()

see setOwnerPassword()


setAuthenticationCredentials()

SYNOPSIS

$PDFreactor -> setAuthenticationCredentials(string, string);

DESCRIPTION

Enables access to resources that are secured via Basic or Digest authentication.

param string $authenticationUsername The user name for the secured realm.

param string $authenticationPassword The password for the secured realm.


setHTTPSMode()

SYNOPSIS

$PDFreactor -> setHTTPSMode(int);

DESCRIPTION

Sets the HTTPS Mode. By default strict mode is set.

In closed environment lenient can be the preferred setting to avoid HTTPS issues that are not security critical.

param int $httpsMode The HTTPS mode constant.

see HTTPS_MODE_STRICT

see HTTPS_MODE_LENIENT


setRequestHeader()

SYNOPSIS

$PDFreactor -> setRequestHeader(string, string);

DESCRIPTION

Adds a request header to all outgoing HTTP connections. If the key already exists, the pair is overwritten.

param string $requestHeaderKey The key of the header.

param string $requestHeaderValue The value of the header.


setCookies()

SYNOPSIS

$PDFreactor -> setCookies(string, string);

DESCRIPTION

Adds a cookie to all outgoing HTTP connections. If the key already exists, the pair is overwritten.

param string $cookieKey An array of keys of cookies.

param string $cookieValue An array of values of cookies.


setAddLinks()

SYNOPSIS

$PDFreactor -> setAddLinks(boolean);

DESCRIPTION

Enables or disables links in the PDF document.

The default value is false.

param boolean $value Use true to enable links in the document and false to disable links.


setAddBookmarks()

SYNOPSIS

$PDFreactor -> setAddBookmarks(boolean);

DESCRIPTION

Enables or disables bookmarks in the PDF document.

The default value is false.

param boolean $value Use true to enable bookmarks in the document and false to disable bookmarks.


setAddTags()

SYNOPSIS

$PDFreactor -> setAddTags(boolean);

DESCRIPTION

Enables or disables tagging of PDF document.

The default value is false.

param boolean $value Use true to enable tagging of the document and false to disable tagging.


setAddComments()

SYNOPSIS

$PDFreactor -> setAddComments(boolean);

DESCRIPTION

Enables or disables comments in the PDF document.

The default value is false.

param boolean $value Use true to enable comments in the document and false to disable comments.


setAddPreviewImages()

SYNOPSIS

$PDFreactor -> setAddPreviewImages(boolean);

DESCRIPTION

Enables or disables embedding of image previews per page in the PDF document.

The default value is false.

param boolean $value Use true to enable embedding of image previews per page in the document and false to disable embedding of image previews per page.


setAddPrintDialogPrompt()

SYNOPSIS

$PDFreactor -> setAddPrintDialogPrompt(boolean);

DESCRIPTION

Enables or disables a print dialog to be shown upon opening the generated PDF document by a PDF viewer.

The default value is false.

param boolean $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.


setAppendLog()

SYNOPSIS

$PDFreactor -> setAppendLog(boolean);

DESCRIPTION

Specifies whether or not the log data should be added to the PDF document.

The default value is false.

param boolean $value Use true to add the log data to the document and false if the log data should not be added.


setAllowAnnotations()

SYNOPSIS

$PDFreactor -> setAllowAnnotations(boolean);

DESCRIPTION

Enables or disables the 'annotations' restriction in the PDF document.

The default value is false.

param boolean $value Use true to enable 'annotations' in the document and false to disable 'annotations'.

see setEncryption()


setAllowAssembly()

SYNOPSIS

$PDFreactor -> setAllowAssembly(boolean);

DESCRIPTION

Enables or disables the 'assembly' restriction in the PDF document.

The default value is false.

param boolean $value Use true to enable 'assembly' in the document and false to disable 'assembly'.

see setEncryption()


setAllowCopy()

SYNOPSIS

$PDFreactor -> setAllowCopy(boolean);

DESCRIPTION

Enables or disables the 'copy' restriction in the PDF document.

The default value is false.

param boolean $value Use true to enable 'copy' in the document and false to disable 'copy'.

see setEncryption()


setAllowDegradedPrinting()

SYNOPSIS

$PDFreactor -> setAllowDegradedPrinting(boolean);

DESCRIPTION

Enables or disables the 'degraded printing' restriction in the PDF document.

The default value is false.

param boolean $value Use true to enable 'degraded printing' in the document and false to disable 'degraded printing'.

see setEncryption()


setAllowFillIn()

SYNOPSIS

$PDFreactor -> setAllowFillIn(boolean);

DESCRIPTION

Enables or disables the 'fill in' restriction in the PDF document.

The default value is false.

param boolean $value Use true to enable 'fill in' in the document and false to disable 'fill in'.

see setEncryption()


setAllowModifyContents()

SYNOPSIS

$PDFreactor -> setAllowModifyContents(boolean);

DESCRIPTION

Enables or disables the 'modify contents' restriction in the PDF document.

The default value is false.

param boolean $value Use true to enable 'modify contents' in the document and false to disable 'modify contents'.

see setEncryption()


setAllowPrinting()

SYNOPSIS

$PDFreactor -> setAllowPrinting(boolean);

DESCRIPTION

Enables or disables the 'printing' restriction in the PDF document.

The default value is false.

param boolean $value Use true to enable 'printing' in the document and false to disable 'printing'.

see setEncryption()


setAllowScreenReaders()

SYNOPSIS

$PDFreactor -> setAllowScreenReaders(boolean);

DESCRIPTION

Enables or disables the 'screen readers' restriction in the PDF document.

The default value is false.

param boolean $value Use true to enable 'screen readers' in the document and false to disable 'screen readers'.

see setEncryption()


setProcessingPreferences()

SYNOPSIS

$PDFreactor -> setProcessingPreferences(int);

DESCRIPTION

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.

param int $processingPreferences A value of ORed processing preferences flags.

see PROCESSING_PREFERENCES_SAVE_MEMORY_IMAGES


setViewerPreferences()

SYNOPSIS

$PDFreactor -> setViewerPreferences(int);

DESCRIPTION

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.

param int $viewerPreferences ORed VIEWERPREFERENCES_ constants.

see VIEWER_PREFERENCES_CENTER_WINDOW

see VIEWER_PREFERENCES_DIRECTION_L2R

see VIEWER_PREFERENCES_DIRECTION_R2L

see VIEWER_PREFERENCES_DISPLAY_DOC_TITLE

see VIEWER_PREFERENCES_DUPLEX_FLIP_LONG_EDGE

see VIEWER_PREFERENCES_DUPLEX_FLIP_SHORT_EDGE

see VIEWER_PREFERENCES_DUPLEX_SIMPLEX

see VIEWER_PREFERENCES_FIT_WINDOW

see VIEWER_PREFERENCES_HIDE_MENUBAR

see VIEWER_PREFERENCES_HIDE_TOOLBAR

see VIEWER_PREFERENCES_HIDE_WINDOW_UI

see VIEWER_PREFERENCES_NON_FULLSCREEN_PAGE_MODE_USE_NONE

see VIEWER_PREFERENCES_NON_FULLSCREEN_PAGE_MODE_USE_OC

see VIEWER_PREFERENCES_NON_FULLSCREEN_PAGE_MODE_USE_OUTLINES

see VIEWER_PREFERENCES_NON_FULLSCREEN_PAGE_MODE_USE_THUMBS

see VIEWER_PREFERENCES_PAGE_LAYOUT_ONE_COLUMN

see VIEWER_PREFERENCES_PAGE_LAYOUT_SINGLE_PAGE

see VIEWER_PREFERENCES_PAGE_LAYOUT_TWO_COLUMN_LEFT

see VIEWER_PREFERENCES_PAGE_LAYOUT_TWO_COLUMN_RIGHT

see VIEWER_PREFERENCES_PAGE_LAYOUT_TWO_PAGE_LEFT

see VIEWER_PREFERENCES_PAGE_LAYOUT_TWO_PAGE_RIGHT

see VIEWER_PREFERENCES_PAGE_MODE_FULLSCREEN

see VIEWER_PREFERENCES_PAGE_MODE_USE_NONE

see VIEWER_PREFERENCES_PAGE_MODE_USE_OC

see VIEWER_PREFERENCES_PAGE_MODE_USE_OUTLINES

see VIEWER_PREFERENCES_PAGE_MODE_USE_THUMBS

see VIEWER_PREFERENCES_PICKTRAYBYPDFSIZE_FALSE

see VIEWER_PREFERENCES_PICKTRAYBYPDFSIZE_TRUE

see VIEWER_PREFERENCES_PRINTSCALING_APPDEFAULT

see VIEWER_PREFERENCES_PRINTSCALING_NONE


setConformance()

SYNOPSIS

$PDFreactor -> setConformance(int);

DESCRIPTION

Sets the conformance of the PDF.

The CONFORMANCE_ constants can be used as value. The default value specified is CONFORMANCE_PDF.

param int $conformances conformance constants.

see CONFORMANCE_PDF

see CONFORMANCE_PDFA1A

see CONFORMANCE_PDFA3A


setDefaultColorSpace()

SYNOPSIS

$PDFreactor -> setDefaultColorSpace();

DESCRIPTION

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 COLOR_SPACE_RGB.

param boolean $defaultColorSpace The default color space of the PDF.

see COLOR_SPACE_CMYK

see COLOR_SPACE_RGB


setOutputIntentFromURL()

SYNOPSIS

$PDFreactor -> setOutputIntentFromURL(String, String);

DESCRIPTION

Sets the ouput intent including the identifier and the ICC profile to be embedded into the PDF.

param String $identifier the OutputConditionIdentifier.

param String $profileUrl the DestOutputProfile.


setOutputIntentFromByteArray()

SYNOPSIS

$PDFreactor -> setOutputIntentFromByteArray(String, base64string);

DESCRIPTION

Sets the output intent including the identifier and the ICC profile to be embedded into the PDF.

param String $identifier the OutputConditionIdentifier.

param base64string $profileData the DestOutputProfile.


setDisableFontEmbedding()

SYNOPSIS

$PDFreactor -> setDisableFontEmbedding(boolean);

DESCRIPTION

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.

param boolean $disableFontEmbedding whether fonts will not be embedded


setFontFallback()

SYNOPSIS

$PDFreactor -> setFontFallback(String);

DESCRIPTION

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.

param array $fontFallback an array of font family names


setPixelsPerInch()

SYNOPSIS

$PDFreactor -> setPixelsPerInch(int)

DESCRIPTION

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.

param int $pixelsPerInch the pixel conversion factor.


setPixelsPerInchShrinkToFit()

SYNOPSIS

$PDFreactor -> setPixelsPerInchShrinkToFit(boolean)

DESCRIPTION

Whether the pixels per inch should be adapted to avoid content exceeding pages.

param boolean $pixelsPerInchShrinkToFit whether the pixel conversion factor should be adapted.


setPageOrder()

SYNOPSIS

$PDFreactor -> setPageOrder(string);

DESCRIPTION

Sets the page order of the direct result of the conversion. A comma-separated list of page numbers and ranges is intended as parameter. Alternatively, constants can be used.

param string $order the page order

see PAGE_ORDER_EVEN

see PAGE_ORDER_ODD

see PAGE_ORDER_BOOKLET

see PAGE_ORDER_BOOKLET_RTL


setPagesPerSheetProperties()

SYNOPSIS

$PDFreactor -> setPagesPerSheetProperties(int, int, string, string, string, int)

DESCRIPTION

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 PAGES_PER_SHEET_DIRECTION_RIGHT_DOWN.

param int $pagesPerSheetCols The number of columns per sheet.

param int $pagesPerSheetRows The number of rows per sheet.

param string $pagesPerSheetSheetSize The sheet size as CSS size, e.g. A4, letter landscape, 15in 20in, 20cm 30cm.

param string $pagesPerSheetSheetMargin The sheet margin as CSS margin, e.g. 1in, 1cm 1.5cm, 10mm 20mm 10mm 30mm. null is interpreted as 0mm.

param string $pagesPerSheetSpacing The horizontal and vertical space between pages on a sheet as CSS value, e.g. 0.1in, 5mm 2mm. null is interpreted as 0mm.

param int $pagesPerSheetDirection The direction in which the pages are ordered on a sheet.

see PAGES_PER_SHEET_DIRECTION_DOWN_LEFT

see PAGES_PER_SHEET_DIRECTION_DOWN_RIGHT

see PAGES_PER_SHEET_DIRECTION_LEFT_DOWN

see PAGES_PER_SHEET_DIRECTION_LEFT_UP

see PAGES_PER_SHEET_DIRECTION_RIGHT_DOWN

see PAGES_PER_SHEET_DIRECTION_RIGHT_UP

see PAGES_PER_SHEET_DIRECTION_UP_LEFT

see PAGES_PER_SHEET_DIRECTION_UP_RIGHT


setBookletMode()

SYNOPSIS

$PDFreactor -> setBookletMode(string, string, boolean)

DESCRIPTION

Convenience method to set pages-per-sheet properties and page order in one step to create a booklet.

param string $bookletSheetSize The size of the sheet as CSS value, e.g. A3, letter landscape, 15in 20in, 20cm 30cm.

param string $bookletSheetMargin The sheet margin as CSS margin, e.g. 1in, 1cm 1.5cm, 10mm 20mm 10mm 30mm. null is interpreted as 0mm.

param boolean $bookletRTL Whether or not the reading order of the booklet should be right-to-left.


setMergeURL()

SYNOPSIS

$PDFreactor -> setMergeURL(string);

DESCRIPTION

This methods sets a URL of an external PDF document which will be merged with the PDF document generated by the XML source.

param string $url A URL of a PDF document.

see setMergeByteArray()

see setMergeBeforePDF()


setMergeURLs()

SYNOPSIS

$PDFreactor -> setMergeURLs(string);

DESCRIPTION

This method sets an array of URLs of external PDF documents which will be merged with the PDF document generated by the XML source.

param string $urls An array of URLs of PDF documents.

see setMergeURL()


setMergeByteArray()

SYNOPSIS

$PDFreactor -> setMergeByteArray(base64string);

DESCRIPTION

This methods sets a byte array containing an external PDF document which will be merged with the PDF document generated by the XML source.

The default value is null.

param string $base64string A base64 encoded binary string containing the PDF RAW data.

see setMergeByteArrays()

see setMergeURL()

see setMergeURLs()

see setMergeBeforePDF()


setMergeByteArrays()

SYNOPSIS

$PDFreactor -> setMergeByteArrays(base64string);

DESCRIPTION

This method sets an array of several byte arrays containing external PDF documents which will be merged with the PDF document generated by the XML source.

param $array An array of byte arrays containing multiple PDF RAW data.

see setMergeByteArray()

see setMergeURL()

see setMergeURLs()

see setMergeBeforePDF()


setMergeBeforePDF()

SYNOPSIS

$PDFreactor -> setMergeBeforePDF(boolean);

DESCRIPTION

deprecated As of PDFreactor 5.0, replaced by setMergeMode(int)

see setMergeMode()


setMergeMode()

SYNOPSIS

$PDFreactor -> setMergeMode(int);

DESCRIPTION

Sets the merge mode.

The following merge methods can be used:

The default value is MERGE_MODE_APPEND.

param int $modeMode The merge mode.

see MERGE_MODE_APPEND

see MERGE_MODE_PREPEND

see MERGE_MODE_OVERLAY

see MERGE_MODE_OVERLAY_BELOW


setOverlayRepeat()

SYNOPSIS

$PDFreactor -> setOverlayRepeat(int);

DESCRIPTION

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.

The default value is OVERLAY_REPEAT_NONE.

param int $overlayRepeat The repeating mode.

see OVERLAY_REPEAT_NONE

see OVERLAY_REPEAT_LAST_PAGE

see OVERLAY_REPEAT_ALL_PAGES


setSignPDF()

SYNOPSIS

$PDFreactor -> setSignPDF(string, string, string, string, int)

DESCRIPTION

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.

param string $keystoreURL The URL to the keystore file.

param string $keyAlias The alias of the certificate included in the keystore to be used to sign the PDF.

param string $keystorePassword The password of the keystore.

param string $keystoreType The format of the keystore, i.e. pkcs12 or jks. Use one of the KEYSTORE_TYPE_ constants as value.

param int $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.

see KEYSTORE_TYPE_JKS

see KEYSTORE_TYPE_PKCS12

see SIGNING_MODE_SELF_SIGNED

see SIGNING_MODE_VERISIGN_SIGNED

see SIGNING_MODE_WINCER_SIGNED


setOutputFormat()

SYNOPSIS

$PDFreactor -> setOutputFormat(int, int, int);

DESCRIPTION

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.

param int $format the output format. See OUTPUT_FORMAT_ constants

param int $outputWidth The with of the output in pixels (). Values <1 will be computed based on the specified height and the aspect ratio of the input document.

param int $outputHeight The height of the output in pixels (). Values <1 will be computed based on the specified width and the aspect ratio of the input document.

see OUTPUT_FORMAT_PDF

see OUTPUT_FORMAT_JPEG

see OUTPUT_FORMAT_PNG

see OUTPUT_FORMAT_PNG_TRANSPARENT

see OUTPUT_FORMAT_BMP

see OUTPUT_FORMAT_GIF

see OUTPUT_FORMAT_PNG_AI

see OUTPUT_FORMAT_PNG_TRANSPARENT_AI

see OUTPUT_FORMAT_TIFF_LZW

see OUTPUT_FORMAT_TIFF_PACKBITS

see OUTPUT_FORMAT_TIFF_UNCOMPRESSED

see OUTPUT_FORMAT_TIFF_CCITT_1D

see OUTPUT_FORMAT_TIFF_CCITT_GROUP_3

see OUTPUT_FORMAT_TIFF_CCITT_GROUP_4


setContinuousOutput()

SYNOPSIS

$PDFreactor -> setContinuousOutput(int, int);

DESCRIPTION

Enables the conversion of the input document into one image.

param int $width equivalent to the width of a browser window (). Values <1 enable paginated output

param int $height equivalent to the height of a browser window (). For values <1 the entire height of the document is used.


enableDebugMode()

SYNOPSIS

$PDFreactor -> enableDebugMode();

DESCRIPTION

Enables debug mode, which adds additional information to the output.


renderDocumentFromURL()

SYNOPSIS

$PDFreactor -> renderDocumentFromURL(string);

DESCRIPTION

Generates a PDF document from a XML document based on the current settings.

The document can be specified by a URL pointing to the document.

param string $url A URL pointing to the XML document.

return string The PDF document as a base64 encoded binary string.

see renderDocumentFromByteArray()

see renderDocumentFromContent()


renderDocumentFromByteArray()

SYNOPSIS

$PDFreactor -> renderDocumentFromByteArray(base64string);

DESCRIPTION

Generates a PDF document from a XML document based on the current settings.

The document can be specified by a byte array containing the content of the document.

param string $byteArray A binary string containing the content of the XML document.

return string The PDF document as a base64 encoded binary string.

see renderDocumentFromURL()

see renderDocumentFromContent()


renderDocumentFromContent()

SYNOPSIS

$PDFreactor -> renderDocumentFromContent(string);

DESCRIPTION

Generates a PDF document from a XML document based on the current settings.

The document can be specified by a string containing the content of the document.

param string $content A string containing the content of the XML document.

return string The PDF document as a base64 encoded binary string.

see renderDocumentFromURL()

see renderDocumentFromByteArray()


renderDocumentFromURLAsArray()

SYNOPSIS

$PDFreactor -> renderDocumentFromURLAsArray(String);

DESCRIPTION

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.

param String $url A URL pointing to the input document.

return an array of byte-arrays each containing an image representing one page of the document

see renderDocumentFromByteArrayAsArray()

see renderDocumentFromContentAsArray()

see renderDocumentFromURL()


renderDocumentFromByteArrayAsArray()

SYNOPSIS

$PDFreactor -> renderDocumentFromByteArrayAsArray(base64string);

DESCRIPTION

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.


I<param String $byteArray An array containing the content of the HTML or XML document.>

return an array of byte-arrays each containing an image representing one page of the document

see renderDocumentFromByteArray()

see renderDocumentFromContentAsArray()

see renderDocumentFromURLAsArray()


renderDocumentFromContentAsArray()

SYNOPSIS

$PDFreactor -> renderDocumentFromContentAsArray(String);

DESCRIPTION

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.


I<param String $content An String containing the content of the HTML or XML document.>

return an array of byte-arrays each containing an image representing one page of the document

see renderDocumentFromByteArrayAsArray()

see renderDocumentFromContent()

see renderDocumentFromURLAsArray()


getError()

SYNOPSIS

$PDFreactor -> getError();

DESCRIPTION

Returns the error messages generated during rendering.

return string The message string.


getLog()

SYNOPSIS

$PDFreactor -> getLog();

DESCRIPTION

Returns the log messages generated during rendering based on the log level.

return string The log string.

see setLogLevel()


getExceedingContents()

SYNOPSIS

$PDFreactor -> getExceedingContents();

DESCRIPTION

Provides information about content exceeding its page or parent. Depends on the mode set via setLogExceedingContent().

return An array of Perl Hashes representing exceeding content or undef if the logging of exceeding content was not enabled or no conversion was run, yet or if there is no exceeding content.

The exceeding content hashes have the following keys:

"pageNumber" - the number of the page that contains the exceeding content.

"description" - the text that exceeds the page or null if this exceeding content is an image.

"box" - whether the exceeding content is a box.

"top" - whether the content exceeds the page at the top.

"right" - whether the content exceeds the page to the right.

"bottom" - whether the content exceeds the page at the bottom.

"left" - whether the content exceeds the page to the left.

"containerTop" - the top coordinate of the the container box in the page in pixels. Depending on the settings this box may be the page

"containerRight" - the right coordinate of the the container box in the page in pixels. Depending on the settings this box may be the page

"containerBottom" - the bottom coordinate of the the container box in the page in pixels. Depending on the settings this box may be the page

"containerLeft" - the left coordinate of the the container box in the page in pixels. Depending on the settings this box may be the page

"exceedingBoxTop" - the top coordinate of the the exceeding box in the page in pixels.

"exceedingBoxRight" - the right coordinate of the the exceeding box in the page in pixels.

"exceedingBoxBottom" - the bottom coordinate of the the exceeding box in the page in pixels.

"exceedingBoxLeft" - the left coordinate of the the exceeding box in the page in pixels.

"pageTop" - the top coordinate of the the page in pixels.

"pageRight" - the right coordinate of the the page in pixels.

"pageBottom" - the bottom coordinate of the the page in pixels.

"pageLeft" - the left coordinate of the the page in pixels.

"summary" - summary of this exceeding content object.

"html" - the HTML of the box that contains the exceeding content.

"path" - an array of integers denoting the indexes of the ancestors of the DOM node corresponding to the box containing the exceeding content, starting from below the root node down to the element itself.


getNumberOfPages()

SYNOPSIS

$PDFreactor -> getNumberOfPages(boolean);

DESCRIPTION

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.

return int The number of pages of the document after conversion.

param boolean $PDF If true, return the number of pages of the resulting PDF (including, e.g., merge operations), else return those of the laid out input document.