PDFreactor-PHP
[ class tree: PDFreactor-PHP ] [ index: PDFreactor-PHP ] [ all elements ]

Class: PDFreactor

Source Location: /PDFreactor.class.php

Class Overview




Methods



Class Details

[line 930]


[ Top ]


Class Methods


constructor PDFreactor [line 963]

PDFreactor PDFreactor( [ $host = ""], [ $port = ""], [ $debug = false])

Constructs a new PDFreactor object.



Parameters:

   $host  
   $port  
   $debug  

[ Top ]

method addAttachment [line 1632]

void addAttachment( string $data, string $url, string $name, string $description)

Adds a file attachment to PDF document.



Parameters:

string   $data   The base64encoded binary content of the attachment. May be null.
string   $url   If data is null, the attachment will be retrieved from this URL. If this is "#" the input document URL is used instead.
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.
string   $description   The description of the attachment. If this is null the name is used.

[ Top ]

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:

string   $name   The name of the property.
string   $value   The value of the property.

[ Top ]

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:

string   $source   The URL to load the font from.
string   $family   The font family name the loaded font will be labeled as.
boolean   $bold   Whether the font will be labeled bold.
boolean   $italic   Whether the font will be labeled italic.

[ Top ]

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:

string   $source   The name of an existing font family.
string   $family   The alias name for that font.
boolean   $bold   Whether the alias will be labeled bold.
boolean   $italic   Whether the alias will be labeled italic.

[ Top ]

method addFontDirectory [line 1104]

void addFontDirectory( string $fontDirectory)

Registers an additional font directory to load fonts from.



Parameters:

string   $fontDirectory   The path of the font directory.

[ Top ]

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:

  1. Specifying the script only by an URI.
  2. 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:

string   $content   The content of the script.
string   $uri   The URI of the script.
boolean   $beforeDocumentScripts   Use true to cause PDFreactor to run the script before all scripts inside the document and false to run it after.

[ Top ]

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:

  1. Specifying the stylesheet only using an URI.
  2. 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:

string   $content   The content of the style sheet.
string   $media   The media type of the style sheet.
string   $title   The title of the stylesheet.
string   $uri   The URI of the style sheet.

[ Top ]

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:

  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.




Tags:



Parameters:

string   $content   The content of the style sheet.
string   $uri   The URI of the style sheet.

[ Top ]

method enableDebugMode [line 2596]

void enableDebugMode( )

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



[ Top ]

method getError [line 2774]

string getError( )

Returns the error messages generated during rendering.



Tags:

return:  The message string.


[ Top ]

method getExceedingContents [line 2796]

array getExceedingContents( )

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



Tags:

return:  Array of ExceedingContent objects or null if the logging of exceeding content was not enabled or no conversion was run, yet.


[ Top ]

method getLog [line 2785]

string getLog( )

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



Tags:

return:  The log string.
see:  PDFreactor::setLogLevel()


[ Top ]

method getNumberOfPages [line 2814]

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

renderDocument() renderDocumentFromByteArray() renderDocumentFromContent() renderDocumentFromURL()




Parameters:

boolean   $pdf   If true, return the number of pages of the resulting output (including, e.g. merge operations), otherwise it will return the number pages of the laid out input document.

[ Top ]

method removeAllUserScripts [line 1531]

void removeAllUserScripts( )

Removes all user scripts.



Tags:



[ Top ]

method removeAllUserStyleSheets [line 1454]

void removeAllUserStyleSheets( )

Removes all user style sheets.



Tags:

see:  addUserStyleSheets()


[ Top ]

method removeAllXSLTStyleSheets [line 1490]

void removeAllXSLTStyleSheets( )

Removes all XSLT style sheets.



Tags:



[ Top ]

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:

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

[ Top ]

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:

return:  An array of byte-arrays each containing an image representing one page of the document
see:  PDFreactor::renderDocumentFromByteArray()
see:  PDFreactor::renderDocumentFromContentAsArray()
see:  PDFreactor::renderDocumentFromURLAsArray()


Parameters:

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

