Skip to content

Commit f114ced

Browse files
committed
Updated sources
1 parent 004c8d2 commit f114ced

5 files changed

Lines changed: 194 additions & 24 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"description": "This repository contains GroupDocs.Conversion Cloud SDK for PHP source code.",
33
"name": "groupdocscloud/groupdocs-conversion-cloud",
4-
"version": "24.1",
4+
"version": "24.2",
55
"license": "MIT",
66
"type": "library",
77
"keywords": [

composer.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/GroupDocs/Conversion/Configuration.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class Configuration
9595
* Version of client SDK
9696
*
9797
*/
98-
protected $clientVersion = '24.1';
98+
protected $clientVersion = '24.2';
9999

100100
/*
101101
* Constructor
@@ -290,7 +290,7 @@ public function getClientName()
290290
}
291291

292292
/*
293-
* Gets client version, default value is '24.1'
293+
* Gets client version, default value is '24.2'
294294
*
295295
*/
296296
public function getClientVersion()
@@ -308,7 +308,7 @@ public static function toDebugReport()
308308
$report = 'PHP SDK (GroupDocs\Conversion) Debug Report:' . PHP_EOL;
309309
$report .= ' OS: ' . php_uname() . PHP_EOL;
310310
$report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL;
311-
$report .= ' SDK Package Version: 24.1' . PHP_EOL;
311+
$report .= ' SDK Package Version: 24.2' . PHP_EOL;
312312
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;
313313

314314
return $report;

src/GroupDocs/Conversion/Model/PdfConvertOptions.php

Lines changed: 179 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class PdfConvertOptions extends ConvertOptions
5353
protected static $swaggerTypes = [
5454
'width' => 'int',
5555
'height' => 'int',
56-
'dpi' => 'double',
56+
'dpi' => 'int',
5757
'password' => 'string',
5858
'marginTop' => 'int',
5959
'marginBottom' => 'int',
@@ -80,7 +80,9 @@ class PdfConvertOptions extends ConvertOptions
8080
'nonFullScreenPageMode' => 'string',
8181
'pageLayout' => 'string',
8282
'pageMode' => 'string',
83-
'rotate' => 'string'
83+
'rotate' => 'string',
84+
'pageSize' => 'string',
85+
'pageOrientation' => 'string'
8486
];
8587

8688
/*
@@ -91,7 +93,7 @@ class PdfConvertOptions extends ConvertOptions
9193
protected static $swaggerFormats = [
9294
'width' => 'int32',
9395
'height' => 'int32',
94-
'dpi' => 'double',
96+
'dpi' => 'int32',
9597
'password' => null,
9698
'marginTop' => 'int32',
9799
'marginBottom' => 'int32',
@@ -118,7 +120,9 @@ class PdfConvertOptions extends ConvertOptions
118120
'nonFullScreenPageMode' => null,
119121
'pageLayout' => null,
120122
'pageMode' => null,
121-
'rotate' => null
123+
'rotate' => null,
124+
'pageSize' => null,
125+
'pageOrientation' => null
122126
];
123127

124128
/*
@@ -177,7 +181,9 @@ public static function swaggerFormats()
177181
'nonFullScreenPageMode' => 'NonFullScreenPageMode',
178182
'pageLayout' => 'PageLayout',
179183
'pageMode' => 'PageMode',
180-
'rotate' => 'Rotate'
184+
'rotate' => 'Rotate',
185+
'pageSize' => 'PageSize',
186+
'pageOrientation' => 'PageOrientation'
181187
];
182188

183189
/*
@@ -215,7 +221,9 @@ public static function swaggerFormats()
215221
'nonFullScreenPageMode' => 'setNonFullScreenPageMode',
216222
'pageLayout' => 'setPageLayout',
217223
'pageMode' => 'setPageMode',
218-
'rotate' => 'setRotate'
224+
'rotate' => 'setRotate',
225+
'pageSize' => 'setPageSize',
226+
'pageOrientation' => 'setPageOrientation'
219227
];
220228

221229
/*
@@ -253,7 +261,9 @@ public static function swaggerFormats()
253261
'nonFullScreenPageMode' => 'getNonFullScreenPageMode',
254262
'pageLayout' => 'getPageLayout',
255263
'pageMode' => 'getPageMode',
256-
'rotate' => 'getRotate'
264+
'rotate' => 'getRotate',
265+
'pageSize' => 'getPageSize',
266+
'pageOrientation' => 'getPageOrientation'
257267
];
258268

259269
/*
@@ -338,6 +348,27 @@ public function getModelName()
338348
const ROTATE_ON90 = 'On90';
339349
const ROTATE_ON180 = 'On180';
340350
const ROTATE_ON270 = 'On270';
351+
const PAGE_SIZE__DEFAULT = 'Default';
352+
const PAGE_SIZE_A3 = 'A3';
353+
const PAGE_SIZE_STATEMENT = 'Statement';
354+
const PAGE_SIZE_QUARTO = 'Quarto';
355+
const PAGE_SIZE_PAPER11X17 = 'Paper11x17';
356+
const PAGE_SIZE_PAPER10X14 = 'Paper10x14';
357+
const PAGE_SIZE_LETTER = 'Letter';
358+
const PAGE_SIZE_LEGAL = 'Legal';
359+
const PAGE_SIZE_LEDGER = 'Ledger';
360+
const PAGE_SIZE_FOLIO = 'Folio';
361+
const PAGE_SIZE_EXECUTIVE = 'Executive';
362+
const PAGE_SIZE_ENVELOPE_DL = 'EnvelopeDL';
363+
const PAGE_SIZE_CUSTOM = 'Custom';
364+
const PAGE_SIZE_B5 = 'B5';
365+
const PAGE_SIZE_B4 = 'B4';
366+
const PAGE_SIZE_A5 = 'A5';
367+
const PAGE_SIZE_A4 = 'A4';
368+
const PAGE_SIZE_TABLOID = 'Tabloid';
369+
const PAGE_ORIENTATION__DEFAULT = 'Default';
370+
const PAGE_ORIENTATION_LANDSCAPE = 'Landscape';
371+
const PAGE_ORIENTATION_PORTRAIT = 'Portrait';
341372

342373

343374

@@ -448,6 +479,49 @@ public function getRotateAllowableValues()
448479
];
449480
}
450481

482+
/*
483+
* Gets allowable values of the enum
484+
*
485+
* @return string[]
486+
*/
487+
public function getPageSizeAllowableValues()
488+
{
489+
return [
490+
self::PAGE_SIZE__DEFAULT,
491+
self::PAGE_SIZE_A3,
492+
self::PAGE_SIZE_STATEMENT,
493+
self::PAGE_SIZE_QUARTO,
494+
self::PAGE_SIZE_PAPER11X17,
495+
self::PAGE_SIZE_PAPER10X14,
496+
self::PAGE_SIZE_LETTER,
497+
self::PAGE_SIZE_LEGAL,
498+
self::PAGE_SIZE_LEDGER,
499+
self::PAGE_SIZE_FOLIO,
500+
self::PAGE_SIZE_EXECUTIVE,
501+
self::PAGE_SIZE_ENVELOPE_DL,
502+
self::PAGE_SIZE_CUSTOM,
503+
self::PAGE_SIZE_B5,
504+
self::PAGE_SIZE_B4,
505+
self::PAGE_SIZE_A5,
506+
self::PAGE_SIZE_A4,
507+
self::PAGE_SIZE_TABLOID,
508+
];
509+
}
510+
511+
/*
512+
* Gets allowable values of the enum
513+
*
514+
* @return string[]
515+
*/
516+
public function getPageOrientationAllowableValues()
517+
{
518+
return [
519+
self::PAGE_ORIENTATION__DEFAULT,
520+
self::PAGE_ORIENTATION_LANDSCAPE,
521+
self::PAGE_ORIENTATION_PORTRAIT,
522+
];
523+
}
524+
451525

452526

453527
/*
@@ -490,6 +564,8 @@ public function __construct(array $data = null)
490564
$this->container['pageLayout'] = isset($data['pageLayout']) ? $data['pageLayout'] : null;
491565
$this->container['pageMode'] = isset($data['pageMode']) ? $data['pageMode'] : null;
492566
$this->container['rotate'] = isset($data['rotate']) ? $data['rotate'] : null;
567+
$this->container['pageSize'] = isset($data['pageSize']) ? $data['pageSize'] : null;
568+
$this->container['pageOrientation'] = isset($data['pageOrientation']) ? $data['pageOrientation'] : null;
493569
}
494570

495571
/*
@@ -636,6 +712,28 @@ public function listInvalidProperties()
636712
);
637713
}
638714

715+
if ($this->container['pageSize'] === null) {
716+
$invalidProperties[] = "'pageSize' can't be null";
717+
}
718+
$allowedValues = $this->getPageSizeAllowableValues();
719+
if (!in_array($this->container['pageSize'], $allowedValues)) {
720+
$invalidProperties[] = sprintf(
721+
"invalid value for 'pageSize', must be one of '%s'",
722+
implode("', '", $allowedValues)
723+
);
724+
}
725+
726+
if ($this->container['pageOrientation'] === null) {
727+
$invalidProperties[] = "'pageOrientation' can't be null";
728+
}
729+
$allowedValues = $this->getPageOrientationAllowableValues();
730+
if (!in_array($this->container['pageOrientation'], $allowedValues)) {
731+
$invalidProperties[] = sprintf(
732+
"invalid value for 'pageOrientation', must be one of '%s'",
733+
implode("', '", $allowedValues)
734+
);
735+
}
736+
639737
return $invalidProperties;
640738
}
641739

@@ -762,6 +860,20 @@ public function valid()
762860
if (!in_array($this->container['rotate'], $allowedValues)) {
763861
return false;
764862
}
863+
if ($this->container['pageSize'] === null) {
864+
return false;
865+
}
866+
$allowedValues = $this->getPageSizeAllowableValues();
867+
if (!in_array($this->container['pageSize'], $allowedValues)) {
868+
return false;
869+
}
870+
if ($this->container['pageOrientation'] === null) {
871+
return false;
872+
}
873+
$allowedValues = $this->getPageOrientationAllowableValues();
874+
if (!in_array($this->container['pageOrientation'], $allowedValues)) {
875+
return false;
876+
}
765877
return true;
766878
}
767879

@@ -817,7 +929,7 @@ public function setHeight($height)
817929
/*
818930
* Gets dpi
819931
*
820-
* @return double
932+
* @return int
821933
*/
822934
public function getDpi()
823935
{
@@ -827,7 +939,7 @@ public function getDpi()
827939
/*
828940
* Sets dpi
829941
*
830-
* @param double $dpi Desired page DPI after conversion. The default resolution is: 96dpi
942+
* @param int $dpi Desired page DPI after conversion. The default resolution is: 96dpi
831943
*
832944
* @return $this
833945
*/
@@ -1515,6 +1627,64 @@ public function setRotate($rotate)
15151627

15161628
return $this;
15171629
}
1630+
1631+
/*
1632+
* Gets pageSize
1633+
*
1634+
* @return string
1635+
*/
1636+
public function getPageSize()
1637+
{
1638+
return $this->container['pageSize'];
1639+
}
1640+
1641+
/*
1642+
* Sets pageSize
1643+
*
1644+
* @param string $pageSize Specifies page size
1645+
*
1646+
* @return $this
1647+
*/
1648+
public function setPageSize($pageSize)
1649+
{
1650+
$allowedValues = $this->getPageSizeAllowableValues();
1651+
if ((!is_numeric($pageSize) && !in_array($pageSize, $allowedValues)) || (is_numeric($pageSize) && !in_array($allowedValues[$pageSize], $allowedValues))) {
1652+
throw new \InvalidArgumentException(sprintf("Invalid value for 'pageSize', must be one of '%s'", implode("', '", $allowedValues)));
1653+
}
1654+
1655+
$this->container['pageSize'] = $pageSize;
1656+
1657+
return $this;
1658+
}
1659+
1660+
/*
1661+
* Gets pageOrientation
1662+
*
1663+
* @return string
1664+
*/
1665+
public function getPageOrientation()
1666+
{
1667+
return $this->container['pageOrientation'];
1668+
}
1669+
1670+
/*
1671+
* Sets pageOrientation
1672+
*
1673+
* @param string $pageOrientation Specifies page orientation
1674+
*
1675+
* @return $this
1676+
*/
1677+
public function setPageOrientation($pageOrientation)
1678+
{
1679+
$allowedValues = $this->getPageOrientationAllowableValues();
1680+
if ((!is_numeric($pageOrientation) && !in_array($pageOrientation, $allowedValues)) || (is_numeric($pageOrientation) && !in_array($allowedValues[$pageOrientation], $allowedValues))) {
1681+
throw new \InvalidArgumentException(sprintf("Invalid value for 'pageOrientation', must be one of '%s'", implode("', '", $allowedValues)));
1682+
}
1683+
1684+
$this->container['pageOrientation'] = $pageOrientation;
1685+
1686+
return $this;
1687+
}
15181688
/*
15191689
* Returns true if offset exists. False otherwise.
15201690
*

0 commit comments

Comments
 (0)