diff --git a/src/Processor/Api/PDFreactor.class.php b/src/Processor/Api/PDFreactor.class.php index b26bbf6..9ee6428 100644 --- a/src/Processor/Api/PDFreactor.class.php +++ b/src/Processor/Api/PDFreactor.class.php @@ -1,47 +1,53 @@ url = $url; if ($url == null) { - $this->url = 'http://localhost:9423/service/rest'; + $this->url = "http://localhost:9423/service/rest"; } - if (substr($this->url, -1) == '/') { + if (substr($this->url, -1) == "/") { $this->url = substr($this->url, 0, -1); } $this->apiKey = null; @@ -49,24 +55,20 @@ public function __construct($url = null) /** * Converts the specified configuration into PDF or image and returns the generated PDF or image. - * + * @param Configuration $configuration The configuration object. * @param array $connectionSettings The connection settings object. - * * @return Result The result object containing the converted document and metadata. - * * @throws PDFreactorWebserviceException If an issue occurred while attempting to connect to the service. */ - public function convert($config, &$connectionSettings = null) - { + public function convert($config, &$connectionSettings = null) { $this->prepareConfiguration($config); - try { $responseData = $this->createConnectionWithData('convert.json', $connectionSettings, false, false, false, false, $config); - $status = $responseData['status']; + $status = $responseData["status"]; if ($status == null || $status <= 0) { - throw $this->createAnonymousClientException($responseData['error']); + throw $this->createAnonymousClientException($responseData["error"]); } - if ($responseData['errorMode']) { + if ($responseData["errorMode"]) { switch ($status) { case 422: throw $this->createServerException($responseData); @@ -86,43 +88,37 @@ public function convert($config, &$connectionSettings = null) throw $this->createAnonymousServerException($status); } } - - return json_decode($responseData['data']); + return json_decode($responseData["data"]); } catch (Exception $e) { if ($e instanceof PDFreactorWebserviceException) { throw $e; } - throw $this->createAnonymousClientException($e->message, $e); } } - /** * Converts the specified configuration into PDF or image. Writes the result in the specified stream. If no stream is specified, returns the result instead. - * + * @param Configuration $configuration The configuration object. + * @param resource $wh The stream to write into. * @param array $connectionSettings The connection settings object. - * * @return byte[]|void The converted document as binary data. No data is returned if a stream parameter was specified. - * * @throws PDFreactorWebserviceException If an issue occurred while attempting to connect to the service. */ - public function convertAsBinary($config, &$writeHandle = null, &$connectionSettings = null) - { + public function convertAsBinary($config, &$writeHandle = null, &$connectionSettings = null) { $this->prepareConfiguration($config); $useStream = true; - if ($writeHandle == null || is_array($writeHandle)) { + if ($writeHandle == NULL || is_array ($writeHandle)) { $connectionSettings = $writeHandle; $writeHandle = null; $useStream = false; } - try { $responseData = $this->createConnectionWithData('convert.bin', $connectionSettings, true, false, false, false, $config, $writeHandle); - $status = $responseData['status']; + $status = $responseData["status"]; if ($status == null || $status <= 0) { - throw $this->createAnonymousClientException($responseData['error']); + throw $this->createAnonymousClientException($responseData["error"]); } - if ($responseData['errorMode']) { + if ($responseData["errorMode"]) { switch ($status) { case 422: throw $this->createServerException($responseData); @@ -143,37 +139,31 @@ public function convertAsBinary($config, &$writeHandle = null, &$connectionSetti } } if (!$useStream) { - return $responseData['data']; + return $responseData["data"]; } } catch (Exception $e) { if ($e instanceof PDFreactorWebserviceException) { throw $e; } - throw $this->createAnonymousClientException($e->message, $e); } } - /** * Converts the specified configuration into PDF or image. This operation responds immediately and does not wait for the conversion to finish. This is especially useful for very large or complex documents where the conversion will take some time. - * + * @param Configuration $configuration The configuration object. * @param array $connectionSettings The connection settings object. - * * @return Result A URL to determine the progress of the conversion is contained in the 'Location' response header. - * * @throws PDFreactorWebserviceException If an issue occurred while attempting to connect to the service. */ - public function convertAsync($config, &$connectionSettings = null) - { + public function convertAsync($config, &$connectionSettings = null) { $this->prepareConfiguration($config); - try { $responseData = $this->createConnectionWithData('convert/async.json', $connectionSettings, false, false, false, true, $config); - $status = $responseData['status']; + $status = $responseData["status"]; if ($status == null || $status <= 0) { - throw $this->createAnonymousClientException($responseData['error']); + throw $this->createAnonymousClientException($responseData["error"]); } - if ($responseData['errorMode']) { + if ($responseData["errorMode"]) { switch ($status) { case 422: throw $this->createServerException($responseData); @@ -193,40 +183,32 @@ public function convertAsync($config, &$connectionSettings = null) throw $this->createAnonymousServerException($status); } } - - return $responseData['documentId']; + return $responseData["documentId"]; } catch (Exception $e) { if ($e instanceof PDFreactorWebserviceException) { throw $e; } - throw $this->createAnonymousClientException($e->message, $e); } } - /** * Converts the specified configuration into PDF or image. Writes the result in the specified stream. If no stream is specified, returns the result instead. - * * @param string $documentId The document ID. * @param array $connectionSettings The connection settings object. - * * @return Progress The progress object containing information about the progress of the document conversion. When the conversion is finished, a URL to download the conversion result is contained in the 'Location' response header. - * * @throws PDFreactorWebserviceException If an issue occurred while attempting to connect to the service. */ - public function getProgress($documentId, &$connectionSettings = null) - { + public function getProgress($documentId, &$connectionSettings = null) { if (is_null($documentId)) { - throw new ClientException('No conversion was triggered.'); + throw new ClientException("No conversion was triggered."); } - try { $responseData = $this->createConnection("progress/{$documentId}.json", $connectionSettings, false, false, false, false); - $status = $responseData['status']; + $status = $responseData["status"]; if ($status == null || $status <= 0) { - throw $this->createAnonymousClientException($responseData['error']); + throw $this->createAnonymousClientException($responseData["error"]); } - if ($responseData['errorMode']) { + if ($responseData["errorMode"]) { switch ($status) { case 422: throw $this->createServerException($responseData); @@ -242,40 +224,32 @@ public function getProgress($documentId, &$connectionSettings = null) throw $this->createAnonymousServerException($status); } } - - return json_decode($responseData['data']); + return json_decode($responseData["data"]); } catch (Exception $e) { if ($e instanceof PDFreactorWebserviceException) { throw $e; } - throw $this->createAnonymousClientException($e->message, $e); } } - /** * Retrieves the asynchronously converted document with the given ID. - * * @param string $documentId The document ID. * @param array $connectionSettings The connection settings object. - * * @return Result The result object containing the converted document and metadata. - * * @throws PDFreactorWebserviceException If an issue occurred while attempting to connect to the service. */ - public function getDocument($documentId, &$connectionSettings = null) - { + public function getDocument($documentId, &$connectionSettings = null) { if (is_null($documentId)) { - throw new ClientException('No conversion was triggered.'); + throw new ClientException("No conversion was triggered."); } - try { $responseData = $this->createConnection("document/{$documentId}.json", $connectionSettings, false, false, false, false); - $status = $responseData['status']; + $status = $responseData["status"]; if ($status == null || $status <= 0) { - throw $this->createAnonymousClientException($responseData['error']); + throw $this->createAnonymousClientException($responseData["error"]); } - if ($responseData['errorMode']) { + if ($responseData["errorMode"]) { switch ($status) { case 422: throw $this->createServerException($responseData); @@ -291,45 +265,39 @@ public function getDocument($documentId, &$connectionSettings = null) throw $this->createAnonymousServerException($status); } } - - return json_decode($responseData['data']); + return json_decode($responseData["data"]); } catch (Exception $e) { if ($e instanceof PDFreactorWebserviceException) { throw $e; } - throw $this->createAnonymousClientException($e->message, $e); } } - /** * Retrieves the asynchronously converted document with the given ID. Writes the result in the specified stream. If no stream is specified, returns the result instead. - * + * @param Configuration $configuration The configuration object. + * @param resource $wh The stream to write into. * @param array $connectionSettings The connection settings object. - * * @return byte[]|void The converted document as binary data. No data is returned if a stream parameter was specified. - * * @throws PDFreactorWebserviceException If an issue occurred while attempting to connect to the service. */ - public function getDocumentAsBinary($documentId, &$writeHandle = null, &$connectionSettings = null) - { + public function getDocumentAsBinary($documentId, &$writeHandle = null, &$connectionSettings = null) { if (is_null($documentId)) { - throw new ClientException('No conversion was triggered.'); + throw new ClientException("No conversion was triggered."); } $useStream = true; - if ($writeHandle == null || is_array($writeHandle)) { + if ($writeHandle == NULL || is_array ($writeHandle)) { $connectionSettings = $writeHandle; $writeHandle = null; $useStream = false; } - try { $responseData = $this->createConnection("document/{$documentId}.bin", $connectionSettings, true, false, false, false, $writeHandle); - $status = $responseData['status']; + $status = $responseData["status"]; if ($status == null || $status <= 0) { - throw $this->createAnonymousClientException($responseData['error']); + throw $this->createAnonymousClientException($responseData["error"]); } - if ($responseData['errorMode']) { + if ($responseData["errorMode"]) { switch ($status) { case 422: throw $this->createServerException($responseData); @@ -346,40 +314,33 @@ public function getDocumentAsBinary($documentId, &$writeHandle = null, &$connect } } if (!$useStream) { - return $responseData['data']; + return $responseData["data"]; } } catch (Exception $e) { if ($e instanceof PDFreactorWebserviceException) { throw $e; } - throw $this->createAnonymousClientException($e->message, $e); } } - /** * Retrieves the metadata of the asynchronously converted document with the given ID. - * * @param string $documentId The document ID. * @param array $connectionSettings The connection settings object. - * * @return Result The result object containing the converted document and metadata. - * * @throws PDFreactorWebserviceException If an issue occurred while attempting to connect to the service. */ - public function getDocumentMetadata($documentId, &$connectionSettings = null) - { + public function getDocumentMetadata($documentId, &$connectionSettings = null) { if (is_null($documentId)) { - throw new ClientException('No conversion was triggered.'); + throw new ClientException("No conversion was triggered."); } - try { $responseData = $this->createConnection("document/metadata/{$documentId}.json", $connectionSettings, false, false, false, false); - $status = $responseData['status']; + $status = $responseData["status"]; if ($status == null || $status <= 0) { - throw $this->createAnonymousClientException($responseData['error']); + throw $this->createAnonymousClientException($responseData["error"]); } - if ($responseData['errorMode']) { + if ($responseData["errorMode"]) { switch ($status) { case 422: throw $this->createServerException($responseData); @@ -395,36 +356,29 @@ public function getDocumentMetadata($documentId, &$connectionSettings = null) throw $this->createAnonymousServerException($status); } } - - return json_decode($responseData['data']); + return json_decode($responseData["data"]); } catch (Exception $e) { if ($e instanceof PDFreactorWebserviceException) { throw $e; } - throw $this->createAnonymousClientException($e->message, $e); } } - /** * Converts the specified asset package into PDF or image and returns the generated PDF or image. - * * @param resource $assetPackage The input stream for the Asset Package. * @param array $connectionSettings The connection settings object. - * * @return Result The result object containing the converted document and metadata. - * * @throws PDFreactorWebserviceException If an issue occurred while attempting to connect to the service. */ - public function convertAssetPackage(&$assetPackage, &$connectionSettings = null) - { + public function convertAssetPackage(&$assetPackage, &$connectionSettings = null) { try { $responseData = $this->createConnectionWithData('convert.json', $connectionSettings, false, true, false, false, $assetPackage); - $status = $responseData['status']; + $status = $responseData["status"]; if ($status == null || $status <= 0) { - throw $this->createAnonymousClientException($responseData['error']); + throw $this->createAnonymousClientException($responseData["error"]); } - if ($responseData['errorMode']) { + if ($responseData["errorMode"]) { switch ($status) { case 422: throw $this->createServerException($responseData); @@ -444,43 +398,36 @@ public function convertAssetPackage(&$assetPackage, &$connectionSettings = null) throw $this->createAnonymousServerException($status); } } - - return json_decode($responseData['data']); + return json_decode($responseData["data"]); } catch (Exception $e) { if ($e instanceof PDFreactorWebserviceException) { throw $e; } - throw $this->createAnonymousClientException($e->message, $e); } } - /** * Converts the specified asset package into PDF or image. Writes the result in the specified stream. If no stream is specified, returns the result instead. - * * @param resource $assetPackage The input stream for the Asset Package. + * @param resource $wh The stream to write into. * @param array $connectionSettings The connection settings object. - * * @return byte[]|void The converted document as binary data. No data is returned if a stream parameter was specified. - * * @throws PDFreactorWebserviceException If an issue occurred while attempting to connect to the service. */ - public function convertAssetPackageAsBinary(&$assetPackage, &$writeHandle = null, &$connectionSettings = null) - { + public function convertAssetPackageAsBinary(&$assetPackage, &$writeHandle = null, &$connectionSettings = null) { $useStream = true; - if ($writeHandle == null || is_array($writeHandle)) { + if ($writeHandle == NULL || is_array ($writeHandle)) { $connectionSettings = $writeHandle; $writeHandle = null; $useStream = false; } - try { $responseData = $this->createConnectionWithData('convert.bin', $connectionSettings, true, true, false, false, $assetPackage, $writeHandle); - $status = $responseData['status']; + $status = $responseData["status"]; if ($status == null || $status <= 0) { - throw $this->createAnonymousClientException($responseData['error']); + throw $this->createAnonymousClientException($responseData["error"]); } - if ($responseData['errorMode']) { + if ($responseData["errorMode"]) { switch ($status) { case 422: throw $this->createServerException($responseData); @@ -501,36 +448,31 @@ public function convertAssetPackageAsBinary(&$assetPackage, &$writeHandle = null } } if (!$useStream) { - return $responseData['data']; + return $responseData["data"]; } } catch (Exception $e) { if ($e instanceof PDFreactorWebserviceException) { throw $e; } - throw $this->createAnonymousClientException($e->message, $e); } } - /** * Converts the specified asset package into PDF or image. This operation responds immediately and does not wait for the conversion to finish. This is especially useful for very large or complex documents where the conversion will take some time. - * * @param resource $assetPackage The input stream for the Asset Package. + * @param resource $wh The stream to write into. * @param array $connectionSettings The connection settings object. - * * @return documentId A URL to determine the progress of the conversion is contained in the 'Location' response header. - * * @throws PDFreactorWebserviceException If an issue occurred while attempting to connect to the service. */ - public function convertAssetPackageAsync(&$assetPackage, &$connectionSettings = null) - { + public function convertAssetPackageAsync(&$assetPackage, &$connectionSettings = null) { try { $responseData = $this->createConnectionWithData('convert/async.json', $connectionSettings, false, true, false, true, $assetPackage); - $status = $responseData['status']; + $status = $responseData["status"]; if ($status == null || $status <= 0) { - throw $this->createAnonymousClientException($responseData['error']); + throw $this->createAnonymousClientException($responseData["error"]); } - if ($responseData['errorMode']) { + if ($responseData["errorMode"]) { switch ($status) { case 422: throw $this->createServerException($responseData); @@ -550,47 +492,40 @@ public function convertAssetPackageAsync(&$assetPackage, &$connectionSettings = throw $this->createAnonymousServerException($status); } } - - return $responseData['documentId']; + return $responseData["documentId"]; } catch (Exception $e) { if ($e instanceof PDFreactorWebserviceException) { throw $e; } - throw $this->createAnonymousClientException($e->message, $e); } } - /** * Retrieves the asynchronously converted page of a multi-image with the given ID and page number. Writes the result in the specified stream. If no stream is specified, returns the result instead. - * * @param string $documentId The document ID. * @param int $pageNumber The page number. + * @param resource $wh The stream to write into. * @param array $connectionSettings The connection settings object. - * * @return byte[]|void The converted document as binary data. No data is returned if a stream parameter was specified. - * * @throws PDFreactorWebserviceException If an issue occurred while attempting to connect to the service. */ - public function getDocumentPageAsBinary($documentId, $pageNumber, &$writeHandle = null, &$connectionSettings = null) - { + public function getDocumentPageAsBinary($documentId, $pageNumber, &$writeHandle = null, &$connectionSettings = null) { if (is_null($documentId)) { - throw new ClientException('No conversion was triggered.'); + throw new ClientException("No conversion was triggered."); } $useStream = true; - if ($writeHandle == null || is_array($writeHandle)) { + if ($writeHandle == NULL || is_array ($writeHandle)) { $connectionSettings = $writeHandle; $writeHandle = null; $useStream = false; } - try { $responseData = $this->createConnection("document/{$documentId}/{$pageNumber}.bin", $connectionSettings, true, false, false, false, $writeHandle); - $status = $responseData['status']; + $status = $responseData["status"]; if ($status == null || $status <= 0) { - throw $this->createAnonymousClientException($responseData['error']); + throw $this->createAnonymousClientException($responseData["error"]); } - if ($responseData['errorMode']) { + if ($responseData["errorMode"]) { switch ($status) { case 422: throw $this->createServerException($responseData); @@ -609,38 +544,32 @@ public function getDocumentPageAsBinary($documentId, $pageNumber, &$writeHandle } } if (!$useStream) { - return $responseData['data']; + return $responseData["data"]; } } catch (Exception $e) { if ($e instanceof PDFreactorWebserviceException) { throw $e; } - throw $this->createAnonymousClientException($e->message, $e); } } - /** * Deletes the asynchronously converted document with the given ID. If the conversion is still running, it gets terminated. - * * @param string $documentId The document ID. * @param array $connectionSettings The connection settings object. - * * @throws PDFreactorWebserviceException If an issue occurred while attempting to connect to the service. */ - public function deleteDocument($documentId, &$connectionSettings = null) - { + public function deleteDocument($documentId, &$connectionSettings = null) { if (is_null($documentId)) { - throw new ClientException('No conversion was triggered.'); + throw new ClientException("No conversion was triggered."); } - try { $responseData = $this->createConnection("document/{$documentId}.json", $connectionSettings, false, false, true, false); - $status = $responseData['status']; + $status = $responseData["status"]; if ($status == null || $status <= 0) { - throw $this->createAnonymousClientException($responseData['error']); + throw $this->createAnonymousClientException($responseData["error"]); } - if ($responseData['errorMode']) { + if ($responseData["errorMode"]) { switch ($status) { case 404: throw $this->createServerException($responseData, PDFreactor::ERROR_404); @@ -658,29 +587,23 @@ public function deleteDocument($documentId, &$connectionSettings = null) if ($e instanceof PDFreactorWebserviceException) { throw $e; } - throw $this->createAnonymousClientException($e->message, $e); } } - /** * Returns the version of the PDFreactor Web Service that is currently running. - * * @param array $connectionSettings The connection settings object. - * * @return Version The version object. - * * @throws PDFreactorWebserviceException If an issue occurred while attempting to connect to the service. */ - public function getVersion(&$connectionSettings = null) - { + public function getVersion(&$connectionSettings = null) { try { $responseData = $this->createConnection('version.json', $connectionSettings, false, false, false, false); - $status = $responseData['status']; + $status = $responseData["status"]; if ($status == null || $status <= 0) { - throw $this->createAnonymousClientException($responseData['error']); + throw $this->createAnonymousClientException($responseData["error"]); } - if ($responseData['errorMode']) { + if ($responseData["errorMode"]) { switch ($status) { case 401: throw $this->createServerException($responseData, PDFreactor::ERROR_401); @@ -692,33 +615,27 @@ public function getVersion(&$connectionSettings = null) throw $this->createAnonymousServerException($status); } } - - return json_decode($responseData['data']); + return json_decode($responseData["data"]); } catch (Exception $e) { if ($e instanceof PDFreactorWebserviceException) { throw $e; } - throw $this->createAnonymousClientException($e->message, $e); } } - /** * Checks if the PDFreactor Web Service is available and functional. - * * @param array $connectionSettings The connection settings object. - * * @throws PDFreactorWebserviceException If an issue occurred while attempting to connect to the service. */ - public function getStatus(&$connectionSettings = null) - { + public function getStatus(&$connectionSettings = null) { try { $responseData = $this->createConnection('status.json', $connectionSettings, false, false, false, false); - $status = $responseData['status']; + $status = $responseData["status"]; if ($status == null || $status <= 0) { - throw $this->createAnonymousClientException($responseData['error']); + throw $this->createAnonymousClientException($responseData["error"]); } - if ($responseData['errorMode']) { + if ($responseData["errorMode"]) { switch ($status) { case 401: throw $this->createServerException($responseData, PDFreactor::ERROR_401); @@ -734,106 +651,85 @@ public function getStatus(&$connectionSettings = null) if ($e instanceof PDFreactorWebserviceException) { throw $e; } - throw $this->createAnonymousClientException($e->message, $e); } } - /** * Returns the URL where the document with the given ID can be accessed. - * * @param string $documentId The document ID. * @param int $pageNumber The page number. - * * @return string The document URL. */ - public function getDocumentUrl($documentId, $pageNumber = null) - { + function getDocumentUrl($documentId, $pageNumber = null) { if (!is_null($documentId)) { if (!is_null($pageNumber)) { return "{$this->url}/document/{$documentId}/{$pageNumber}"; } - return "{$this->url}/document/{$documentId}"; } - return null; } - /** * Returns the URL where the progress of the document with the given ID can be accessed. - * * @param string $documentId The document ID. - * * @return string The progress URL. */ - public function getProgressUrl($documentId) - { + function getProgressUrl($documentId) { if (!is_null($documentId)) { return "{$this->url}/progress/{$documentId}"; } - return null; } - - public const VERSION = '12.0.0'; - + public const VERSION = 12; //"12.0.0"; /** * The API key. Only required if the PDFreactor Web Service is so configured that only clients with a valid API key can access it. */ - public function __get($name) - { - if ($name == 'apiKey') { + public function __get($name) { + if ($name == "apiKey") { return $this->apiKey; } } - private function prepareConfiguration(&$config) - { + private function prepareConfiguration(&$config) { if (!is_null($config)) { - $config['clientName'] = 'PHP'; + $config['clientName'] = "PHP"; $config['clientVersion'] = PDFreactor::VERSION; } } - - private function createConnection($path, &$connectionSettings = null, $textError = false, $zip = false, $delete = false, $async = false, &$wh = null) - { + private function createConnection($path, &$connectionSettings = null, $textError = false, $zip = false, $delete = false, $async = false, &$wh = null) { $emptyPayload = []; - return $this->createConnectionWithData($path, $connectionSettings, $textError, $zip, $delete, $async, $emptyPayload, $wh); } - - private function createConnectionWithData($path, &$connectionSettings = null, $textError = false, $zip = false, $delete = false, $async = false, &$payload = null, &$wh = null) - { - $url = $this->url . '/' . $path; - $input = (bool)$payload; + private function createConnectionWithData($path, &$connectionSettings = null, $textError = false, $zip = false, $delete = false, $async = false, &$payload = null, &$wh = null) { + $url = $this->url . "/" . $path; + $input = !!$payload; $useStream = $wh != null; if (!is_null($this->apiKey)) { - $url .= '?apiKey=' . $this->apiKey; + $url .= "?apiKey=" . $this->apiKey; } $headers = []; - $headers[] = 'User-Agent: PDFreactor PHP API v' . PDFreactor::VERSION; - $headers[] = 'X-RO-User-Agent: PDFreactor PHP API v' . PDFreactor::VERSION; + $headers[] = "User-Agent: PDFreactor PHP API v" . PDFreactor::VERSION; + $headers[] = "X-RO-User-Agent: PDFreactor PHP API v" . PDFreactor::VERSION; $cookieStr = ''; if (!empty($connectionSettings) && !empty($connectionSettings['headers'])) { foreach ($connectionSettings['headers'] as $name => $value) { $lcName = strtolower($name); - if ($lcName !== 'content-type' && $lcName !== 'content-length' && $lcName !== 'range') { - $headers[] = $name . ': ' . $value; + if ($lcName !== "content-type" && $lcName !== "content-length" && $lcName !== "range") { + $headers[] = $name . ": " . $value; } } } if (!empty($connectionSettings) && !empty($connectionSettings['cookies'])) { foreach ($connectionSettings['cookies'] as $name => $value) { - $cookieStr .= $name . '=' . $value . '; '; + $cookieStr .= $name . "=" . $value . "; "; } } if ($input) { - $headers[] = 'Content-Type: ' . ($zip ? 'application/zip' : 'application/json'); + $headers[] = "Content-Type: " . ($zip ? "application/zip" : "application/json"); } if (!empty($connectionSettings) || !empty($cookieStr)) { - $headers[] = 'Cookie: ' . substr($cookieStr, 0, -2); + $headers[] = "Cookie: " . substr($cookieStr, 0, -2); } $curl = curl_init($url); $responseHeaders = []; @@ -848,36 +744,34 @@ private function createConnectionWithData($path, &$connectionSettings = null, $t } curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_URL, $url); - curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $delete ? 'DELETE' : ($input ? 'POST' : 'GET')); + curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $delete ? "DELETE" : ($input ? "POST" : "GET")); curl_setopt($curl, CURLOPT_TIMEOUT, 300); curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); curl_setopt($curl, CURLINFO_HEADER_OUT, true); - curl_setopt($curl, CURLOPT_HEADERFUNCTION, function ($curl, $header) use (&$responseHeaders) { + curl_setopt($curl, CURLOPT_HEADERFUNCTION, function($curl, $header) use (&$responseHeaders) { $len = strlen($header); $header = explode(':', $header, 2); if (count($header) < 2) { // ignore invalid headers return $len; } $responseHeaders[] = [ trim($header[0]), trim($header[1]) ]; - return $len; }); $error = null; $result = null; $errorMode = true; - curl_setopt($curl, CURLOPT_WRITEFUNCTION, function ($curl, $data) use (&$wh, &$useStream, &$result) { + curl_setopt($curl, CURLOPT_WRITEFUNCTION, function($curl, $data) use(&$wh, &$useStream, &$result) { if ($wh != null && $useStream) { fwrite($wh, $data); } else { $result .= $data; } - return strlen($data); }); $response = curl_exec($curl); $info = curl_getinfo($curl); $error = curl_error($curl); - $status = $info['http_code']; + $status = $info["http_code"]; if ($status >= 200 && $status <= 204) { $errorMode = false; } @@ -886,7 +780,7 @@ private function createConnectionWithData($path, &$connectionSettings = null, $t if ($errorMode) { foreach ($responseHeaders as $header) { $headerName = $header[0]; - if ($headerName == 'X-RO-Error-ID') { + if ($headerName == "X-RO-Error-ID") { $errorId = $header[1]; } } @@ -894,10 +788,10 @@ private function createConnectionWithData($path, &$connectionSettings = null, $t if ($async) { foreach ($responseHeaders as $header) { $headerName = $header[0]; - if (strtolower($headerName) == 'location') { - $documentId = trim(substr($header[1], strrpos($header[1], '/') + 1)); + if (strtolower($headerName) == "location") { + $documentId = trim(substr($header[1], strrpos($header[1], "/") + 1)); } - if (strtolower($headerName) == 'set-cookie') { + if (strtolower($headerName) == "set-cookie") { $keepDocument = false; if (isset($config->{'keepDocument'})) { $keepDocument = $config->{'keepDocument'}; @@ -921,103 +815,88 @@ private function createConnectionWithData($path, &$connectionSettings = null, $t } curl_close($curl); if ($errorMode && empty($error)) { - if ($status == null || $status <= 0) { - $error = 'Could not connect to server.'; - } elseif ($textError && !empty($result)) { + if ($status == NULL || $status <= 0) { + $error = "Could not connect to server."; + } else if ($textError && !empty($result)) { $error = $result; } } - return [ - 'errorMode' => $errorMode, - 'error' => $error, - 'errorId' => $errorId, - 'data' => $error == null || !$textError ? $result : null, - 'status' => $status, - 'documentId' => $documentId, - 'info' => $info, + "errorMode" => $errorMode, + "error" => $error, + "errorId" => $errorId, + "data" => $error == NULL || !$textError ? $result : NULL, + "status" => $status, + "documentId" => $documentId, + "info" => $info ]; } - - private function createServerException(&$responseData, $clientMessage = null) - { - $serverMessage = null; - $result = null; - $errorId = ''; - - if ($responseData != null) { - $serverMessage = $responseData['error']; - $result = $responseData['data'] != null ? json_decode($responseData['data']) : null; - $errorId = $responseData['errorId']; + private function createServerException(&$responseData, $clientMessage = NULL) { + $serverMessage = NULL; + $result = NULL; + $errorId = ""; + + if ($responseData != NULL) { + $serverMessage = $responseData["error"]; + $result = $responseData["data"] != null ? json_decode($responseData["data"]) : NULL; + $errorId = $responseData["errorId"]; } switch ($errorId) { - case 'asyncUnavailable': + case "asyncUnavailable": return new AsyncUnavailableException($errorId, $clientMessage, $serverMessage, $result); - case 'badRequest': + case "badRequest": return new BadRequestException($errorId, $clientMessage, $serverMessage, $result); - case 'conversionAborted': + case "conversionAborted": return new ConversionAbortedException($errorId, $clientMessage, $serverMessage, $result); - case 'conversionFailure': + case "conversionFailure": return new ConversionFailureException($errorId, $clientMessage, $serverMessage, $result); - case 'documentNotFound': + case "documentNotFound": return new DocumentNotFoundException($errorId, $clientMessage, $serverMessage, $result); - case 'invalidClient': + case "invalidClient": return new InvalidClientException($errorId, $clientMessage, $serverMessage, $result); - case 'invalidConfiguration': + case "invalidConfiguration": return new InvalidConfigurationException($errorId, $clientMessage, $serverMessage, $result); - case 'noConfiguration': + case "noConfiguration": return new NoConfigurationException($errorId, $clientMessage, $serverMessage, $result); - case 'noInputDocument': + case "noInputDocument": return new NoInputDocumentException($errorId, $clientMessage, $serverMessage, $result); - case 'notAcceptable': + case "notAcceptable": return new NotAcceptableException($errorId, $clientMessage, $serverMessage, $result); - case 'serviceUnavailable': + case "serviceUnavailable": return new ServiceUnavailableException($errorId, $clientMessage, $serverMessage, $result); - case 'unauthorized': + case "unauthorized": return new UnauthorizedException($errorId, $clientMessage, $serverMessage, $result); - case 'unprocessableConfiguration': + case "unprocessableConfiguration": return new UnprocessableConfigurationException($errorId, $clientMessage, $serverMessage, $result); - case 'unprocessableInput': + case "unprocessableInput": return new UnprocessableInputException($errorId, $clientMessage, $serverMessage, $result); default: return new ServerException($errorId, $serverMessage, $result); } } - - private function createAnonymousServerException($status) - { - return new ServerException(null, "PDFreactor Web Service error (status {$status})."); + private function createAnonymousServerException($status) { + return new ServerException(NULL, "PDFreactor Web Service error (status {$status})."); } - - private function createAnonymousClientException($message, $exception = null) - { + private function createAnonymousClientException($message, $exception = null) { return new UnreachableServiceException("Error connecting to PDFreactor Web Service at {$this->url}. Please make sure the PDFreactor Web Service is installed and running (Error: {$message})", $exception); } - - private function createUnknownException($exception) - { + private function createUnknownException($exception) { return new PDFreactorWebserviceException("Unknown PDFreactor Web Service error (Error: {$exception->message})", $exception); } } /** * This type of exception is thrown by the PDFreactor Web Service client. It has several sub classes, all indicating different issues. To react to specific problems, it is recommended to catch appropriate sub class exceptions. - * * @see ClientException * @see ServerException */ -class PDFreactorWebserviceException extends \Exception -{ - public $result; - - public function __construct($message) - { - parent::__construct($message == null ? 'Unknown PDFreactor Web Service error' : $message); +class PDFreactorWebserviceException extends \Exception { + var $result; + function __construct($message) { + parent::__construct($message == null ? "Unknown PDFreactor Web Service error" : $message); } - - public function __get($property) - { + public function __get($property) { if (property_exists($this, $property)) { return $this->$property; } @@ -1025,7 +904,6 @@ public function __get($property) } /** * This type of exception is produced by the PDFreactor Web Service and indicates that the conversion could not be processed for some reason. Exceptions of this class mean that the PDFreactor Web Service is running. Please note that the client requires the 'X-RO-Error-ID' HTTP header to be present to convert the exception in the appropriate type. If that header is missing, exceptions will have this generic type instead. - * * @see AsyncUnavailableException * @see BadRequestException * @see ConversionAbortedException @@ -1041,48 +919,38 @@ public function __get($property) * @see UnprocessableConfigurationException * @see UnprocessableInputException */ -class ServerException extends PDFreactorWebserviceException -{ - public $result; - - public $errorId; - - public function __construct($errorId = null, $clientMessage = null, $serverMessage = null, $result = null) - { +class ServerException extends PDFreactorWebserviceException { + var $result; + var $errorId; + function __construct($errorId = null, $clientMessage = null, $serverMessage = null, $result = null) { $this->result = $result; $this->errorId = $errorId; $messages = []; - if ($serverMessage == null && $result != null) { + if ($serverMessage == NULL && $result != NULL) { $serverMessage = $result->error; } - if ($clientMessage != null) { + if ($clientMessage != NULL) { array_push($messages, $clientMessage); } - if ($serverMessage != null) { + if ($serverMessage != NULL) { array_push($messages, $serverMessage); } - $message = implode(' ', $messages); - parent::__construct($message == null ? 'Unknown PDFreactor Web Service error' : $message); + $message = implode(" ", $messages); + parent::__construct($message == null ? "Unknown PDFreactor Web Service error" : $message); } - - public function getResult() - { + public function getResult() { return $this->result; } } /** * This type of exception is produced by the client and indicates that a connection to the PDFreactor Web Service could not be established. Exceptions of this class do not necessarily indicate a problem with the PDFreactor Web Service, only that it could not be reached. This could have various reasons, including a non-functioning PDFreactor Web Service, a blocking firewall or an incorrectly configured service URL. - * * @see ClientTimeoutException * @see InvalidServiceException * @see UnreachableServiceException */ -class ClientException extends PDFreactorWebserviceException -{ - public $cause; - - public function __construct($message, $cause = null) - { +class ClientException extends PDFreactorWebserviceException { + var $cause; + function __construct($message, $cause = null) { $this->cause = $cause; parent::__construct($message); } @@ -1091,10 +959,8 @@ public function __construct($message, $cause = null) * This exception is thrown under the following circumstances: * Asynchronous conversions are not available in this PDFreactor Web Service. */ -class AsyncUnavailableException extends ServerException -{ - public function __construct($errorId, $clientMessage, $serverMessage, $result) - { +class AsyncUnavailableException extends ServerException { + function __construct($errorId, $clientMessage, $serverMessage, $result) { parent::__construct($errorId, $clientMessage, $serverMessage, $result); } } @@ -1102,10 +968,8 @@ public function __construct($errorId, $clientMessage, $serverMessage, $result) * This exception is thrown under the following circumstances: * The page number you specified is either below 0 or exceeds the document's total number of pages. */ -class BadRequestException extends ServerException -{ - public function __construct($errorId, $clientMessage, $serverMessage, $result) - { +class BadRequestException extends ServerException { + function __construct($errorId, $clientMessage, $serverMessage, $result) { parent::__construct($errorId, $clientMessage, $serverMessage, $result); } } @@ -1113,10 +977,8 @@ public function __construct($errorId, $clientMessage, $serverMessage, $result) * This exception is thrown under the following circumstances: * The supplied configuration is valid, however the conversion could not be completed for some reason. See the error message for details. */ -class ConversionAbortedException extends ServerException -{ - public function __construct($errorId, $clientMessage, $serverMessage, $result) - { +class ConversionAbortedException extends ServerException { + function __construct($errorId, $clientMessage, $serverMessage, $result) { parent::__construct($errorId, $clientMessage, $serverMessage, $result); } } @@ -1124,10 +986,8 @@ public function __construct($errorId, $clientMessage, $serverMessage, $result) * This exception is thrown under the following circumstances: * The configuration could not be processed and should be re-checked. */ -class ConversionFailureException extends ServerException -{ - public function __construct($errorId, $clientMessage, $serverMessage, $result) - { +class ConversionFailureException extends ServerException { + function __construct($errorId, $clientMessage, $serverMessage, $result) { parent::__construct($errorId, $clientMessage, $serverMessage, $result); } } @@ -1135,10 +995,8 @@ public function __construct($errorId, $clientMessage, $serverMessage, $result) * This exception is thrown under the following circumstances: * Conversion does not exist. */ -class DocumentNotFoundException extends ServerException -{ - public function __construct($errorId, $clientMessage, $serverMessage, $result) - { +class DocumentNotFoundException extends ServerException { + function __construct($errorId, $clientMessage, $serverMessage, $result) { parent::__construct($errorId, $clientMessage, $serverMessage, $result); } } @@ -1146,10 +1004,8 @@ public function __construct($errorId, $clientMessage, $serverMessage, $result) * This exception is thrown under the following circumstances: * The version of the client that was used is outdated and no longer supported. This is only available for the PDFreactor REST clients. */ -class InvalidClientException extends ServerException -{ - public function __construct($errorId, $clientMessage, $serverMessage, $result) - { +class InvalidClientException extends ServerException { + function __construct($errorId, $clientMessage, $serverMessage, $result) { parent::__construct($errorId, $clientMessage, $serverMessage, $result); } } @@ -1157,10 +1013,8 @@ public function __construct($errorId, $clientMessage, $serverMessage, $result) * This exception is thrown under the following circumstances: * The supplied configuration was not valid for some reason. See the error message for details. */ -class InvalidConfigurationException extends ServerException -{ - public function __construct($errorId, $clientMessage, $serverMessage, $result) - { +class InvalidConfigurationException extends ServerException { + function __construct($errorId, $clientMessage, $serverMessage, $result) { parent::__construct($errorId, $clientMessage, $serverMessage, $result); } } @@ -1168,10 +1022,8 @@ public function __construct($errorId, $clientMessage, $serverMessage, $result) * This exception is thrown under the following circumstances: * No configuration was supplied to the operation. */ -class NoConfigurationException extends ServerException -{ - public function __construct($errorId, $clientMessage, $serverMessage, $result) - { +class NoConfigurationException extends ServerException { + function __construct($errorId, $clientMessage, $serverMessage, $result) { parent::__construct($errorId, $clientMessage, $serverMessage, $result); } } @@ -1179,10 +1031,8 @@ public function __construct($errorId, $clientMessage, $serverMessage, $result) * This exception is thrown under the following circumstances: * No input document was specified in the configuration. */ -class NoInputDocumentException extends ServerException -{ - public function __construct($errorId, $clientMessage, $serverMessage, $result) - { +class NoInputDocumentException extends ServerException { + function __construct($errorId, $clientMessage, $serverMessage, $result) { parent::__construct($errorId, $clientMessage, $serverMessage, $result); } } @@ -1190,10 +1040,8 @@ public function __construct($errorId, $clientMessage, $serverMessage, $result) * This exception is thrown under the following circumstances: * The server could not produce a result with a media type that matches the client's request. The configuration or Accept header should be adjusted accordingly. */ -class NotAcceptableException extends ServerException -{ - public function __construct($errorId, $clientMessage, $serverMessage, $result) - { +class NotAcceptableException extends ServerException { + function __construct($errorId, $clientMessage, $serverMessage, $result) { parent::__construct($errorId, $clientMessage, $serverMessage, $result); } } @@ -1201,10 +1049,8 @@ public function __construct($errorId, $clientMessage, $serverMessage, $result) * This exception is thrown under the following circumstances: * The PDFreactor Web Service is running and reachable, but not in a state to perform the requested operation. */ -class ServiceUnavailableException extends ServerException -{ - public function __construct($errorId, $clientMessage, $serverMessage, $result) - { +class ServiceUnavailableException extends ServerException { + function __construct($errorId, $clientMessage, $serverMessage, $result) { parent::__construct($errorId, $clientMessage, $serverMessage, $result); } } @@ -1212,10 +1058,8 @@ public function __construct($errorId, $clientMessage, $serverMessage, $result) * This exception is thrown under the following circumstances: * The client failed an authorization check, e.g. because a supplied API key was invalid. */ -class UnauthorizedException extends ServerException -{ - public function __construct($errorId, $clientMessage, $serverMessage, $result) - { +class UnauthorizedException extends ServerException { + function __construct($errorId, $clientMessage, $serverMessage, $result) { parent::__construct($errorId, $clientMessage, $serverMessage, $result); } } @@ -1223,10 +1067,8 @@ public function __construct($errorId, $clientMessage, $serverMessage, $result) * This exception is thrown under the following circumstances: * The supplied configuration was accepted by PDFreactor but could not be converted for some reason. See the error message for details. */ -class UnprocessableConfigurationException extends ServerException -{ - public function __construct($errorId, $clientMessage, $serverMessage, $result) - { +class UnprocessableConfigurationException extends ServerException { + function __construct($errorId, $clientMessage, $serverMessage, $result) { parent::__construct($errorId, $clientMessage, $serverMessage, $result); } } @@ -1234,10 +1076,8 @@ public function __construct($errorId, $clientMessage, $serverMessage, $result) * This exception is thrown under the following circumstances: * The supplied input data was accepted by PDFreactur but could not be processed for some reason. See the error message for details. */ -class UnprocessableInputException extends ServerException -{ - public function __construct($errorId, $clientMessage, $serverMessage, $result) - { +class UnprocessableInputException extends ServerException { + function __construct($errorId, $clientMessage, $serverMessage, $result) { parent::__construct($errorId, $clientMessage, $serverMessage, $result); } } @@ -1245,10 +1085,8 @@ public function __construct($errorId, $clientMessage, $serverMessage, $result) * This exception is thrown under the following circumstances: * The PDFreactor Web Service could not be reached. */ -class UnreachableServiceException extends ClientException -{ - public function __construct($message, $cause = null) - { +class UnreachableServiceException extends ClientException { + function __construct($message, $cause = null) { parent::__construct($message, $cause); } } @@ -1256,10 +1094,8 @@ public function __construct($message, $cause = null) * This exception is thrown under the following circumstances: * A response was received but it could not be identified as a response from the PDFreactor Web Service. */ -class InvalidServiceException extends ClientException -{ - public function __construct($message, $cause = null) - { +class InvalidServiceException extends ClientException { + function __construct($message, $cause = null) { parent::__construct($message, $cause); } } @@ -1267,10 +1103,8 @@ public function __construct($message, $cause = null) * This exception is thrown under the following circumstances: * The request to the PDFreactor Web Service timed out. This usually occurs during synchronous conversions. Increasing the timeout or switching to asynchronous conversions might resolve this. */ -class ClientTimeoutException extends ClientException -{ - public function __construct($message, $cause = null) - { +class ClientTimeoutException extends ClientException { + function __construct($message, $cause = null) { parent::__construct($message, $cause); } } @@ -1278,8 +1112,7 @@ public function __construct($message, $cause = null) /** *

An enum containing callback type constants.

*/ -abstract class CallbackType -{ +abstract class CallbackType { /** *

This callback is called when the conversion is finished.

*
    @@ -1296,11 +1129,9 @@ abstract class CallbackType * {@see ContentType::TEXT} * , only the document ID will be posted. *
- * * @var string */ - public const FINISH = 'FINISH'; - + public const FINISH = "FINISH"; /** *

This callback is called regularly to inform on the progress of the conversion.

*
    @@ -1317,11 +1148,9 @@ abstract class CallbackType * , only the progress percentage will be posted. *
  • Interval property applies.
  • *
- * * @var string */ - public const PROGRESS = 'PROGRESS'; - + public const PROGRESS = "PROGRESS"; /** *

This callback is called when the conversion is started.

*
    @@ -1337,372 +1166,282 @@ abstract class CallbackType * {@see ContentType::TEXT} * , only the document ID will be posted. *
- * * @var string */ - public const START = 'START'; + public const START = "START"; } /** *

An enum containing cleanup constants.

*/ -abstract class Cleanup -{ +abstract class Cleanup { /** *

Indicates that the CyberNeko HTML parser will be used to perform a * cleanup when loading a non-well-formed document.

- * * @var string */ - public const CYBERNEKO = 'CYBERNEKO'; - + public const CYBERNEKO = "CYBERNEKO"; /** *

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

- * * @var string */ - public const JTIDY = 'JTIDY'; - + public const JTIDY = "JTIDY"; /** *

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

- * * @var string */ - public const NONE = 'NONE'; - + public const NONE = "NONE"; /** *

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

- * * @var string */ - public const TAGSOUP = 'TAGSOUP'; + public const TAGSOUP = "TAGSOUP"; } /** *

An enum containing color space constants.

*/ -abstract class ColorSpace -{ +abstract class ColorSpace { /** *

The color space CMYK.

- * * @var string */ - public const CMYK = 'CMYK'; - + public const CMYK = "CMYK"; /** *

The color space RGB.

- * * @var string */ - public const RGB = 'RGB'; + public const RGB = "RGB"; } /** *

An enum containing conformance constants.

*/ -abstract class Conformance -{ +abstract class Conformance { /** *

PDF with no additional restrictions (default)

- * * @var string */ - public const PDF = 'PDF'; - + public const PDF = "PDF"; /** *

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

- * * @var string */ - public const PDFA1A = 'PDFA1A'; - + public const PDFA1A = "PDFA1A"; /** *

PDF/A-1a + PDF/UA-1 (ISO 19005-1:2005 Level A + ISO 14289-1:2014)

- * * @var string */ - public const PDFA1A_PDFUA1 = 'PDFA1A_PDFUA1'; - + public const PDFA1A_PDFUA1 = "PDFA1A_PDFUA1"; /** *

PDF/A-1b (ISO 19005-1:2005 Level B)

- * * @var string */ - public const PDFA1B = 'PDFA1B'; - + public const PDFA1B = "PDFA1B"; /** *

PDF/A-2a (ISO 19005-2:2011 Level A)

- * * @var string */ - public const PDFA2A = 'PDFA2A'; - + public const PDFA2A = "PDFA2A"; /** *

PDF/A-2a + PDF/UA-1 (ISO 19005-2:2011 Level A + ISO 14289-1:2014)

- * * @var string */ - public const PDFA2A_PDFUA1 = 'PDFA2A_PDFUA1'; - + public const PDFA2A_PDFUA1 = "PDFA2A_PDFUA1"; /** *

PDF/A-2b (ISO 19005-2:2011 Level B)

- * * @var string */ - public const PDFA2B = 'PDFA2B'; - + public const PDFA2B = "PDFA2B"; /** *

PDF/A-2u (ISO 19005-2:2011 Level U)

- * * @var string */ - public const PDFA2U = 'PDFA2U'; - + public const PDFA2U = "PDFA2U"; /** *

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

- * * @var string */ - public const PDFA3A = 'PDFA3A'; - + public const PDFA3A = "PDFA3A"; /** *

PDF/A-3a + PDF/UA-1 (ISO 19005-3:2012 Level A + ISO 14289-1:2014)

- * * @var string */ - public const PDFA3A_PDFUA1 = 'PDFA3A_PDFUA1'; - + public const PDFA3A_PDFUA1 = "PDFA3A_PDFUA1"; /** *

PDF/A-3b (ISO 19005-3:2012 Level B)

- * * @var string */ - public const PDFA3B = 'PDFA3B'; - + public const PDFA3B = "PDFA3B"; /** *

PDF/A-3u (ISO 19005-3:2012 Level U)

- * * @var string */ - public const PDFA3U = 'PDFA3U'; - + public const PDFA3U = "PDFA3U"; /** *

PDF/UA-1 (ISO 14289-1:2014)

- * * @var string */ - public const PDFUA1 = 'PDFUA1'; - + public const PDFUA1 = "PDFUA1"; /** *

PDF/X-1a:2001 (ISO 15930-1:2001)

- * * @var string */ - public const PDFX1A_2001 = 'PDFX1A_2001'; - + public const PDFX1A_2001 = "PDFX1A_2001"; /** *

PDF/X-1a:2003 (ISO 15930-4:2003)

- * * @var string */ - public const PDFX1A_2003 = 'PDFX1A_2003'; - + public const PDFX1A_2003 = "PDFX1A_2003"; /** *

PDF/X-3:2002 (ISO 15930-3:2002)

- * * @var string */ - public const PDFX3_2002 = 'PDFX3_2002'; - + public const PDFX3_2002 = "PDFX3_2002"; /** *

PDF/X-3:2003 (ISO 15930-6:2003)

- * * @var string */ - public const PDFX3_2003 = 'PDFX3_2003'; - + public const PDFX3_2003 = "PDFX3_2003"; /** *

PDF/X-4 (ISO 15930-7:2008)

- * * @var string */ - public const PDFX4 = 'PDFX4'; - + public const PDFX4 = "PDFX4"; /** *

PDF/X-4p (ISO 15930-7:2008)

- * * @var string */ - public const PDFX4P = 'PDFX4P'; + public const PDFX4P = "PDFX4P"; } /** *

An enum containing content type constants.

*/ -abstract class ContentType -{ +abstract class ContentType { /** *

Content type BINARY, corresponds with "application/octet-stream" MIME type.

- * * @var string */ - public const BINARY = 'BINARY'; - + public const BINARY = "BINARY"; /** *

Content type BMP, corresponds with "image/bmp" MIME type.

- * * @var string */ - public const BMP = 'BMP'; - + public const BMP = "BMP"; /** *

Content type GIF, corresponds with "image/gif" MIME type.

- * * @var string */ - public const GIF = 'GIF'; - + public const GIF = "GIF"; /** *

Content type HTML, corresponds with "text/html" MIME type.

- * * @var string */ - public const HTML = 'HTML'; - + public const HTML = "HTML"; /** *

Content type JPEG, corresponds with "image/jpeg" MIME type.

- * * @var string */ - public const JPEG = 'JPEG'; - + public const JPEG = "JPEG"; /** *

Content type JSON, corresponds with "application/json" MIME type.

- * * @var string */ - public const JSON = 'JSON'; - + public const JSON = "JSON"; /** *

Content type NONE, i.e. no content.

- * * @var string */ - public const NONE = 'NONE'; - + public const NONE = "NONE"; /** *

Content type PDF, corresponds with "application/pdf" MIME type.

- * * @var string */ - public const PDF = 'PDF'; - + public const PDF = "PDF"; /** *

Content type PNG, corresponds with "image/png" MIME type.

- * * @var string */ - public const PNG = 'PNG'; - + public const PNG = "PNG"; /** *

Content type TEXT, corresponds with "text/plain" MIME type.

- * * @var string */ - public const TEXT = 'TEXT'; - + public const TEXT = "TEXT"; /** *

Content type TIFF, corresponds with "image/tiff" MIME type.

- * * @var string */ - public const TIFF = 'TIFF'; - + public const TIFF = "TIFF"; /** *

Content type XML, corresponds with "application/xml" MIME type.

- * * @var string */ - public const XML = 'XML'; + public const XML = "XML"; } /** *

An enum containing cookie policy constants.

*/ -abstract class CookiePolicy -{ +abstract class CookiePolicy { /** *

Disables cookie handling entirely. Cookies specified in the API are still sent, but server cookies are rejected.

- * * @var string */ - public const DISABLED = 'DISABLED'; - + public const DISABLED = "DISABLED"; /** *

A standard-compliant cookie policy that ignores date issues. This is the default value.

- * * @var string */ - public const RELAXED = 'RELAXED'; - + public const RELAXED = "RELAXED"; /** *

A strict standard-compliant cookie policy.

- * * @var string */ - public const STRICT = 'STRICT'; + public const STRICT = "STRICT"; } /** *

An enum containing CSS property support mode constants.

*/ -abstract class CssPropertySupport -{ +abstract class CssPropertySupport { /** *

Indicates that all style declarations are considered valid * disregarding the possibility of improper rendering.

*

Valid values may be overwritten by invalid style declarations.

- * * @var string */ - public const ALL = 'ALL'; - + public const ALL = "ALL"; /** *

Indicates that all values set in style declarations will be * validated as long as PDFreactor supports the corresponding * property.

*

Style declarations for properties not supported * by PDFreactor are taken as invalid.

- * * @var string */ - public const HTML = 'HTML'; - + public const HTML = "HTML"; /** *

Indicates that all values set in style declarations will be * validated as long as PDFreactor supports the corresponding * property.

*

Style declarations for properties not supported * by PDFreactor but by third party products are taken as valid.

- * * @var string */ - public const HTML_THIRD_PARTY = 'HTML_THIRD_PARTY'; - + public const HTML_THIRD_PARTY = "HTML_THIRD_PARTY"; /** *

Indicates that all values set in style declarations will be * taken as valid if a third party product supports the corresponding * property.

*

Style declarations for properties not supported by * any third party product but supported by PDFreactor will be validated.

- * * @var string */ - public const HTML_THIRD_PARTY_LENIENT = 'HTML_THIRD_PARTY_LENIENT'; + public const HTML_THIRD_PARTY_LENIENT = "HTML_THIRD_PARTY_LENIENT"; } /** *

An enum containing document type constants.

*/ -abstract class Doctype -{ +abstract class Doctype { /** *

Indicates that the document type will be detected automatically. * When the document has a file extension, it is used to determine whether the document is @@ -1711,102 +1450,80 @@ abstract class Doctype * {@see Doctype::XHTML} * . If there is no file extension or it is unknown, then the document content itself is searched * for an XML declaration, a doctype preamble and the root element.

- * * @var string */ - public const AUTODETECT = 'AUTODETECT'; - + public const AUTODETECT = "AUTODETECT"; /** *

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

- * * @var string */ - public const HTML5 = 'HTML5'; - + public const HTML5 = "HTML5"; /** *

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.

- * * @var string */ - public const XHTML = 'XHTML'; - + public const XHTML = "XHTML"; /** *

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.

- * * @var string */ - public const XML = 'XML'; + public const XML = "XML"; } /** *

An enum containing encryption constants.

*/ -abstract class Encryption -{ +abstract class Encryption { /** *

Indicates that the document will be encrypted using AES 128 bit encryption. - * * @var string */ - public const AES_128 = 'AES_128'; - + public const AES_128 = "AES_128"; /** *

Indicates that the document will be encrypted using AES 256 bit encryption. - * * @var string */ - public const AES_256 = 'AES_256'; - + public const AES_256 = "AES_256"; /** *

Indicates that the document will not be encrypted. If encryption is disabled * then no user password and no owner password can be used.

- * * @var string */ - public const NONE = 'NONE'; - + public const NONE = "NONE"; /** *

Indicates that the document will be encrypted using RC4 128 bit encryption. - * * @var string */ - public const RC4_128 = 'RC4_128'; - + public const RC4_128 = "RC4_128"; /** *

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

- * * @var string */ - public const RC4_40 = 'RC4_40'; - + public const RC4_40 = "RC4_40"; /** *

Deprecated as of PDFreactor 12. Use * {@see Encryption::RC4_128} * instead.

- * * @var string */ - public const TYPE_128 = 'TYPE_128'; - + public const TYPE_128 = "TYPE_128"; /** *

Deprecated as of PDFreactor 12. Use * {@see Encryption::RC4_40} * instead.

- * * @var string */ - public const TYPE_40 = 'TYPE_40'; + public const TYPE_40 = "TYPE_40"; } /** *

An enum containing error policies.

*/ -abstract class ErrorPolicy -{ +abstract class ErrorPolicy { /** *

Whether an exception should be thrown when the PDF's conformance was not validated * even though @@ -1816,11 +1533,9 @@ abstract class ErrorPolicy * not fully supported for validation.

*

Use this policy only if you exclusively convert documents where validation is supported * and strictly required.

- * * @var string */ - public const CONFORMANCE_VALIDATION_UNAVAILABLE = 'CONFORMANCE_VALIDATION_UNAVAILABLE'; - + public const CONFORMANCE_VALIDATION_UNAVAILABLE = "CONFORMANCE_VALIDATION_UNAVAILABLE"; /** *

Whether exceptions occurring when trying to merge invalid documents (e.g. * encrypted documents for which no owner password or an invalid password was @@ -1828,371 +1543,285 @@ abstract class ErrorPolicy *

Use this policy if the conversion should proceed even if one or more * documents that should be merged are invalid. They will be omitted from * the final PDF.

- * * @var string */ - public const IGNORE_INVALID_MERGE_DOCUMENTS_EXCEPTION = 'IGNORE_INVALID_MERGE_DOCUMENTS_EXCEPTION'; - + public const IGNORE_INVALID_MERGE_DOCUMENTS_EXCEPTION = "IGNORE_INVALID_MERGE_DOCUMENTS_EXCEPTION"; /** *

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.

- * * @var string */ - public const LICENSE = 'LICENSE'; - + public const LICENSE = "LICENSE"; /** *

Whether an exception should be thrown when resources could not be loaded.

- * * @var string */ - public const MISSING_RESOURCE = 'MISSING_RESOURCE'; - + public const MISSING_RESOURCE = "MISSING_RESOURCE"; /** *

Whether an exception should be thrown when there are uncaught exceptions * in the input document JavaScript, including syntax error.

- * * @var string */ - public const UNCAUGHT_JAVASCRIPT_EXCEPTION = 'UNCAUGHT_JAVASCRIPT_EXCEPTION'; - + public const UNCAUGHT_JAVASCRIPT_EXCEPTION = "UNCAUGHT_JAVASCRIPT_EXCEPTION"; /** *

Whether an exception should be thrown when an event of level * {@see LogLevel::WARN} * is logged.

- * * @var string */ - public const WARN_EVENT = 'WARN_EVENT'; + public const WARN_EVENT = "WARN_EVENT"; } /** *

An enum containing constants for logging exceeding content against.

*/ -abstract class ExceedingContentAgainst -{ +abstract class ExceedingContentAgainst { /** *

Do not log exceeding content.

- * * @var string */ - public const NONE = 'NONE'; - + public const NONE = "NONE"; /** *

Log content exceeding the edges of its page.

- * * @var string */ - public const PAGE_BORDERS = 'PAGE_BORDERS'; - + public const PAGE_BORDERS = "PAGE_BORDERS"; /** *

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

- * * @var string */ - public const PAGE_CONTENT = 'PAGE_CONTENT'; - + public const PAGE_CONTENT = "PAGE_CONTENT"; /** *

Log content exceeding its container.

- * * @var string */ - public const PARENT = 'PARENT'; + public const PARENT = "PARENT"; } /** *

An enum containing constants for analyzing exceeding content.

*/ -abstract class ExceedingContentAnalyze -{ +abstract class ExceedingContentAnalyze { /** *

Log exceeding content.

- * * @var string */ - public const CONTENT = 'CONTENT'; - + public const CONTENT = "CONTENT"; /** *

Log exceeding content and all boxes.

- * * @var string */ - public const CONTENT_AND_BOXES = 'CONTENT_AND_BOXES'; - + public const CONTENT_AND_BOXES = "CONTENT_AND_BOXES"; /** *

Log exceeding content and boxes without absolute positioning.

- * * @var string */ - public const CONTENT_AND_STATIC_BOXES = 'CONTENT_AND_STATIC_BOXES'; - + public const CONTENT_AND_STATIC_BOXES = "CONTENT_AND_STATIC_BOXES"; /** *

Do not log exceeding content.

- * * @var string */ - public const NONE = 'NONE'; + public const NONE = "NONE"; } /** *

An enum containing HTTP authentication scheme constants.

*/ -abstract class HttpAuthScheme -{ +abstract class HttpAuthScheme { /** *

This constant indicates that the credentials are to be used for any authentication scheme. This is the default value.

- * * @var string */ - public const ANY = 'ANY'; - + public const ANY = "ANY"; /** *

BASIC authentication.

- * * @var string */ - public const BASIC = 'BASIC'; - + public const BASIC = "BASIC"; /** *

DIGEST authentication.

- * * @var string */ - public const DIGEST = 'DIGEST'; - + public const DIGEST = "DIGEST"; /** *

Kerberos authentication.

- * * @var string */ - public const KERBEROS = 'KERBEROS'; - + public const KERBEROS = "KERBEROS"; /** *

Windows NTLM authentication.

- * * @var string */ - public const NTLM = 'NTLM'; - + public const NTLM = "NTLM"; /** *

Simple and Protected GSSAPI Negotiation Mechanism.

- * * @var string */ - public const SPNEGO = 'SPNEGO'; + public const SPNEGO = "SPNEGO"; } /** *

An enum containing HTTP protocol constants.

*/ -abstract class HttpProtocol -{ +abstract class HttpProtocol { /** *

This constant indicates that the credentials are to be used for any HTTP protocol.

- * * @var string */ - public const ANY = 'ANY'; - + public const ANY = "ANY"; /** *

HTTP only.

- * * @var string */ - public const HTTP = 'HTTP'; - + public const HTTP = "HTTP"; /** *

HTTPS only.

- * * @var string */ - public const HTTPS = 'HTTPS'; + public const HTTPS = "HTTPS"; } /** *

Deprecated as of PDFreactor 12. Use * {@see SecuritySettings::setTrustAllConnectionCertificates(Boolean)} * instead.

*/ -abstract class HttpsMode -{ +abstract class HttpsMode { /** *

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

- * * @var string */ - public const LENIENT = 'LENIENT'; - + public const LENIENT = "LENIENT"; /** *

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

- * * @var string */ - public const STRICT = 'STRICT'; + public const STRICT = "STRICT"; } /** *

An enum containing JavaScript debug mode constants.

*/ -abstract class JavaScriptDebugMode -{ +abstract class JavaScriptDebugMode { /** *

Indicates that all exceptions thrown during JavaScript processing are logged * in addition to the effects of POSITIONS.

- * * @var string */ - public const EXCEPTIONS = 'EXCEPTIONS'; - + public const EXCEPTIONS = "EXCEPTIONS"; /** *

Indicates that all JavaScript functions entered or exited are logged * in addition to the effects of POSITIONS and EXCEPTIONS.

- * * @var string */ - public const FUNCTIONS = 'FUNCTIONS'; - + public const FUNCTIONS = "FUNCTIONS"; /** *

Indicates that every line of executed JavaScript is logged * in addition to the effects of POSITIONS, EXCEPTIONS and FUNCTIONS.

- * * @var string */ - public const LINES = 'LINES'; - + public const LINES = "LINES"; /** *

Indicates that debugging is disabled.

- * * @var string */ - public const NONE = 'NONE'; - + public const NONE = "NONE"; /** *

Indicates that the filenames and line numbers that caused output * (e.g. via console.log) are logged.

- * * @var string */ - public const POSITIONS = 'POSITIONS'; + public const POSITIONS = "POSITIONS"; } /** *

An enum containing JavaScript engines.

*/ -abstract class JavaScriptEngine -{ +abstract class JavaScriptEngine { /** *

GraalVM JavaScript engine

- * * @var string */ - public const GRAALJS = 'GRAALJS'; - + public const GRAALJS = "GRAALJS"; /** *

Rhino JavaScript engine

- * * @var string */ - public const RHINO = 'RHINO'; + public const RHINO = "RHINO"; } /** *

An enum containing keystore type constants.

*/ -abstract class KeystoreType -{ +abstract class KeystoreType { /** *

Keystore type "jks".

- * * @var string */ - public const JKS = 'JKS'; - + public const JKS = "JKS"; /** *

Keystore type "pkcs12".

- * * @var string */ - public const PKCS12 = 'PKCS12'; + public const PKCS12 = "PKCS12"; } /** *

An enum containing log level constants.

*/ -abstract class LogLevel -{ +abstract class LogLevel { /** *

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

- * * @var string */ - public const DEBUG = 'DEBUG'; - + public const DEBUG = "DEBUG"; /** *

Indicates that only error log events will be logged.

- * * @var string */ - public const ERROR = 'ERROR'; - + public const ERROR = "ERROR"; /** *

Deprecated as of PDFreactor 12. Use * {@see LogLevel::ERROR} * instead.

- * * @var string */ - public const FATAL = 'FATAL'; - + public const FATAL = "FATAL"; /** *

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

- * * @var string */ - public const INFO = 'INFO'; - + public const INFO = "INFO"; /** *

Indicates that no log events will be logged.

- * * @var string */ - public const NONE = 'NONE'; - + public const NONE = "NONE"; /** *

Deprecated as of PDFreactor 12. Use * {@see LogLevel::TRACE} * instead.

- * * @var string */ - public const PERFORMANCE = 'PERFORMANCE'; - + public const PERFORMANCE = "PERFORMANCE"; /** *

Indicates that all log events will be logged.

- * * @var string */ - public const TRACE = 'TRACE'; - + public const TRACE = "TRACE"; /** *

Indicates that warn and fatal log events will be logged.

- * * @var string */ - public const WARN = 'WARN'; + public const WARN = "WARN"; } /** *

An enum containing media feature constants.

*/ -abstract class MediaFeature -{ +abstract class MediaFeature { /** *

CSS Media Feature (Media Queries Level 4) describing whether any available input mechanism allows the user to hover over elements.

*

The default value is "none".

- * * @var string */ - public const ANY_HOVER = 'ANY_HOVER'; - + public const ANY_HOVER = "ANY_HOVER"; /** *

CSS Media Feature (Media Queries Level 4) describing whether any available input mechanism is a pointing device, and if so, how accurate is it.

*

The default value is "none".

- * * @var string */ - public const ANY_POINTER = 'ANY_POINTER'; - + public const ANY_POINTER = "ANY_POINTER"; /** *

CSS 3 Media Feature describing the aspect ratio of the page content.

*

By default, this value is computed using the values of @@ -2201,35 +1830,27 @@ abstract class MediaFeature * {@see MediaFeature::HEIGHT} * . Setting a specific value does override the computed * value.

- * * @var string */ - public const ASPECT_RATIO = 'ASPECT_RATIO'; - + public const ASPECT_RATIO = "ASPECT_RATIO"; /** *

CSS 3 Media Feature describing the number of bits per color component.

*

Default value is 8, except if the output is forced to be grayscale, in which case it is 0.

- * * @var string */ - public const COLOR = 'COLOR'; - + public const COLOR = "COLOR"; /** *

CSS Media Feature (Media Queries Level 4) describing the approximate range of colors that are supported by the UA and output device.

*

The default value is "srgb".

- * * @var string */ - public const COLOR_GAMUT = 'COLOR_GAMUT'; - + public const COLOR_GAMUT = "COLOR_GAMUT"; /** *

CSS 3 Media Feature describing the number of entries in the color lookup table.

*

Default value is 0, except if the output format is "gif" in which case it is 256.

- * * @var string */ - public const COLOR_INDEX = 'COLOR_INDEX'; - + public const COLOR_INDEX = "COLOR_INDEX"; /** *

CSS 3 Media Feature describing the aspect ratio of the page.

*

By default, this value is computed using the values of @@ -2238,115 +1859,87 @@ abstract class MediaFeature * {@see MediaFeature::DEVICE_HEIGHT} * . Setting a specific value does override * the computed value.

- * * @var string */ - public const DEVICE_ASPECT_RATIO = 'DEVICE_ASPECT_RATIO'; - + public const DEVICE_ASPECT_RATIO = "DEVICE_ASPECT_RATIO"; /** *

CSS 3 Media Feature describing the height of the page.

*

The default height is that of a DIN A4 page (297mm).

- * * @var string */ - public const DEVICE_HEIGHT = 'DEVICE_HEIGHT'; - + public const DEVICE_HEIGHT = "DEVICE_HEIGHT"; /** *

CSS 3 Media Feature describing the width of the page.

*

The default width is that of a DIN A4 page (210mm).

- * * @var string */ - public const DEVICE_WIDTH = 'DEVICE_WIDTH'; - + public const DEVICE_WIDTH = "DEVICE_WIDTH"; /** *

CSS Media Feature (Media Queries Level 5) representing how a web application is being presented within the context of an OS.

*

The default value is "fullscreen".

- * * @var string */ - public const DISPLAY_MODE = 'DISPLAY_MODE'; - + public const DISPLAY_MODE = "DISPLAY_MODE"; /** *

CSS Media Feature (Media Queries Level 5) representing the combination of max brightness, color depth, and contrast ratio that are supported by the user agent and output device.

*

The default value is "standard".

- * * @var string */ - public const DYNAMIC_RANGE = 'DYNAMIC_RANGE'; - + public const DYNAMIC_RANGE = "DYNAMIC_RANGE"; /** *

CSS Media Feature (Media Queries Level 5) that is used to query the characteristics of the user's display so the author can adjust the style of the document.

*

The default value is "opaque".

- * * @var string */ - public const ENVIRONMENT_BLENDING = 'ENVIRONMENT_BLENDING'; - + public const ENVIRONMENT_BLENDING = "ENVIRONMENT_BLENDING"; /** *

CSS Media Feature (Media Queries Level 5) indicates whether the user-agent enforces a limited color palette.

*

The default value is "none".

- * * @var string */ - public const FORCED_COLORS = 'FORCED_COLORS'; - + public const FORCED_COLORS = "FORCED_COLORS"; /** *

CSS 3 Media Feature defining whether the output is grid-based.

*

Default value 0, as PDFs are not grid-based.

- * * @var string */ - public const GRID = 'GRID'; - + public const GRID = "GRID"; /** *

CSS 3 Media Feature height of page content.

*

The default height is that of a DIN A4 page with 2cm margin (257mm).

- * * @var string */ - public const HEIGHT = 'HEIGHT'; - + public const HEIGHT = "HEIGHT"; /** *

CSS Media Feature (Media Queries Level 5) that describes the number of logical segments of the viewport in the horizontal direction.

*

The default value is "1".

- * * @var string */ - public const HORIZONTAL_VIEWPORT_SEGMENTS = 'HORIZONTAL_VIEWPORT_SEGMENTS'; - + public const HORIZONTAL_VIEWPORT_SEGMENTS = "HORIZONTAL_VIEWPORT_SEGMENTS"; /** *

CSS Media Feature (Media Queries Level 4) describing whether the primary input mechanism allows the user to hover over elements.

*

The default value is "none".

- * * @var string */ - public const HOVER = 'HOVER'; - + public const HOVER = "HOVER"; /** *

CSS Media Feature (Media Queries Level 5) indicating whether the content is displayed normally, or whether colors have been inverted.

*

The default value is "none".

- * * @var string */ - public const INVERTED_COLORS = 'INVERTED_COLORS'; - + public const INVERTED_COLORS = "INVERTED_COLORS"; /** *

CSS 3 Media Feature describing the number of bits per pixel in a monochrome frame buffer.

*

Default value is 0, if the output format is not monochrome.

- * * @var string */ - public const MONOCHROME = 'MONOCHROME'; - + public const MONOCHROME = "MONOCHROME"; /** *

CSS Media Feature (Media Queries Level 5) allowing authors to know whether the user agent is providing obviously discoverable navigation controls as part of its user interface.

*

The default value is "none".

- * * @var string */ - public const NAV_CONTROLS = 'NAV_CONTROLS'; - + public const NAV_CONTROLS = "NAV_CONTROLS"; /** *

CSS 3 Media Feature describing the page orientation.

*

By default, this value is computed using the values of @@ -2356,1128 +1949,846 @@ abstract class MediaFeature * . * Setting a specific value does override the computed value.

*

Valid values are "portrait" or "landscape".

- * * @var string */ - public const ORIENTATION = 'ORIENTATION'; - + public const ORIENTATION = "ORIENTATION"; /** *

CSS Media Feature (Media Queries Level 4) describing the behavior of the device when content overflows the initial containing block in the block axis.

*

The default value is "page", except if an image output was set to continuous, in which case it is "none".

- * * @var string */ - public const OVERFLOW_BLOCK = 'OVERFLOW_BLOCK'; - + public const OVERFLOW_BLOCK = "OVERFLOW_BLOCK"; /** *

CSS Media Feature (Media Queries Level 4) describing the behavior of the device when content overflows the initial containing block in the inline axis.

*

The default value is "none".

- * * @var string */ - public const OVERFLOW_INLINE = 'OVERFLOW_INLINE'; - + public const OVERFLOW_INLINE = "OVERFLOW_INLINE"; /** *

CSS Media Feature (Media Queries Level 4) describing whether the primary input mechanism is a pointing device, and if so, how accurate is it.

*

The default value is "none".

- * * @var string */ - public const POINTER = 'POINTER'; - + public const POINTER = "POINTER"; /** *

CSS Media Feature (Media Queries Level 5) reflecting the user's desire that the page use a light or dark color theme.

*

The default value is "light".

- * * @var string */ - public const PREFERS_COLOR_SCHEME = 'PREFERS_COLOR_SCHEME'; - + public const PREFERS_COLOR_SCHEME = "PREFERS_COLOR_SCHEME"; /** *

CSS Media Feature (Media Queries Level 5) used to detect if the user has requested more or less contrast in the page.

*

The default value is "no-preference".

- * * @var string */ - public const PREFERS_CONSTRAST = 'PREFERS_CONSTRAST'; - + public const PREFERS_CONSTRAST = "PREFERS_CONSTRAST"; /** *

CSS Media Feature (Media Queries Level 5) used to detect if the user has a preference for being served alternate content that uses less data for the page to be rendered.

*

The default value is "no-preference".

- * * @var string */ - public const PREFERS_REDUCED_DATA = 'PREFERS_REDUCED_DATA'; - + public const PREFERS_REDUCED_DATA = "PREFERS_REDUCED_DATA"; /** *

CSS Media Feature (Media Queries Level 5) used to detect if the user has requested the system minimize the amount of animation or motion it uses.

*

The default value is "reduce".

- * * @var string */ - public const PREFERS_REDUCED_MOTION = 'PREFERS_REDUCED_MOTION'; - + public const PREFERS_REDUCED_MOTION = "PREFERS_REDUCED_MOTION"; /** *

CSS Media Feature (Media Queries Level 5) used to detect if the user has requested the system minimize the amount of transparent or translucent layer effects it uses.

*

The default value is "no-preference".

- * * @var string */ - public const PREFERS_REDUCED_TRANSPARENCY = 'PREFERS_REDUCED_TRANSPARENCY'; - + public const PREFERS_REDUCED_TRANSPARENCY = "PREFERS_REDUCED_TRANSPARENCY"; /** *

CSS 3 Media Feature describing the resolution of the output device.

*

This also defines the value of the window.devicePixelRatio property available from JavaScript.

*

Default value is 300dpi.

- * * @var string */ - public const RESOLUTION = 'RESOLUTION'; - + public const RESOLUTION = "RESOLUTION"; /** *

CSS Media Feature (Media Queries Level 4) describing the scanning process of some output devices.

*

The default value is "progressive".

- * * @var string */ - public const SCAN = 'SCAN'; - + public const SCAN = "SCAN"; /** *

CSS Media Feature (Media Queries Level 5) used to query whether scripting languages, such as JavaScript, are supported on the current document.

*

The default value is "initial-only" if JavaScript has been enabled or "none" otherwise.

- * * @var string */ - public const SCRIPTING = 'SCRIPTING'; - + public const SCRIPTING = "SCRIPTING"; /** *

CSS Media Feature (Media Queries Level 5) used to query the ability of the output device to modify the appearance of content once it has been rendered.

*

The default value is "none".

- * * @var string */ - public const UPDATE = 'UPDATE'; - + public const UPDATE = "UPDATE"; /** *

CSS Media Feature (Media Queries Level 5) that describes the number of logical segments of the viewport in the vertical direction.

*

The default value is "1".

- * * @var string */ - public const VERTICAL_VIEWPORT_SEGMENTS = 'VERTICAL_VIEWPORT_SEGMENTS'; - + public const VERTICAL_VIEWPORT_SEGMENTS = "VERTICAL_VIEWPORT_SEGMENTS"; /** *

CSS Media Feature (Media Queries Level 5) describing the approximate range of colors that are supported by the UA and output device's video plane.

*

The default value is "srgb".

- * * @var string */ - public const VIDEO_COLOR_GAMUT = 'VIDEO_COLOR_GAMUT'; - + public const VIDEO_COLOR_GAMUT = "VIDEO_COLOR_GAMUT"; /** *

CSS Media Feature (Media Queries Level 5) representing the combination of max brightness, color depth, and contrast ratio that are supported by the UA and output device's video plane.

*

The default value is "standard".

- * * @var string */ - public const VIDEO_DYNAMIC_RANGE = 'VIDEO_DYNAMIC_RANGE'; - + public const VIDEO_DYNAMIC_RANGE = "VIDEO_DYNAMIC_RANGE"; /** *

CSS 3 Media Feature width of page content.

*

The default width is that of a DIN A4 page with 2cm margin (170mm).

- * * @var string */ - public const WIDTH = 'WIDTH'; + public const WIDTH = "WIDTH"; } /** *

An enum containing merge mode constants.

*/ -abstract class MergeMode -{ +abstract class MergeMode { /** *

Default merge mode: Append converted document to existing PDF.

- * * @var string */ - public const APPEND = 'APPEND'; - + public const APPEND = "APPEND"; /** *

Advanced merge mode: Allows to insert specific pages from existing PDFs into * the converted document.

*

This is done via a special syntax of * {@see Configuration::setPageOrder(String)} * .

- * * @var string */ - public const ARRANGE = 'ARRANGE'; - + public const ARRANGE = "ARRANGE"; /** *

Alternate merge mode (overlay): Adding converted document above the existing PDF.

- * * @var string */ - public const OVERLAY = 'OVERLAY'; - + public const OVERLAY = "OVERLAY"; /** *

Alternate merge mode (overlay): Adding converted document below the existing PDF.

- * * @var string */ - public const OVERLAY_BELOW = 'OVERLAY_BELOW'; - + public const OVERLAY_BELOW = "OVERLAY_BELOW"; /** *

Alternate merge mode: Prepend converted document to existing PDF.

- * * @var string */ - public const PREPEND = 'PREPEND'; + public const PREPEND = "PREPEND"; } /** *

An enum containing default profiles for output intents.

*/ -abstract class OutputIntentDefaultProfile -{ +abstract class OutputIntentDefaultProfile { /** *

"Coated FOGRA39" output intent default profile.

- * * @var string */ - public const FOGRA39 = 'Coated FOGRA39'; - + public const FOGRA39 = "Coated FOGRA39"; /** *

"Coated GRACoL 2006" output intent default profile.

- * * @var string */ - public const GRACOL = 'Coated GRACoL 2006'; - + public const GRACOL = "Coated GRACoL 2006"; /** *

"ISO News print 26% (IFRA)" output intent default profile.

- * * @var string */ - public const IFRA = 'ISO News print 26% (IFRA)'; - + public const IFRA = "ISO News print 26% (IFRA)"; /** *

"Japan Color 2001 Coated" output intent default profile.

- * * @var string */ - public const JAPAN = 'Japan Color 2001 Coated'; - + public const JAPAN = "Japan Color 2001 Coated"; /** *

"Japan Color 2001 Newspaper" output intent default profile.

- * * @var string */ - public const JAPAN_NEWSPAPER = 'Japan Color 2001 Newspaper'; - + public const JAPAN_NEWSPAPER = "Japan Color 2001 Newspaper"; /** *

"Japan Color 2001 Uncoated" output intent default profile.

- * * @var string */ - public const JAPAN_UNCOATED = 'Japan Color 2001 Uncoated'; - + public const JAPAN_UNCOATED = "Japan Color 2001 Uncoated"; /** *

"Japan Web Coated (Ad)" output intent default profile.

- * * @var string */ - public const JAPAN_WEB = 'Japan Web Coated (Ad)'; - + public const JAPAN_WEB = "Japan Web Coated (Ad)"; /** *

"US Web Coated (SWOP) v2" output intent default profile.

- * * @var string */ - public const SWOP = 'US Web Coated (SWOP) v2'; - + public const SWOP = "US Web Coated (SWOP) v2"; /** *

"Web Coated SWOP 2006 Grade 3 Paper" output intent default profile.

- * * @var string */ - public const SWOP_3 = 'Web Coated SWOP 2006 Grade 3 Paper'; + public const SWOP_3 = "Web Coated SWOP 2006 Grade 3 Paper"; } /** *

An enum containing output format constants.

*/ -abstract class OutputType -{ +abstract class OutputType { /** *

BMP output format.

- * * @var string */ - public const BMP = 'BMP'; - + public const BMP = "BMP"; /** *

GIF output format.

- * * @var string */ - public const GIF = 'GIF'; - + public const GIF = "GIF"; /** *

JPEG output format, with dithering applied.

- * * @var string */ - public const GIF_DITHERED = 'GIF_DITHERED'; - + public const GIF_DITHERED = "GIF_DITHERED"; /** *

JPEG output format.

- * * @var string */ - public const JPEG = 'JPEG'; - + public const JPEG = "JPEG"; /** *

PDF output format.

- * * @var string */ - public const PDF = 'PDF'; - + public const PDF = "PDF"; /** *

PNG output format.

- * * @var string */ - public const PNG = 'PNG'; - + public const PNG = "PNG"; /** *

Deprecated as of PDFreactor 11. Use * {@see OutputType::PNG} * instead.

- * * @var string */ - public const PNG_AI = 'PNG_AI'; - + public const PNG_AI = "PNG_AI"; /** *

Transparent PNG output format.

- * * @var string */ - public const PNG_TRANSPARENT = 'PNG_TRANSPARENT'; - + public const PNG_TRANSPARENT = "PNG_TRANSPARENT"; /** *

Deprecated as of PDFreactor 11. Use * {@see OutputType::PNG_TRANSPARENT} * instead.

- * * @var string */ - public const PNG_TRANSPARENT_AI = 'PNG_TRANSPARENT_AI'; - + public const PNG_TRANSPARENT_AI = "PNG_TRANSPARENT_AI"; /** *

Monochrome CCITT 1D/RLE compressed TIFF output format.

- * * @var string */ - public const TIFF_CCITT_1D = 'TIFF_CCITT_1D'; - + public const TIFF_CCITT_1D = "TIFF_CCITT_1D"; /** *

Monochrome CCITT 1D/RLE compressed TIFF output format, with dithering applied.

- * * @var string */ - public const TIFF_CCITT_1D_DITHERED = 'TIFF_CCITT_1D_DITHERED'; - + public const TIFF_CCITT_1D_DITHERED = "TIFF_CCITT_1D_DITHERED"; /** *

Monochrome CCITT Group 3/T.4 compressed TIFF output format.

- * * @var string */ - public const TIFF_CCITT_GROUP_3 = 'TIFF_CCITT_GROUP_3'; - + public const TIFF_CCITT_GROUP_3 = "TIFF_CCITT_GROUP_3"; /** *

Monochrome CCITT Group 3/T.4 compressed TIFF output format, with dithering applied.

- * * @var string */ - public const TIFF_CCITT_GROUP_3_DITHERED = 'TIFF_CCITT_GROUP_3_DITHERED'; - + public const TIFF_CCITT_GROUP_3_DITHERED = "TIFF_CCITT_GROUP_3_DITHERED"; /** *

Monochrome CCITT Group 4/T.6 compressed TIFF output format.

- * * @var string */ - public const TIFF_CCITT_GROUP_4 = 'TIFF_CCITT_GROUP_4'; - + public const TIFF_CCITT_GROUP_4 = "TIFF_CCITT_GROUP_4"; /** *

Monochrome CCITT Group 4/T.6 compressed TIFF output format, with dithering applied.

- * * @var string */ - public const TIFF_CCITT_GROUP_4_DITHERED = 'TIFF_CCITT_GROUP_4_DITHERED'; - + public const TIFF_CCITT_GROUP_4_DITHERED = "TIFF_CCITT_GROUP_4_DITHERED"; /** *

LZW compressed TIFF output format.

- * * @var string */ - public const TIFF_LZW = 'TIFF_LZW'; - + public const TIFF_LZW = "TIFF_LZW"; /** *

PackBits compressed TIFF output format.

- * * @var string */ - public const TIFF_PACKBITS = 'TIFF_PACKBITS'; - + public const TIFF_PACKBITS = "TIFF_PACKBITS"; /** *

Uncompressed TIFF output format.

- * * @var string */ - public const TIFF_UNCOMPRESSED = 'TIFF_UNCOMPRESSED'; + public const TIFF_UNCOMPRESSED = "TIFF_UNCOMPRESSED"; } /** *

An enum containing constants that determines whether the converted document * or the specified PDF document(s) is the content document for overlaying.

*/ -abstract class OverlayContentDocument -{ +abstract class OverlayContentDocument { /** *

The converted HTML document will be the content document.

- * * @var string */ - public const CONVERTED = 'CONVERTED'; - + public const CONVERTED = "CONVERTED"; /** *

The PDF document(s) indicated in the MergeSettings "documents", * appended to each other if there are multiple ones, will be the content document.

- * * @var string */ - public const PDF = 'PDF'; + public const PDF = "PDF"; } /** *

An enum containing data to configure how overlay pages that have * different dimensions from the pages they are overlaying should be resized.

*/ -abstract class OverlayFit -{ +abstract class OverlayFit { /** *

The page keeps its aspect ratio, but is resized to fit within the given dimension.

- * * @var string */ - public const CONTAIN = 'CONTAIN'; - + public const CONTAIN = "CONTAIN"; /** *

The page keeps its aspect ratio and fills the given dimension. It will be clipped to fit.

- * * @var string */ - public const COVER = 'COVER'; - + public const COVER = "COVER"; /** *

The default. The page is resized to fill the given dimension. * If necessary, the page will be stretched or squished to fit.

- * * @var string */ - public const FILL = 'FILL'; - + public const FILL = "FILL"; /** *

The page is not resized. If necessary it will be clipped to fit.

- * * @var string */ - public const NONE = 'NONE'; + public const NONE = "NONE"; } /** *

An enum containing data for repeating overlays.

*/ -abstract class OverlayRepeat -{ +abstract class OverlayRepeat { /** *

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

- * * @var string */ - public const ALL_PAGES = 'ALL_PAGES'; - + public const ALL_PAGES = "ALL_PAGES"; /** *

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

- * * @var string */ - public const LAST_PAGE = 'LAST_PAGE'; - + public const LAST_PAGE = "LAST_PAGE"; /** *

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

- * * @var string */ - public const NONE = 'NONE'; - + public const NONE = "NONE"; /** *

The resulting PDF is trimmed to the number of pages of the shorter document.

- * * @var string */ - public const TRIM = 'TRIM'; + public const TRIM = "TRIM"; } /** *

An enum containing pre-defined page orders.

*/ -abstract class PageOrder -{ +abstract class PageOrder { /** *

Page order mode to arrange all pages in booklet order. To be used with * {@see PagesPerSheetDirection::RIGHT_DOWN} * . - * * @var string */ - public const BOOKLET = 'BOOKLET'; - + public const BOOKLET = "BOOKLET"; /** *

Page order mode to arrange all pages in right-to-left booklet order. To be used with * {@see PagesPerSheetDirection::RIGHT_DOWN} * .

- * * @var string */ - public const BOOKLET_RTL = 'BOOKLET_RTL'; - + public const BOOKLET_RTL = "BOOKLET_RTL"; /** *

Page order mode to keep even pages only.

- * * @var string */ - public const EVEN = 'EVEN'; - + public const EVEN = "EVEN"; /** *

Page order mode to keep odd pages only.

- * * @var string */ - public const ODD = 'ODD'; - + public const ODD = "ODD"; /** *

Page order mode to reverse the page order.

- * * @var string */ - public const REVERSE = 'REVERSE'; + public const REVERSE = "REVERSE"; } /** *

An enum containing constants for pages per sheet directions.

*/ -abstract class PagesPerSheetDirection -{ +abstract class PagesPerSheetDirection { /** *

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

- * * @var string */ - public const DOWN_LEFT = 'DOWN_LEFT'; - + public const DOWN_LEFT = "DOWN_LEFT"; /** *

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

- * * @var string */ - public const DOWN_RIGHT = 'DOWN_RIGHT'; - + public const DOWN_RIGHT = "DOWN_RIGHT"; /** *

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

- * * @var string */ - public const LEFT_DOWN = 'LEFT_DOWN'; - + public const LEFT_DOWN = "LEFT_DOWN"; /** *

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

- * * @var string */ - public const LEFT_UP = 'LEFT_UP'; - + public const LEFT_UP = "LEFT_UP"; /** *

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

- * * @var string */ - public const RIGHT_DOWN = 'RIGHT_DOWN'; - + public const RIGHT_DOWN = "RIGHT_DOWN"; /** *

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

- * * @var string */ - public const RIGHT_UP = 'RIGHT_UP'; - + public const RIGHT_UP = "RIGHT_UP"; /** *

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

- * * @var string */ - public const UP_LEFT = 'UP_LEFT'; - + public const UP_LEFT = "UP_LEFT"; /** *

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

- * * @var string */ - public const UP_RIGHT = 'UP_RIGHT'; + public const UP_RIGHT = "UP_RIGHT"; } /** *

An enum containing trigger events for PDF scripts.

*/ -abstract class PdfScriptTriggerEvent -{ +abstract class PdfScriptTriggerEvent { /** *

This event is triggered after the PDF has been printed by the viewer application.

- * * @var string */ - public const AFTER_PRINT = 'AFTER_PRINT'; - + public const AFTER_PRINT = "AFTER_PRINT"; /** *

This event is triggered after the PDF has been saved by the viewer application.

- * * @var string */ - public const AFTER_SAVE = 'AFTER_SAVE'; - + public const AFTER_SAVE = "AFTER_SAVE"; /** *

This event is triggered before the PDF is printed by the viewer application.

- * * @var string */ - public const BEFORE_PRINT = 'BEFORE_PRINT'; - + public const BEFORE_PRINT = "BEFORE_PRINT"; /** *

This event is triggered before the PDF is saved by the viewer application.

- * * @var string */ - public const BEFORE_SAVE = 'BEFORE_SAVE'; - + public const BEFORE_SAVE = "BEFORE_SAVE"; /** *

This event is triggered when the PDF is closed by the viewer application.

- * * @var string */ - public const CLOSE = 'CLOSE'; - + public const CLOSE = "CLOSE"; /** *

This event is triggered when the PDF is opened in the viewer application.

- * * @var string */ - public const OPEN = 'OPEN'; + public const OPEN = "OPEN"; } /** *

An enum containing constants for processing preferences.

*/ -abstract class ProcessingPreferences -{ +abstract class ProcessingPreferences { /** *

Processing preferences flag for the memory saving mode for images.

- * * @var string */ - public const SAVE_MEMORY_IMAGES = 'SAVE_MEMORY_IMAGES'; + public const SAVE_MEMORY_IMAGES = "SAVE_MEMORY_IMAGES"; } /** *

An enum containing modes for Quirks.

*/ -abstract class QuirksMode -{ +abstract class QuirksMode { /** *

Doctype dependent behavior.

- * * @var string */ - public const DETECT = 'DETECT'; - + public const DETECT = "DETECT"; /** *

Forced quirks behavior.

- * * @var string */ - public const QUIRKS = 'QUIRKS'; - + public const QUIRKS = "QUIRKS"; /** *

Forced no-quirks behavior.

- * * @var string */ - public const STANDARDS = 'STANDARDS'; + public const STANDARDS = "STANDARDS"; } /** *

An enum containing resolution units.

*/ -abstract class ResolutionUnit -{ +abstract class ResolutionUnit { /** *

Dots per inch. The default 1dppx/96dpi in this unit is about 38.

- * * @var string */ - public const DPCM = 'DPCM'; - + public const DPCM = "DPCM"; /** *

Dots per Inch. The default 1dppx/96dpi in this unit is 96.

- * * @var string */ - public const DPI = 'DPI'; - + public const DPI = "DPI"; /** *

Dots per 'px' unit. The default 1dppx/96dpi in this unit is 1.

- * * @var string */ - public const DPPX = 'DPPX'; - + public const DPPX = "DPPX"; /** *

Thousand dots per centimeter. The default 1dppx/96dpi in this unit is about 37795.

- * * @var string */ - public const TDPCM = 'TDPCM'; - + public const TDPCM = "TDPCM"; /** *

Thousand dots per inch. The default 1dppx/96dpi in this unit is 96000.

- * * @var string */ - public const TDPI = 'TDPI'; - + public const TDPI = "TDPI"; /** *

Thousand dots per 'px' unit. The default 1dppx/96dpi in this unit is 1000.

- * * @var string */ - public const TDPPX = 'TDPPX'; + public const TDPPX = "TDPPX"; } /** *

An enum containing resource sub type constants.

*/ -abstract class ResourceSubtype -{ +abstract class ResourceSubtype { /** *

Indicates a "classic" (non-module) JavaScript. Used for resources of type * {@see ResourceType::SCRIPT} * .

- * * @var string */ - public const JAVASCRIPT_CLASSIC = 'JAVASCRIPT_CLASSIC'; - + public const JAVASCRIPT_CLASSIC = "JAVASCRIPT_CLASSIC"; /** *

Indicates a JavaScript import map. Used for resources of type * {@see ResourceType::SCRIPT} * .

- * * @var string */ - public const JAVASCRIPT_IMPORTMAP = 'JAVASCRIPT_IMPORTMAP'; - + public const JAVASCRIPT_IMPORTMAP = "JAVASCRIPT_IMPORTMAP"; /** *

Indicates a JavaScript module. Used for resources of type * {@see ResourceType::SCRIPT} * .

- * * @var string */ - public const JAVASCRIPT_MODULE = 'JAVASCRIPT_MODULE'; + public const JAVASCRIPT_MODULE = "JAVASCRIPT_MODULE"; } /** *

Indicates the type of resource.

*/ -abstract class ResourceType -{ +abstract class ResourceType { /** *

An attachment.

- * * @var string */ - public const ATTACHMENT = 'ATTACHMENT'; - + public const ATTACHMENT = "ATTACHMENT"; /** * The main HTML or XML document. - * * @var string */ - public const DOCUMENT = 'DOCUMENT'; - + public const DOCUMENT = "DOCUMENT"; /** *

A font.

- * * @var string */ - public const FONT = 'FONT'; - + public const FONT = "FONT"; /** *

An ICC profile.

- * * @var string */ - public const ICC_PROFILE = 'ICC_PROFILE'; - + public const ICC_PROFILE = "ICC_PROFILE"; /** *

An iframe.

- * * @var string */ - public const IFRAME = 'IFRAME'; - + public const IFRAME = "IFRAME"; /** *

An image.

- * * @var string */ - public const IMAGE = 'IMAGE'; - + public const IMAGE = "IMAGE"; /** *

The license key.

- * * @var string */ - public const LICENSEKEY = 'LICENSEKEY'; - + public const LICENSEKEY = "LICENSEKEY"; /** *

A merge document.

- * * @var string */ - public const MERGE_DOCUMENT = 'MERGE_DOCUMENT'; - + public const MERGE_DOCUMENT = "MERGE_DOCUMENT"; /** *

An embedded object.

- * * @var string */ - public const OBJECT = 'OBJECT'; - + public const OBJECT = "OBJECT"; /** *

A running document.

- * * @var string */ - public const RUNNING_DOCUMENT = 'RUNNING_DOCUMENT'; - + public const RUNNING_DOCUMENT = "RUNNING_DOCUMENT"; /** *

A script.

- * * @var string */ - public const SCRIPT = 'SCRIPT'; - + public const SCRIPT = "SCRIPT"; /** *

A style sheet.

- * * @var string */ - public const STYLESHEET = 'STYLESHEET'; - + public const STYLESHEET = "STYLESHEET"; /** *

An unknown resource type.

- * * @var string */ - public const UNKNOWN = 'UNKNOWN'; - + public const UNKNOWN = "UNKNOWN"; /** * An XMLHttpRequest. - * * @var string */ - public const XHR = 'XHR'; + public const XHR = "XHR"; } /** *

An enum containing the cryptographic filter type that is used for signing.

*/ -abstract class SigningMode -{ +abstract class SigningMode { /** *

The self signed filter: PDFreactor creates a signature with the adbe.x509.rsa_sha1 (PKCS#1) filter type.

- * * @var string */ - public const SELF_SIGNED = 'SELF_SIGNED'; - + public const SELF_SIGNED = "SELF_SIGNED"; /** *

The VeriSign filter. PDFreactor creates a signature with VeriSign filter type.

- * * @var string */ - public const VERISIGN_SIGNED = 'VERISIGN_SIGNED'; - + public const VERISIGN_SIGNED = "VERISIGN_SIGNED"; /** *

The Windows Certificate Security: PDFreactor creates a signature with the adbe.pkcs7.sha1 (PKCS#7) filter type.

- * * @var string */ - public const WINCER_SIGNED = 'WINCER_SIGNED'; + public const WINCER_SIGNED = "WINCER_SIGNED"; } /** *

An enum containing constants for viewer preferences.

*/ -abstract class ViewerPreferences -{ +abstract class ViewerPreferences { /** *

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

- * * @var string */ - public const CENTER_WINDOW = 'CENTER_WINDOW'; - + public const CENTER_WINDOW = "CENTER_WINDOW"; /** *

Position pages in ascending order from left to right.

- * * @var string */ - public const DIRECTION_L2R = 'DIRECTION_L2R'; - + public const DIRECTION_L2R = "DIRECTION_L2R"; /** *

Position pages in ascending order from right to left.

- * * @var string */ - public const DIRECTION_R2L = 'DIRECTION_R2L'; - + public const DIRECTION_R2L = "DIRECTION_R2L"; /** *

Display the document's title in the top bar.

- * * @var string */ - public const DISPLAY_DOC_TITLE = 'DISPLAY_DOC_TITLE'; - + public const DISPLAY_DOC_TITLE = "DISPLAY_DOC_TITLE"; /** *

Print dialog default setting: duplex (long edge).

- * * @var string */ - public const DUPLEX_FLIP_LONG_EDGE = 'DUPLEX_FLIP_LONG_EDGE'; - + public const DUPLEX_FLIP_LONG_EDGE = "DUPLEX_FLIP_LONG_EDGE"; /** *

Print dialog default setting: duplex (short edge).

- * * @var string */ - public const DUPLEX_FLIP_SHORT_EDGE = 'DUPLEX_FLIP_SHORT_EDGE'; - + public const DUPLEX_FLIP_SHORT_EDGE = "DUPLEX_FLIP_SHORT_EDGE"; /** *

Print dialog default setting: simplex.

- * * @var string */ - public const DUPLEX_SIMPLEX = 'DUPLEX_SIMPLEX'; - + public const DUPLEX_SIMPLEX = "DUPLEX_SIMPLEX"; /** *

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

- * * @var string */ - public const FIT_WINDOW = 'FIT_WINDOW'; - + public const FIT_WINDOW = "FIT_WINDOW"; /** *

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

- * * @var string */ - public const HIDE_MENUBAR = 'HIDE_MENUBAR'; - + public const HIDE_MENUBAR = "HIDE_MENUBAR"; /** *

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

- * * @var string */ - public const HIDE_TOOLBAR = 'HIDE_TOOLBAR'; - + public const HIDE_TOOLBAR = "HIDE_TOOLBAR"; /** *

Hide user interface elements in the document's window.

- * * @var string */ - public const HIDE_WINDOW_UI = 'HIDE_WINDOW_UI'; - + public const HIDE_WINDOW_UI = "HIDE_WINDOW_UI"; /** *

Show no panel on exiting full-screen mode. Has to be combined with * {@see ViewerPreferences::PAGE_MODE_FULLSCREEN} * .

- * * @var string */ - public const NON_FULLSCREEN_PAGE_MODE_USE_NONE = 'NON_FULLSCREEN_PAGE_MODE_USE_NONE'; - + public const NON_FULLSCREEN_PAGE_MODE_USE_NONE = "NON_FULLSCREEN_PAGE_MODE_USE_NONE"; /** *

Show optional content group panel on exiting full-screen mode. Has to be combined with * {@see ViewerPreferences::PAGE_MODE_FULLSCREEN} * .

- * * @var string */ - public const NON_FULLSCREEN_PAGE_MODE_USE_OC = 'NON_FULLSCREEN_PAGE_MODE_USE_OC'; - + public const NON_FULLSCREEN_PAGE_MODE_USE_OC = "NON_FULLSCREEN_PAGE_MODE_USE_OC"; /** *

Show bookmarks panel on exiting full-screen mode. Has to be combined with * {@see ViewerPreferences::PAGE_MODE_FULLSCREEN} * .

- * * @var string */ - public const NON_FULLSCREEN_PAGE_MODE_USE_OUTLINES = 'NON_FULLSCREEN_PAGE_MODE_USE_OUTLINES'; - + public const NON_FULLSCREEN_PAGE_MODE_USE_OUTLINES = "NON_FULLSCREEN_PAGE_MODE_USE_OUTLINES"; /** *

Show thumbnail images panel on exiting full-screen mode. Has to be combined with * {@see ViewerPreferences::PAGE_MODE_FULLSCREEN} * .

- * * @var string */ - public const NON_FULLSCREEN_PAGE_MODE_USE_THUMBS = 'NON_FULLSCREEN_PAGE_MODE_USE_THUMBS'; - + public const NON_FULLSCREEN_PAGE_MODE_USE_THUMBS = "NON_FULLSCREEN_PAGE_MODE_USE_THUMBS"; /** *

Display the pages in one column.

- * * @var string */ - public const PAGE_LAYOUT_ONE_COLUMN = 'PAGE_LAYOUT_ONE_COLUMN'; - + public const PAGE_LAYOUT_ONE_COLUMN = "PAGE_LAYOUT_ONE_COLUMN"; /** *

Display one page at a time (default).

- * * @var string */ - public const PAGE_LAYOUT_SINGLE_PAGE = 'PAGE_LAYOUT_SINGLE_PAGE'; - + public const PAGE_LAYOUT_SINGLE_PAGE = "PAGE_LAYOUT_SINGLE_PAGE"; /** *

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

- * * @var string */ - public const PAGE_LAYOUT_TWO_COLUMN_LEFT = 'PAGE_LAYOUT_TWO_COLUMN_LEFT'; - + public const PAGE_LAYOUT_TWO_COLUMN_LEFT = "PAGE_LAYOUT_TWO_COLUMN_LEFT"; /** *

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

- * * @var string */ - public const PAGE_LAYOUT_TWO_COLUMN_RIGHT = 'PAGE_LAYOUT_TWO_COLUMN_RIGHT'; - + public const PAGE_LAYOUT_TWO_COLUMN_RIGHT = "PAGE_LAYOUT_TWO_COLUMN_RIGHT"; /** *

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

- * * @var string */ - public const PAGE_LAYOUT_TWO_PAGE_LEFT = 'PAGE_LAYOUT_TWO_PAGE_LEFT'; - + public const PAGE_LAYOUT_TWO_PAGE_LEFT = "PAGE_LAYOUT_TWO_PAGE_LEFT"; /** *

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

- * * @var string */ - public const PAGE_LAYOUT_TWO_PAGE_RIGHT = 'PAGE_LAYOUT_TWO_PAGE_RIGHT'; - + public const PAGE_LAYOUT_TWO_PAGE_RIGHT = "PAGE_LAYOUT_TWO_PAGE_RIGHT"; /** *

Switch to fullscreen mode on startup.

- * * @var string */ - public const PAGE_MODE_FULLSCREEN = 'PAGE_MODE_FULLSCREEN'; - + public const PAGE_MODE_FULLSCREEN = "PAGE_MODE_FULLSCREEN"; /** *

Show attachments panel on startup.

- * * @var string */ - public const PAGE_MODE_USE_ATTACHMENTS = 'PAGE_MODE_USE_ATTACHMENTS'; - + public const PAGE_MODE_USE_ATTACHMENTS = "PAGE_MODE_USE_ATTACHMENTS"; /** *

Show no panel on startup.

- * * @var string */ - public const PAGE_MODE_USE_NONE = 'PAGE_MODE_USE_NONE'; - + public const PAGE_MODE_USE_NONE = "PAGE_MODE_USE_NONE"; /** *

Show optional content group panel on startup.

- * * @var string */ - public const PAGE_MODE_USE_OC = 'PAGE_MODE_USE_OC'; - + public const PAGE_MODE_USE_OC = "PAGE_MODE_USE_OC"; /** *

Show bookmarks panel on startup.

- * * @var string */ - public const PAGE_MODE_USE_OUTLINES = 'PAGE_MODE_USE_OUTLINES'; - + public const PAGE_MODE_USE_OUTLINES = "PAGE_MODE_USE_OUTLINES"; /** *

Show thumbnail images panel on startup.

- * * @var string */ - public const PAGE_MODE_USE_THUMBS = 'PAGE_MODE_USE_THUMBS'; - + public const PAGE_MODE_USE_THUMBS = "PAGE_MODE_USE_THUMBS"; /** *

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

- * * @var string */ - public const PICKTRAYBYPDFSIZE_FALSE = 'PICKTRAYBYPDFSIZE_FALSE'; - + public const PICKTRAYBYPDFSIZE_FALSE = "PICKTRAYBYPDFSIZE_FALSE"; /** *

Print dialog default setting: pick tray by PDF size.

- * * @var string */ - public const PICKTRAYBYPDFSIZE_TRUE = 'PICKTRAYBYPDFSIZE_TRUE'; - + public const PICKTRAYBYPDFSIZE_TRUE = "PICKTRAYBYPDFSIZE_TRUE"; /** *

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

- * * @var string */ - public const PRINTSCALING_APPDEFAULT = 'PRINTSCALING_APPDEFAULT'; - + public const PRINTSCALING_APPDEFAULT = "PRINTSCALING_APPDEFAULT"; /** *

Print dialog default setting: disabled scaling.

- * * @var string */ - public const PRINTSCALING_NONE = 'PRINTSCALING_NONE'; + public const PRINTSCALING_NONE = "PRINTSCALING_NONE"; } /** *

An enum containing the priority for XMP.

*/ -abstract class XmpPriority -{ +abstract class XmpPriority { /** *

Embed XMP ignoring requirements of the output format.

*

This may cause output PDFs to not achieve a specified conformance.

- * * @var string */ - public const HIGH = 'HIGH'; - + public const HIGH = "HIGH"; /** *

Embed XMP if the output format does not have XMP requirements.

- * * @var string */ - public const LOW = 'LOW'; - + public const LOW = "LOW"; /** *

Do not embed XMP.

- * * @var string */ - public const NONE = 'NONE'; + public const NONE = "NONE"; } +?>