[ Top ]

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:

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

[ Top ]

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:

return:  An array of byte-arrays each containing an image representing one page of the document
see:  PDFreactor::renderDocumentFromContent()
see:  PDFreactor::renderDocumentFromURLAsArray()
see:  PDFreactor::renderDocumentFromByteArrayAsArray()


Parameters:

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

[ Top ]

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:

return:  The PDF document as PDF RAW data.
see:  PDFreactor::renderDocumentFromContent()
see:  PDFreactor::renderDocumentFromByteArray()


Parameters:

string   $url   A URL pointing to the XML document.

[ Top ]

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:

return:  An array of byte-arrays each containing an image representing one page of the document
see:  PDFreactor::renderDocumentFromURL()
see:  PDFreactor::renderDocumentFromContentAsArray()
see:  PDFreactor::renderDocumentFromByteArrayAsArray()


Parameters:

string   $url   A URL pointing to the input document.

[ Top ]

method setAddAttachments [line 1872]

void setAddAttachments( boolean $value)

Enables or disables attachments specified in style sheets.

The default value is false.




Parameters:

boolean   $value   Whether to enable CSS based attachments.

[ Top ]

method setAddBookmarks [line 1809]

void setAddBookmarks( boolean $value)

Enables or disables bookmarks in the PDF document.

The default value is false.




Parameters:

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

[ Top ]

method setAddComments [line 1841]

void setAddComments( boolean $value)

Enables or disables comments in the PDF document.

The default value is false.




Parameters:

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

[ Top ]

method setAddLinks [line 1793]

void setAddLinks( boolean $value)

Enables or disables links in the PDF document.

The default value is false.




Parameters:

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

[ Top ]

method setAddOverprint [line 1887]

void setAddOverprint( boolean $value)

Enables or disables overprinting.

The default value is false.




Parameters:

boolean   $value   Whether to enable overprinting.

[ Top ]

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:

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.

[ Top ]

method setAddTags [line 1825]

void setAddTags( boolean $value)

Enables or disables tagging of PDF document.

The default value is false.




Parameters:

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

[ Top ]

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:

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

[ Top ]

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:

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

[ Top ]

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:

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

[ Top ]

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:

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

[ Top ]

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:

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

[ Top ]

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:

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

[ Top ]

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:

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

[ Top ]

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:

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

[ Top ]

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:

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

[ Top ]

method setAuthenticationCredentials [line 1737]

void setAuthenticationCredentials( string $authenticationUsername, string $authenticationPassword)

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



Parameters:

string   $authenticationUsername   The user name for the secured realm.
string   $authenticationPassword   The password for the secured realm.

[ Top ]

method setAuthor [line 1544]

void setAuthor( string $value)

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



Parameters:

string   $value   The author of the document.

[ Top ]

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:

string   $value   The base URL for the document.

[ Top ]

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:

string   $sheetSize   The size of the sheet as CSS value, e.g. A3, letter landscape, 15in 20in, 20cm 30cm.
string   $sheetMargin   The sheet margin as CSS margin, e.g. 1in, 1cm 1.5cm, 10mm 20mm 10mm 30mm. null is interpreted as 0mm.
boolean   $rtl   Whether or not the reading order of the booklet should be right-to-left .

[ Top ]

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:

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

[ Top ]

method setCleanupTool [line 1303]

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

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

CLEANUP_NONE
CLEANUP_JTIDY
CLEANUP_CYBERNEKO
CLEANUP_TAGSOUP




Parameters:

int   $value   The new cleanup tool.

[ Top ]

method setConformance [line 2163]

void setConformance( int $conformance)

Sets the conformance of the PDF.

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

CONFORMANCE_PDF
CONFORMANCE_PDFA1A
CONFORMANCE_PDFA3A




Parameters:

int   $conformance   conformance constants.

[ Top ]

method setContinuousOutput [line 2584]

void setContinuousOutput( int $width, int $height)

Enables the conversion of the input document into one image.



Parameters:

