constructor PDFreactor [line 963]
PDFreactor PDFreactor(
[
$host = ""], [
$port = ""], [
$debug = false])
|
|
Constructs a new PDFreactor object.
Parameters:
method addAttachment [line 1632]
void addAttachment(
string
$data, string
$url, string
$name, string
$description)
|
|
Adds a file attachment to PDF document.
Parameters:
method addCustomDocumentProperty [line 1611]
void addCustomDocumentProperty(
string
$name, string
$value)
|
|
Adds a custom property to the PDF document. An existing property of the same name will be replaced.
Parameters:
method addFont [line 1120]
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".
Parameters:
method addFontAlias [line 1141]
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.
Parameters:
method addFontDirectory [line 1104]
void addFontDirectory(
string
$fontDirectory)
|
|
Registers an additional font directory to load fonts from.
Parameters:
method addUserScript [line 1515]
void addUserScript(
string
$content, string
$uri, boolean
$beforeDocumentScripts)
|
|
Adds an user script to the document.
There are two ways to specify the script:
- Specifying the script only by an URI.
- Specifying the script by the content of the script 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.
Tags:
Parameters:
method addUserStyleSheet [line 1438]
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:
- Specifying the stylesheet only using an URI.
- Specifying the stylesheet by the content of the style sheet 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.
Tags:
Parameters:
method addXSLTStyleSheet [line 1474]
void addXSLTStyleSheet(
string
$content, string
$uri)
|
|
Adds a XSLT style sheet to the document.
There are two ways to specify the style sheet:
- Specifying the stylesheet only using an URI.
- 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.
Tags:
Parameters:
method enableDebugMode [line 2596]
Enables debug mode, which adds additional information to the output.
method getError [line 2774]
Returns the error messages generated during rendering.
Tags:
method getExceedingContents [line 2796]
array getExceedingContents(
)
|
|
Provides information about content exceeding its page or parent. Depends on the mode set via
setLogExceedingContent().
Tags:
method getLog [line 2785]
Returns the log messages generated during rendering based on the log level.
Tags:
method getNumberOfPages [line 2814]
method removeAllUserScripts [line 1531]
void removeAllUserScripts(
)
|
|
Removes all user scripts.
Tags:
method removeAllUserStyleSheets [line 1454]
void removeAllUserStyleSheets(
)
|
|
Removes all user style sheets.
Tags:
method removeAllXSLTStyleSheets [line 1490]
void removeAllXSLTStyleSheets(
)
|
|
Removes all XSLT style sheets.
Tags:
method renderDocumentFromByteArray [line 2667]
binary renderDocumentFromByteArray(
string
$byteArray)
|
|
Generates a PDF document or an image from an HTML or XML document inside a
byte array.
Tags:
Parameters:
method renderDocumentFromByteArrayAsArray [line 2695]
array renderDocumentFromByteArrayAsArray(
string
$byteArray)
|
|
Generates an array of byte-arrays each containing an image representing one page of the document inside a
byte array.
Tags:
Parameters:
method renderDocumentFromContent [line 2722]
binary renderDocumentFromContent(
string
$content)
|
|
Generates a PDF document or an image from an HTML or XML document inside a String.
Tags:
Parameters:
method renderDocumentFromContentAsArray [line 2749]
array renderDocumentFromContentAsArray(
string
$content)
|
|
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.
Tags:
Parameters:
method renderDocumentFromURL [line 2613]
binary renderDocumentFromURL(
string
$url)
|
|
Generates a PDF document or an image from an HTML or XML document at a URL.
Tags:
Parameters:
method renderDocumentFromURLAsArray [line 2640]
array renderDocumentFromURLAsArray(
string
$url)
|
|
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.
Tags:
Parameters:
method setAddAttachments [line 1872]
void setAddAttachments(
boolean
$value)
|
|
Enables or disables attachments specified in style sheets.
The default value is false.
Parameters:
method setAddBookmarks [line 1809]
void setAddBookmarks(
boolean
$value)
|
|
Enables or disables bookmarks in the PDF document.
The default value is false.
Parameters:
method setAddComments [line 1841]
void setAddComments(
boolean
$value)
|
|
Enables or disables comments in the PDF document.
The default value is false.
Parameters:
method setAddLinks [line 1793]
void setAddLinks(
boolean
$value)
|
|
Enables or disables links in the PDF document.
The default value is false.
Parameters:
method setAddOverprint [line 1887]
void setAddOverprint(
boolean
$value)
|
|
Enables or disables overprinting.
The default value is false.
Parameters:
method setAddPreviewImages [line 1857]
void setAddPreviewImages(
boolean
$value)
|
|
Enables or disables embedding of image previews per page in the PDF document.
The default value is false.
Parameters:
method setAddTags [line 1825]
void setAddTags(
boolean
$value)
|
|
Enables or disables tagging of PDF document.
The default value is false.
Parameters:
method setAllowAnnotations [line 1939]
void setAllowAnnotations(
boolean
$value)
|
|
Enables or disables the 'annotations' restriction in the PDF document.
The default value is false.
Tags:
Parameters:
method setAllowAssembly [line 1957]
void setAllowAssembly(
boolean
$value)
|
|
Enables or disables the 'assembly' restriction in the PDF document.
The default value is false.
Tags:
Parameters:
method setAllowCopy [line 1975]
void setAllowCopy(
boolean
$value)
|
|
Enables or disables the 'copy' restriction in the PDF document.
The default value is false.
Tags:
Parameters:
method setAllowDegradedPrinting [line 1994]
void setAllowDegradedPrinting(
boolean
$value)
|
|
Enables or disables the 'degraded printing' restriction in the PDF document.
The default value is false.
Tags:
Parameters:
method setAllowFillIn [line 2012]
void setAllowFillIn(
boolean
$value)
|
|
Enables or disables the 'fill in' restriction in the PDF document.
The default value is false.
Tags:
Parameters:
method setAllowModifyContents [line 2031]
void setAllowModifyContents(
boolean
$value)
|
|
Enables or disables the 'modify contents' restriction in the PDF document.
The default value is false.
Tags:
Parameters:
method setAllowPrinting [line 2049]
void setAllowPrinting(
boolean
$value)
|
|
Enables or disables the 'printing' restriction in the PDF document.
The default value is false.
Tags:
Parameters:
method setAllowScreenReaders [line 2068]
void setAllowScreenReaders(
boolean
$value)
|
|
Enables or disables the 'screen readers' restriction in the PDF document.
The default value is false.
Tags:
Parameters:
method setAppendLog [line 1921]
void setAppendLog(
boolean
$value)
|
|
Specifies whether or not the log data should be added to the PDF document.
The default value is false.
Parameters:
method setAuthenticationCredentials [line 1737]
void setAuthenticationCredentials(
string
$authenticationUsername, string
$authenticationPassword)
|
|
Enables access to resources that are secured via Basic or Digest authentication.
Parameters:
method setAuthor [line 1544]
void setAuthor(
string
$value)
|
|
Sets the value of the author field of the PDF document.
Parameters:
method setBaseURL [line 1244]
void setBaseURL(
string
$value)
|
|
Sets the base URL of the XML document.
To resolve relative URLs to absolute URLs a reference (base) URL is required. This reference URL is usually the system id of the document.
This method can be used to specify another reference URL. If this URL is not null then it will be used instead of the system id.
The default value is null.
Parameters:
method setBookletMode [line 2353]
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.
Parameters:
method setCacheFonts [line 1058]
void setCacheFonts(
boolean
$value)
|
|
Enables or disables caching of font information.
During the PDF creation PDFreactor requires information about fonts in the system. The process to get this information takes a long time, thus PDFreactor offers an option to cache the collected information about fonts.
A font cache can be reused by PDFreactor on every PDF creation process but only if font registration is enabled. If font registration is disabled then the font cache will be ignored. (See setDisableFontRegistration() for more information).
The default value is true.
Tags:
Parameters:
method setCleanupTool [line 1303]
method setConformance [line 2163]
method setContinuousOutput [line 2584]
void setContinuousOutput(
int
$width, int
$height)
|
|
Enables the conversion of the input document into one image.
Parameters:
method setCookie [line 1770]
void setCookie(
string
$key, string
$value)
|
|
Adds a cookie to all outgoing HTTP connections. If the key already exists, the pair is overwritten.
Parameters:
method setCreator [line 1557]
void setCreator(
string
$value)
|
|
Sets the value of creator field of the PDF document.
Parameters:
method setDefaultColorSpace [line 2182]
void setDefaultColorSpace(
$defaultColorSpace
$defaultColorSpace)
|
|
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.
COLOR_SPACE_CMYK
COLOR_SPACE_RGB
Parameters:
method setDisableFontEmbedding [line 2229]
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.
Parameters:
method setDisableFontRegistration [line 1010]
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.
Tags:
Parameters:
method setDisableSystemFonts [line 1030]
void setDisableSystemFonts(
boolean
$value)
|
|
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.
Tags:
Parameters:
method setDocumentDefaultLanguage [line 1408]
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.
Parameters:
method setDocumentType [line 1366]
method setEncoding [line 1280]
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.
Parameters:
method setEncryption [line 1667]
method setFontCachePath [line 1080]
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.
Tags:
Parameters:
method setFontDirectory [line 1091]
void setFontDirectory(
$location)
|
|
Tags:
Parameters:
method setFontFallback [line 2244]
void setFontFallback(
array
$fontArray)
|
|
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.
Parameters:
method setFullCompression [line 1683]
void setFullCompression(
boolean
$value)
|
|
Enables or disables full compression of the PDF document.
The default value is false.
Parameters:
method setHTTPSMode [line 1344]
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.
HTTPS_MODE_LENIENT
HTTPS_MODE_STRICT
The default value specified is HTTPS_MODE_STRICT.
Parameters:
method setJavaScriptMode [line 1324]
method setKeywords [line 1570]
void setKeywords(
string
$value)
|
|
Sets the value of the keywords field of the PDF document.
Parameters:
method setLicenseKey [line 988]
void setLicenseKey(
string
$content)
|
|
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.
Parameters:
method setLogExceedingContent [line 1203]
method setLogLevel [line 1170]
method setMergeBeforePDF [line 2453]
void setMergeBeforePDF(
$mergeXMLBeforePDF)
|
|
Tags:
Parameters:
method setMergeByteArray [line 2417]
void setMergeByteArray(
string
$base64string)
|
|
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
Tags:
Parameters:
method setMergeByteArrays [line 2437]
void setMergeByteArrays(
array
$byteArrays)
|
|
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.
The default value is null
Tags:
Parameters:
method setMergeMode [line 2481]
void setMergeMode(
int
$mergeMode)
|
|
Sets the merge mode.
The following merge methods can be used:
Parameters:
method setMergeURL [line 2377]
void setMergeURL(
string
$url)
|
|
This methods sets a URL of an external PDF document which will be merged with the PDF document generated by the XML source.
The default value is null
Tags:
Parameters:
method setMergeURLs [line 2396]
void setMergeURLs(
array
$urlArray)
|
|
This method sets an array of URLs of external PDF documents which will be merged with the PDF document generated by the XML source.
Tags:
Parameters:
method setOutputFormat [line 2573]
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.
Tags:
Parameters:
method setOutputIntentFromByteArray [line 2208]
void setOutputIntentFromByteArray(
string
$identifier, string
$profileData)
|
|
Sets the ouput intent including the identifier and the ICC profile to be embedded into the PDF.
Parameters:
method setOutputIntentFromURL [line 2196]
void setOutputIntentFromURL(
string
$identifier, string
$profileUrl)
|
|
Sets the ouput intent including the identifier and the ICC profile to be embedded into the PDF.
Parameters:
method setOverlayRepeat [line 2503]
void setOverlayRepeat(
int
$overlayRepeat)
|
|
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 OVERLAY_REPEAT_ constants to specify the overlay repeat. The default value is OVERLAY_REPEAT_NONE.
OVERLAY_REPEAT_NONE
OVERLAY_REPEAT_LAST_PAGE
OVERLAY_REPEAT_ALL_PAGES
Parameters:
method setOwnerPassword [line 1701]
void setOwnerPassword(
string
$value)
|
|
Sets the owner password of the PDF document.
The default value is null
Tags:
Parameters:
method setPageOrder [line 2299]
method setPagesPerSheetProperties [line 2335]
method setPixelsPerInch [line 2261]
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).
Parameters:
method setPixelsPerInchShrinkToFit [line 2274]
void setPixelsPerInchShrinkToFit(
boolean
$pixelsPerInchShrinkToFit)
|
|
Whether the pixels per inch should be adapted automatically to avoid content exceeding pages.
Parameters:
method setPostTransformationDocumentType [line 1389]
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 DOCTYPE_AUTODETECT.
Tags:
Parameters:
method setPrintDialogPrompt [line 1904]
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.
Parameters:
method setProcessingPreferences [line 2091]
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.
PROCESSING_PREFERENCES_SAVE_MEMORY_IMAGES
Parameters:
method setRequestHeader [line 1752]
void setRequestHeader(
string
$key, string
$value)
|
|
Adds a request header to all outgoing HTTP connections. If the key already exists, the pair is overwritten.
Parameters:
method setSignPDF [line 2537]
method setSubject [line 1596]
void setSubject(
string
$value)
|
|
Sets the value of the subject field of the PDF document.
Parameters:
method setThrowLicenseExceptions [line 1219]
void setThrowLicenseExceptions(
$throwLicenseExceptions)
|
|
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.
Parameters:
method setTitle [line 1583]
void setTitle(
string
$value)
|
|
Sets the value of the title field of the PDF document.
Parameters:
method setUserPassword [line 1719]
void setUserPassword(
string
$value)
|
|
Sets the user password of the PDF document.
The default value is null.
Tags:
Parameters:
method setViewerPreferences [line 2143]
method setXSLTMode [line 1262]
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.
Parameters: