Skip to content

Commit ca7c057

Browse files
committed
Updated sources
1 parent 9e87a1b commit ca7c057

5 files changed

Lines changed: 119 additions & 15 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": "21.9",
4+
"version": "21.10",
55
"license": "MIT",
66
"type": "library",
77
"keywords": [

composer.lock

Lines changed: 1 addition & 1 deletion
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 = '21.9';
98+
protected $clientVersion = '21.10';
9999

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

292292
/*
293-
* Gets client version, default value is '21.9'
293+
* Gets client version, default value is '21.10'
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: 21.9' . PHP_EOL;
311+
$report .= ' SDK Package Version: 21.10' . PHP_EOL;
312312
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;
313313

314314
return $report;

src/GroupDocs/Conversion/Model/WatermarkOptions.php

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ class WatermarkOptions implements ArrayAccess
6666
'rotationAngle' => 'int',
6767
'transparency' => 'double',
6868
'background' => 'bool',
69-
'image' => 'string'
69+
'image' => 'string',
70+
'autoAlign' => 'bool'
7071
];
7172

7273
/*
@@ -88,7 +89,8 @@ class WatermarkOptions implements ArrayAccess
8889
'rotationAngle' => 'int32',
8990
'transparency' => 'double',
9091
'background' => null,
91-
'image' => null
92+
'image' => null,
93+
'autoAlign' => null
9294
];
9395

9496
/*
@@ -131,7 +133,8 @@ public static function swaggerFormats()
131133
'rotationAngle' => 'RotationAngle',
132134
'transparency' => 'Transparency',
133135
'background' => 'Background',
134-
'image' => 'Image'
136+
'image' => 'Image',
137+
'autoAlign' => 'AutoAlign'
135138
];
136139

137140
/*
@@ -153,7 +156,8 @@ public static function swaggerFormats()
153156
'rotationAngle' => 'setRotationAngle',
154157
'transparency' => 'setTransparency',
155158
'background' => 'setBackground',
156-
'image' => 'setImage'
159+
'image' => 'setImage',
160+
'autoAlign' => 'setAutoAlign'
157161
];
158162

159163
/*
@@ -175,7 +179,8 @@ public static function swaggerFormats()
175179
'rotationAngle' => 'getRotationAngle',
176180
'transparency' => 'getTransparency',
177181
'background' => 'getBackground',
178-
'image' => 'getImage'
182+
'image' => 'getImage',
183+
'autoAlign' => 'getAutoAlign'
179184
];
180185

181186
/*
@@ -252,6 +257,7 @@ public function __construct(array $data = null)
252257
$this->container['transparency'] = isset($data['transparency']) ? $data['transparency'] : null;
253258
$this->container['background'] = isset($data['background']) ? $data['background'] : null;
254259
$this->container['image'] = isset($data['image']) ? $data['image'] : null;
260+
$this->container['autoAlign'] = isset($data['autoAlign']) ? $data['autoAlign'] : null;
255261
}
256262

257263
/*
@@ -293,6 +299,9 @@ public function listInvalidProperties()
293299
if ($this->container['background'] === null) {
294300
$invalidProperties[] = "'background' can't be null";
295301
}
302+
if ($this->container['autoAlign'] === null) {
303+
$invalidProperties[] = "'autoAlign' can't be null";
304+
}
296305
return $invalidProperties;
297306
}
298307

@@ -335,6 +344,9 @@ public function valid()
335344
if ($this->container['background'] === null) {
336345
return false;
337346
}
347+
if ($this->container['autoAlign'] === null) {
348+
return false;
349+
}
338350
return true;
339351
}
340352

@@ -674,6 +686,30 @@ public function setImage($image)
674686

675687
return $this;
676688
}
689+
690+
/*
691+
* Gets autoAlign
692+
*
693+
* @return bool
694+
*/
695+
public function getAutoAlign()
696+
{
697+
return $this->container['autoAlign'];
698+
}
699+
700+
/*
701+
* Sets autoAlign
702+
*
703+
* @param bool $autoAlign Auto scale the watermark. If the value is true the font size and the position is automatically calculated to fit the page size.
704+
*
705+
* @return $this
706+
*/
707+
public function setAutoAlign($autoAlign)
708+
{
709+
$this->container['autoAlign'] = $autoAlign;
710+
711+
return $this;
712+
}
677713
/*
678714
* Returns true if offset exists. False otherwise.
679715
*

src/GroupDocs/Conversion/Model/WordProcessingConvertOptions.php

Lines changed: 73 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ class WordProcessingConvertOptions extends ConvertOptions
5656
'dpi' => 'double',
5757
'password' => 'string',
5858
'zoom' => 'int',
59-
'watermarkOptions' => '\GroupDocs\Conversion\Model\WatermarkOptions'
59+
'watermarkOptions' => '\GroupDocs\Conversion\Model\WatermarkOptions',
60+
'pdfRecognitionMode' => 'string'
6061
];
6162

6263
/*
@@ -70,7 +71,8 @@ class WordProcessingConvertOptions extends ConvertOptions
7071
'dpi' => 'double',
7172
'password' => null,
7273
'zoom' => 'int32',
73-
'watermarkOptions' => null
74+
'watermarkOptions' => null,
75+
'pdfRecognitionMode' => null
7476
];
7577

7678
/*
@@ -105,7 +107,8 @@ public static function swaggerFormats()
105107
'dpi' => 'Dpi',
106108
'password' => 'Password',
107109
'zoom' => 'Zoom',
108-
'watermarkOptions' => 'WatermarkOptions'
110+
'watermarkOptions' => 'WatermarkOptions',
111+
'pdfRecognitionMode' => 'PdfRecognitionMode'
109112
];
110113

111114
/*
@@ -119,7 +122,8 @@ public static function swaggerFormats()
119122
'dpi' => 'setDpi',
120123
'password' => 'setPassword',
121124
'zoom' => 'setZoom',
122-
'watermarkOptions' => 'setWatermarkOptions'
125+
'watermarkOptions' => 'setWatermarkOptions',
126+
'pdfRecognitionMode' => 'setPdfRecognitionMode'
123127
];
124128

125129
/*
@@ -133,7 +137,8 @@ public static function swaggerFormats()
133137
'dpi' => 'getDpi',
134138
'password' => 'getPassword',
135139
'zoom' => 'getZoom',
136-
'watermarkOptions' => 'getWatermarkOptions'
140+
'watermarkOptions' => 'getWatermarkOptions',
141+
'pdfRecognitionMode' => 'getPdfRecognitionMode'
137142
];
138143

139144
/*
@@ -177,9 +182,24 @@ public function getModelName()
177182
return self::$swaggerModelName;
178183
}
179184

185+
const PDF_RECOGNITION_MODE_TEXTBOX = 'Textbox';
186+
const PDF_RECOGNITION_MODE_FLOW = 'Flow';
180187

181188

182189

190+
/*
191+
* Gets allowable values of the enum
192+
*
193+
* @return string[]
194+
*/
195+
public function getPdfRecognitionModeAllowableValues()
196+
{
197+
return [
198+
self::PDF_RECOGNITION_MODE_TEXTBOX,
199+
self::PDF_RECOGNITION_MODE_FLOW,
200+
];
201+
}
202+
183203

184204

185205
/*
@@ -198,6 +218,7 @@ public function __construct(array $data = null)
198218
$this->container['password'] = isset($data['password']) ? $data['password'] : null;
199219
$this->container['zoom'] = isset($data['zoom']) ? $data['zoom'] : null;
200220
$this->container['watermarkOptions'] = isset($data['watermarkOptions']) ? $data['watermarkOptions'] : null;
221+
$this->container['pdfRecognitionMode'] = isset($data['pdfRecognitionMode']) ? $data['pdfRecognitionMode'] : null;
201222
}
202223

203224
/*
@@ -221,6 +242,17 @@ public function listInvalidProperties()
221242
if ($this->container['zoom'] === null) {
222243
$invalidProperties[] = "'zoom' can't be null";
223244
}
245+
if ($this->container['pdfRecognitionMode'] === null) {
246+
$invalidProperties[] = "'pdfRecognitionMode' can't be null";
247+
}
248+
$allowedValues = $this->getPdfRecognitionModeAllowableValues();
249+
if (!in_array($this->container['pdfRecognitionMode'], $allowedValues)) {
250+
$invalidProperties[] = sprintf(
251+
"invalid value for 'pdfRecognitionMode', must be one of '%s'",
252+
implode("', '", $allowedValues)
253+
);
254+
}
255+
224256
return $invalidProperties;
225257
}
226258

@@ -248,6 +280,13 @@ public function valid()
248280
if ($this->container['zoom'] === null) {
249281
return false;
250282
}
283+
if ($this->container['pdfRecognitionMode'] === null) {
284+
return false;
285+
}
286+
$allowedValues = $this->getPdfRecognitionModeAllowableValues();
287+
if (!in_array($this->container['pdfRecognitionMode'], $allowedValues)) {
288+
return false;
289+
}
251290
return true;
252291
}
253292

@@ -395,6 +434,35 @@ public function setWatermarkOptions($watermarkOptions)
395434

396435
return $this;
397436
}
437+
438+
/*
439+
* Gets pdfRecognitionMode
440+
*
441+
* @return string
442+
*/
443+
public function getPdfRecognitionMode()
444+
{
445+
return $this->container['pdfRecognitionMode'];
446+
}
447+
448+
/*
449+
* Sets pdfRecognitionMode
450+
*
451+
* @param string $pdfRecognitionMode Recognition mode when converting from pdf
452+
*
453+
* @return $this
454+
*/
455+
public function setPdfRecognitionMode($pdfRecognitionMode)
456+
{
457+
$allowedValues = $this->getPdfRecognitionModeAllowableValues();
458+
if ((!is_numeric($pdfRecognitionMode) && !in_array($pdfRecognitionMode, $allowedValues)) || (is_numeric($pdfRecognitionMode) && !in_array($allowedValues[$pdfRecognitionMode], $allowedValues))) {
459+
throw new \InvalidArgumentException(sprintf("Invalid value for 'pdfRecognitionMode', must be one of '%s'", implode("', '", $allowedValues)));
460+
}
461+
462+
$this->container['pdfRecognitionMode'] = $pdfRecognitionMode;
463+
464+
return $this;
465+
}
398466
/*
399467
* Returns true if offset exists. False otherwise.
400468
*

0 commit comments

Comments
 (0)