int   $width   Equivalent to the width of a browser window (view port). Values <1 enable paginated output
int   $height   Equivalent to the height of a browser window (view port). For values <1 the entire height of the document is used.

[ Top ]

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:

string   $key   The key of the cookie.
string   $value   The value of the cookie.

[ Top ]

method setCreator [line 1557]

void setCreator( string $value)

Sets the value of creator field of the PDF document.



Parameters:

string   $value   The creator of the document.

[ Top ]

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:

$defaultColorSpace   $defaultColorSpace   The default color space of the PDF

[ Top ]

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:

boolean   $disableFontEmbedding   The default value is false.

[ Top ]

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:

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

[ Top ]

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:

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

[ Top ]

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:

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

[ Top ]

method setDocumentType [line 1366]

void setDocumentType( int $value)

Sets the document type.

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

DOCTYPE_AUTODETECT
DOCTYPE_XML
DOCTYPE_XHTML
DOCTYPE_HTML5

The default value specified is DOCTYPE_AUTODETECT.




Parameters:

int   $value   The new document type setting.

[ Top ]

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:

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

[ Top ]

method setEncryption [line 1667]

void setEncryption( int $value)

Sets the encryption.

Use one of the following ENCRYPTION_ constants to specify the encryption. The default value is ENCRYPTION_NONE.

ENCRYPTION_NONE
ENCRYPTION_40
ENCRYPTION_128




Tags:



Parameters:

int   $value   The new encryption setting.

[ Top ]

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:

string   $location   The path of the font cache.

[ Top ]

method setFontDirectory [line 1091]

void setFontDirectory( $location)



Tags:

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


Parameters:

   $location  

[ Top ]

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:

array   $fontArray   An array of font family names

[ Top ]

method setFullCompression [line 1683]

void setFullCompression( boolean $value)

Enables or disables full compression of the PDF document.

The default value is false.




Parameters:

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

[ Top ]

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:

int   $value   The HTTPS mode.

[ Top ]

method setJavaScriptMode [line 1324]

void setJavaScriptMode( int $value)

Sets the JavaScript mode.

JAVASCRIPT_MODE_ENABLED
JAVASCRIPT_MODE_DISABLED
JAVASCRIPT_MODE_ENABLED_NO_LAYOUT
JAVASCRIPT_MODE_ENABLED_REAL_TIME
JAVASCRIPT_MODE_ENABLED_TIME_LAPSE

The default value specified is JAVASCRIPT_MODE_DISABLED.




Parameters:

int   $value   The JavaScript mode.

[ Top ]

method setKeywords [line 1570]

void setKeywords( string $value)

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



Parameters:

string   $value   The keywords of the document.

[ Top ]

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:

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

[ Top ]

method setLogExceedingContent [line 1203]

void setLogExceedingContent( int $logExceedingContentAnalyze, int $logExceedingContentAgainst)

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.

EXCEEDING_CONTENT_ANALYZE_NONE
EXCEEDING_CONTENT_ANALYZE_CONTENT
EXCEEDING_CONTENT_ANALYZE_CONTENT_AND_BOXES
EXCEEDING_CONTENT_ANALYZE_CONTENT_AND_STATIC_BOXES

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

EXCEEDING_CONTENT_AGAINST_NONE
EXCEEDING_CONTENT_AGAINST_PARENT
EXCEEDING_CONTENT_AGAINST_PAGE_CONTENT
EXCEEDING_CONTENT_AGAINST_PAGE_BORDERS




Parameters:

int   $logExceedingContentAnalyze   Enables logging of exceeding content and optionally of boxes.
int   $logExceedingContentAgainst   Enables logging of exceeding content either against the page edges, page content areas or containers.

[ Top ]

method setLogLevel [line 1170]

void setLogLevel( int $value)

Sets the log level.

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

LOG_LEVEL_NONE
LOG_LEVEL_FATAL
LOG_LEVEL_WARN
LOG_LEVEL_INFO
LOG_LEVEL_DEBUG
LOG_LEVEL_PERFORMANCE

The default value is LOG_LEVEL_NONE.




Tags:



Parameters:

int   $value   The new log level setting.

[ Top ]

method setMergeBeforePDF [line 2453]

void setMergeBeforePDF( $mergeXMLBeforePDF)



Tags:

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


Parameters:

   $mergeXMLBeforePDF  

[ Top ]

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:

string   $base64string   A base64encoded binary string containing the PDF RAW data.

[ Top ]

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:

array   $byteArrays   An array of base64encoded binary strings containing the PDF RAW data.

[ Top ]

method setMergeMode [line 2481]

void setMergeMode( int $mergeMode)

Sets the merge mode.

The following merge methods can be used:




Parameters:

int   $mergeMode  

The merge mode.

The default value is MERGE_MODE_APPEND.


[ Top ]

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:

string   $url   A URL of a PDF document.

[ Top ]

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:

array   $urlArray   An array of URL strings

[ Top ]

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:

int   $format   The output format. See OUTPUT_FORMAT_ constants
int   $outputWidth   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.
int   $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.

[ Top ]

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:

string   $identifier   The OutputConditionIdentifier
string   $profileData   The base64encoded binary content of the DestOutputProfile

[ Top ]

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:

string   $identifier   The OutputConditionIdentifier
string   $profileUrl   The DestOutputProfile

[ Top ]

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:

int   $overlayRepeat  

[ Top ]

method setOwnerPassword [line 1701]

void setOwnerPassword( string $value)

Sets the owner password of the PDF document.

The default value is null




Tags:



Parameters:

string   $value   The owner password.

[ Top ]

method setPageOrder [line 2299]

void setPageOrder( string $order)

Sets the page order of the direct result of the conversion.

PAGE_ORDER_EVEN
PAGE_ORDER_ODD
PAGE_ORDER_BOOKLET
PAGE_ORDER_BOOKLET_RTL




Parameters:

string   $order   A comma-separated list of page numbers and ranges is intended as parameter. Alternatively, PAGE_ORDER_ constants can be used.

[ Top ]

method setPagesPerSheetProperties [line 2335]

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

PAGES_PER_SHEET_DIRECTION_DOWN_LEFT
PAGES_PER_SHEET_DIRECTION_DOWN_RIGHT
PAGES_PER_SHEET_DIRECTION_LEFT_DOWN
PAGES_PER_SHEET_DIRECTION_LEFT_UP
PAGES_PER_SHEET_DIRECTION_RIGHT_DOWN
PAGES_PER_SHEET_DIRECTION_RIGHT_UP
PAGES_PER_SHEET_DIRECTION_UP_LEFT
PAGES_PER_SHEET_DIRECTION_UP_RIGHT




Parameters:

int   $cols   The number of columns per sheet.
int   $rows   The number of rows per sheet.
string   $sheetSize   The sheet size as CSS size, e.g. A4, letter landscape, 15in 20in, 20cm 30cm.
string   $sheetMargin   The sheet margin as CSS margin, e.g. 1in, 1cm 1.5cm, 10mm 20mm 10mm 30mm. null is interpreted as 0mm.
string   $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.
int   $direction   The direction in which the pages are ordered on a sheet.

[ Top ]

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:

int   $ppi   The default value is 96ppi.</p>

[ Top ]

method setPixelsPerInchShrinkToFit [line 2274]

void setPixelsPerInchShrinkToFit( boolean $pixelsPerInchShrinkToFit)

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



Parameters:

boolean   $pixelsPerInchShrinkToFit  

[ Top ]

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:

int   $value   The new document type setting.

[ Top ]

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:

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.

[ Top ]

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:

int   $processingPreferences   A value of ORed processing preferences flags.

[ Top ]

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:

string   $key   The key of the header.
string   $value   The value of the header.

[ Top ]

method setSignPDF [line 2537]

void setSignPDF( string $keystoreURL, $signPdfKeyAlias, string $keystorePassword, string $keystoreType, int $signingMode, string $keyAlias)

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.

KEYSTORE_TYPE_JKS
KEYSTORE_TYPE_PKCS12

Use the SIGNING_MODE_ constants to specify the signing mode.

SIGNING_MODE_SELF_SIGNED
SIGNING_MODE_VERISIGN_SIGNED
SIGNING_MODE_WINCER_SIGNED




Parameters:

string   $keystoreURL   The URL to the keystore file.
string   $keyAlias   The alias of the certificate included in the keystore to be used to sign the PDF.
string   $keystorePassword   The password of the keystore.
string   $keystoreType   The format of the keystore, i.e. pkcs12 or jks.
int   $signingMode   The mode that is used to sign the PDF, i.e. self-signed, Windows certificate or VeriSign.
   $signPdfKeyAlias  

[ Top ]

method setSubject [line 1596]

void setSubject( string $value)

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



Parameters:

string   $value   The subject of the document.

[ Top ]

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:

   $throwLicenseExceptions  

[ Top ]

method setTitle [line 1583]

void setTitle( string $value)

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



Parameters:

string   $value   The title of the document.

[ Top ]

method setUserPassword [line 1719]

void setUserPassword( string $value)

Sets the user password of the PDF document.

The default value is null.




Tags:



Parameters:

string   $value   The user password.

[ Top ]

method setViewerPreferences [line 2143]

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.

VIEWER_PREFERENCES_CENTER_WINDOW
VIEWER_PREFERENCES_DIRECTION_L2R
VIEWER_PREFERENCES_DIRECTION_R2L
VIEWER_PREFERENCES_DISPLAY_DOC_TITLE
VIEWER_PREFERENCES_DUPLEX_FLIP_LONG_EDGE
VIEWER_PREFERENCES_DUPLEX_FLIP_SHORT_EDGE
VIEWER_PREFERENCES_DUPLEX_SIMPLEX
VIEWER_PREFERENCES_FIT_WINDOW
VIEWER_PREFERENCES_HIDE_MENUBAR
VIEWER_PREFERENCES_HIDE_TOOLBAR
VIEWER_PREFERENCES_HIDE_WINDOW_UI
VIEWER_PREFERENCES_NON_FULLSCREEN_PAGE_MODE_USE_NONE
VIEWER_PREFERENCES_NON_FULLSCREEN_PAGE_MODE_USE_OC
VIEWER_PREFERENCES_NON_FULLSCREEN_PAGE_MODE_USE_OUTLINES
VIEWER_PREFERENCES_NON_FULLSCREEN_PAGE_MODE_USE_THUMBS
VIEWER_PREFERENCES_PAGE_LAYOUT_ONE_COLUMN
VIEWER_PREFERENCES_PAGE_LAYOUT_SINGLE_PAGE
VIEWER_PREFERENCES_PAGE_LAYOUT_TWO_COLUMN_LEFT
VIEWER_PREFERENCES_PAGE_LAYOUT_TWO_COLUMN_RIGHT
VIEWER_PREFERENCES_PAGE_LAYOUT_TWO_PAGE_LEFT
VIEWER_PREFERENCES_PAGE_LAYOUT_TWO_PAGE_RIGHT
VIEWER_PREFERENCES_PAGE_MODE_FULLSCREEN
VIEWER_PREFERENCES_PAGE_MODE_USE_NONE
VIEWER_PREFERENCES_PAGE_MODE_USE_OC
VIEWER_PREFERENCES_PAGE_MODE_USE_OUTLINES
VIEWER_PREFERENCES_PAGE_MODE_USE_THUMBS
VIEWER_PREFERENCES_PICKTRAYBYPDFSIZE_FALSE
VIEWER_PREFERENCES_PICKTRAYBYPDFSIZE_TRUE
VIEWER_PREFERENCES_PRINTSCALING_APPDEFAULT
VIEWER_PREFERENCES_PRINTSCALING_NONE




Parameters:

int   $viewerPreferences   A value of ORed VIEWER_PREFERENCES_ constants.

[ Top ]

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:

boolean   $value   The new XSLT mode.

[ Top ]


Documentation generated on Tue, 01 Jul 2014 14:42:56 +0200 by phpDocumentor 1.4.3