Skip to content

Commit 07cddfb

Browse files
authored
Merge pull request #38 from aspose-pdf-cloud/develop
update to 22.10.0
2 parents afeb524 + 2ef336b commit 07cddfb

File tree

8 files changed

+331
-10
lines changed

8 files changed

+331
-10
lines changed

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,16 @@ These SDKs are now fully supported. If you have any questions, see any bugs or h
99

1010
Extract Text & Images of a PDF document online https://products.aspose.app/pdf/parser.
1111

12-
## Enhancements in Version 22.9
12+
## Enhancements in Version 22.10
13+
- Convert password protected PDF to DOC.
14+
- Support to convert password protected document to graphic formats.
15+
- Support to convert pages of password protected PDF to JPEG using GetPageConvertToJpeg.
16+
- Add new REST API endpoint to parse PDF document into PDF parts containing specified page ranges.
1317
- A new version of Aspose.PDF Cloud was prepared using the latest version of Aspose.PDF for .NET.
1418

19+
## Bugs fixed in Version 22.10
20+
- The PostSplitDocument API method is throwing 504 Gateway Error.
21+
1522
## Installation
1623
```
1724
go get -u github.com/aspose-pdf-cloud/aspose-pdf-cloud-go/v22
@@ -186,7 +193,7 @@ Class | Method | HTTP request | Description
186193
*PdfApi* | [**GetPages**](docs/PdfApi.md#getpages) | **Get** /pdf/{name}/pages | Read document pages info.
187194
*PdfApi* | [**GetPclInStorageToPdf**](docs/PdfApi.md#getpclinstoragetopdf) | **Get** /pdf/create/pcl | Convert PCL file (located on storage) to PDF format and return resulting file in response.
188195
*PdfApi* | [**GetPdfAInStorageToPdf**](docs/PdfApi.md#getpdfainstoragetopdf) | **Get** /pdf/create/pdfa | Convert PDFA file (located on storage) to PDF format and return resulting file in response.
189-
*PdfApi* | [**GetPdfInStorageToDoc**](docs/PdfApi.md#getpdfinstoragetodoc) | **Get** /pdf/{name}/convert/doc | Converts PDF document (located on storage) to DOC format and returns resulting file in response content
196+
*PdfApi* | [**GetPdfInStorageToDoc**](docs/PdfApi.md#getpdfinstoragetodoc) | **Get** /pdf/{name}/convert/doc | Converts PDF document (located on storage) to DOC format and returns resulting file in response content.
190197
*PdfApi* | [**GetPdfInStorageToEpub**](docs/PdfApi.md#getpdfinstoragetoepub) | **Get** /pdf/{name}/convert/epub | Converts PDF document (located on storage) to EPUB format and returns resulting file in response content
191198
*PdfApi* | [**GetPdfInStorageToHtml**](docs/PdfApi.md#getpdfinstoragetohtml) | **Get** /pdf/{name}/convert/html | Converts PDF document (located on storage) to Html format and returns resulting file in response content
192199
*PdfApi* | [**GetPdfInStorageToMobiXml**](docs/PdfApi.md#getpdfinstoragetomobixml) | **Get** /pdf/{name}/convert/mobixml | Converts PDF document (located on storage) to MOBIXML format and returns resulting ZIP archive file in response content.
@@ -287,6 +294,7 @@ Class | Method | HTTP request | Description
287294
*PdfApi* | [**PostSignPage**](docs/PdfApi.md#postsignpage) | **Post** /pdf/{name}/pages/{pageNumber}/sign | Sign page.
288295
*PdfApi* | [**PostSignatureField**](docs/PdfApi.md#postsignaturefield) | **Post** /pdf/{name}/fields/signature | Add document signature field.
289296
*PdfApi* | [**PostSplitDocument**](docs/PdfApi.md#postsplitdocument) | **Post** /pdf/{name}/split | Split document to parts.
297+
*PdfApi* | [**PostSplitRangePdfDocument**](docs/PdfApi.md#postsplitrangepdfdocument) | **Post** /pdf/{name}/splitrangepdf |
290298
*PdfApi* | [**PostTextBoxFields**](docs/PdfApi.md#posttextboxfields) | **Post** /pdf/{name}/fields/textbox | Add document text box fields.
291299
*PdfApi* | [**PutAddNewPage**](docs/PdfApi.md#putaddnewpage) | **Put** /pdf/{name}/pages | Add new page to end of the document.
292300
*PdfApi* | [**PutAddText**](docs/PdfApi.md#putaddtext) | **Put** /pdf/{name}/pages/{pageNumber}/text | Add text to PDF document page.
@@ -353,7 +361,7 @@ Class | Method | HTTP request | Description
353361
*PdfApi* | [**PutPdfInRequestToXlsx**](docs/PdfApi.md#putpdfinrequesttoxlsx) | **Put** /pdf/convert/xlsx | Converts PDF document (in request content) to XLSX format and uploads resulting file to storage.
354362
*PdfApi* | [**PutPdfInRequestToXml**](docs/PdfApi.md#putpdfinrequesttoxml) | **Put** /pdf/convert/xml | Converts PDF document (in request content) to XML format and uploads resulting file to storage.
355363
*PdfApi* | [**PutPdfInRequestToXps**](docs/PdfApi.md#putpdfinrequesttoxps) | **Put** /pdf/convert/xps | Converts PDF document (in request content) to XPS format and uploads resulting file to storage.
356-
*PdfApi* | [**PutPdfInStorageToDoc**](docs/PdfApi.md#putpdfinstoragetodoc) | **Put** /pdf/{name}/convert/doc | Converts PDF document (located on storage) to DOC format and uploads resulting file to storage
364+
*PdfApi* | [**PutPdfInStorageToDoc**](docs/PdfApi.md#putpdfinstoragetodoc) | **Put** /pdf/{name}/convert/doc | Converts PDF document (located on storage) to DOC format and uploads resulting file to storage.
357365
*PdfApi* | [**PutPdfInStorageToEpub**](docs/PdfApi.md#putpdfinstoragetoepub) | **Put** /pdf/{name}/convert/epub | Converts PDF document (located on storage) to EPUB format and uploads resulting file to storage
358366
*PdfApi* | [**PutPdfInStorageToHtml**](docs/PdfApi.md#putpdfinstoragetohtml) | **Put** /pdf/{name}/convert/html | Converts PDF document (located on storage) to Html format and uploads resulting file to storage
359367
*PdfApi* | [**PutPdfInStorageToMobiXml**](docs/PdfApi.md#putpdfinstoragetomobixml) | **Put** /pdf/{name}/convert/mobixml | Converts PDF document (located on storage) to MOBIXML format and uploads resulting ZIP archive file to storage
@@ -475,6 +483,7 @@ Class | Method | HTTP request | Description
475483
- [OutputFormat](docs/OutputFormat.md)
476484
- [PageLayout](docs/PageLayout.md)
477485
- [PageMode](docs/PageMode.md)
486+
- [PageRange](docs/PageRange.md)
478487
- [PageWordCount](docs/PageWordCount.md)
479488
- [Paragraph](docs/Paragraph.md)
480489
- [PartsEmbeddingModes](docs/PartsEmbeddingModes.md)
@@ -495,6 +504,7 @@ Class | Method | HTTP request | Description
495504
- [SignatureType](docs/SignatureType.md)
496505
- [SoundEncoding](docs/SoundEncoding.md)
497506
- [SoundIcon](docs/SoundIcon.md)
507+
- [SplitRangePdfOptions](docs/SplitRangePdfOptions.md)
498508
- [SplitResult](docs/SplitResult.md)
499509
- [Stamp](docs/Stamp.md)
500510
- [StampIcon](docs/StampIcon.md)

api_client.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ func (c *APIClient) prepareRequest (
176176

177177
// set custom header
178178
headerParams["x-aspose-client"] = "go sdk"
179-
headerParams["x-aspose-client-version"] = "22.9.0"
179+
headerParams["x-aspose-client-version"] = "22.10.0"
180180

181181
// Detect postBody type and post.
182182
if postBody != nil {
@@ -421,6 +421,7 @@ func (a *APIClient) addAuth(request *http.Request) (err error) {
421421

422422
// RequestOauthToken function for requests OAuth token
423423
func (a *APIClient) RequestOauthToken() error {
424+
fmt.Println("BasePath: " + a.cfg.BasePath)
424425
tokenUrl := strings.Replace(a.cfg.BasePath, "/v3.0", "/connect/token", -1)
425426
// tokenUrl := a.cfg.BasePath + "/pdf/connect/token"
426427
fmt.Println("tokenUrl: " + tokenUrl)

docs/PageRange.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# PageRange
2+
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**From** | **int32** | | [optional] [default to null]
8+
**To** | **int32** | | [optional] [default to null]
9+
10+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)[[View Source]](../page_range.go)
11+
12+

docs/PdfApi.md

Lines changed: 53 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Method | HTTP request | Description
145145
[**GetPages**](PdfApi.md#GetPages) | **Get** /pdf/{name}/pages | Read document pages info.
146146
[**GetPclInStorageToPdf**](PdfApi.md#GetPclInStorageToPdf) | **Get** /pdf/create/pcl | Convert PCL file (located on storage) to PDF format and return resulting file in response.
147147
[**GetPdfAInStorageToPdf**](PdfApi.md#GetPdfAInStorageToPdf) | **Get** /pdf/create/pdfa | Convert PDFA file (located on storage) to PDF format and return resulting file in response.
148-
[**GetPdfInStorageToDoc**](PdfApi.md#GetPdfInStorageToDoc) | **Get** /pdf/{name}/convert/doc | Converts PDF document (located on storage) to DOC format and returns resulting file in response content
148+
[**GetPdfInStorageToDoc**](PdfApi.md#GetPdfInStorageToDoc) | **Get** /pdf/{name}/convert/doc | Converts PDF document (located on storage) to DOC format and returns resulting file in response content.
149149
[**GetPdfInStorageToEpub**](PdfApi.md#GetPdfInStorageToEpub) | **Get** /pdf/{name}/convert/epub | Converts PDF document (located on storage) to EPUB format and returns resulting file in response content
150150
[**GetPdfInStorageToHtml**](PdfApi.md#GetPdfInStorageToHtml) | **Get** /pdf/{name}/convert/html | Converts PDF document (located on storage) to Html format and returns resulting file in response content
151151
[**GetPdfInStorageToMobiXml**](PdfApi.md#GetPdfInStorageToMobiXml) | **Get** /pdf/{name}/convert/mobixml | Converts PDF document (located on storage) to MOBIXML format and returns resulting ZIP archive file in response content.
@@ -246,6 +246,7 @@ Method | HTTP request | Description
246246
[**PostSignPage**](PdfApi.md#PostSignPage) | **Post** /pdf/{name}/pages/{pageNumber}/sign | Sign page.
247247
[**PostSignatureField**](PdfApi.md#PostSignatureField) | **Post** /pdf/{name}/fields/signature | Add document signature field.
248248
[**PostSplitDocument**](PdfApi.md#PostSplitDocument) | **Post** /pdf/{name}/split | Split document to parts.
249+
[**PostSplitRangePdfDocument**](PdfApi.md#PostSplitRangePdfDocument) | **Post** /pdf/{name}/splitrangepdf |
249250
[**PostTextBoxFields**](PdfApi.md#PostTextBoxFields) | **Post** /pdf/{name}/fields/textbox | Add document text box fields.
250251
[**PutAddNewPage**](PdfApi.md#PutAddNewPage) | **Put** /pdf/{name}/pages | Add new page to end of the document.
251252
[**PutAddText**](PdfApi.md#PutAddText) | **Put** /pdf/{name}/pages/{pageNumber}/text | Add text to PDF document page.
@@ -312,7 +313,7 @@ Method | HTTP request | Description
312313
[**PutPdfInRequestToXlsx**](PdfApi.md#PutPdfInRequestToXlsx) | **Put** /pdf/convert/xlsx | Converts PDF document (in request content) to XLSX format and uploads resulting file to storage.
313314
[**PutPdfInRequestToXml**](PdfApi.md#PutPdfInRequestToXml) | **Put** /pdf/convert/xml | Converts PDF document (in request content) to XML format and uploads resulting file to storage.
314315
[**PutPdfInRequestToXps**](PdfApi.md#PutPdfInRequestToXps) | **Put** /pdf/convert/xps | Converts PDF document (in request content) to XPS format and uploads resulting file to storage.
315-
[**PutPdfInStorageToDoc**](PdfApi.md#PutPdfInStorageToDoc) | **Put** /pdf/{name}/convert/doc | Converts PDF document (located on storage) to DOC format and uploads resulting file to storage
316+
[**PutPdfInStorageToDoc**](PdfApi.md#PutPdfInStorageToDoc) | **Put** /pdf/{name}/convert/doc | Converts PDF document (located on storage) to DOC format and uploads resulting file to storage.
316317
[**PutPdfInStorageToEpub**](PdfApi.md#PutPdfInStorageToEpub) | **Put** /pdf/{name}/convert/epub | Converts PDF document (located on storage) to EPUB format and uploads resulting file to storage
317318
[**PutPdfInStorageToHtml**](PdfApi.md#PutPdfInStorageToHtml) | **Put** /pdf/{name}/convert/html | Converts PDF document (located on storage) to Html format and uploads resulting file to storage
318319
[**PutPdfInStorageToMobiXml**](PdfApi.md#PutPdfInStorageToMobiXml) | **Put** /pdf/{name}/convert/mobixml | Converts PDF document (located on storage) to MOBIXML format and uploads resulting ZIP archive file to storage
@@ -3748,6 +3749,7 @@ Name | Type | Description | Notes
37483749
**height** | **int32**| The converted image height. | [default to 0]
37493750
**folder** | **string**| The document folder. |
37503751
**storage** | **string**| The document storage. |
3752+
**password** | **string**| The password (Base64). |
37513753

37523754
### Return type
37533755

@@ -3783,6 +3785,7 @@ Name | Type | Description | Notes
37833785
**height** | **int32**| The converted image height. | [default to 0]
37843786
**folder** | **string**| The document folder. |
37853787
**storage** | **string**| The document storage. |
3788+
**password** | **string**| The password (Base64). |
37863789

37873790
### Return type
37883791

@@ -3818,6 +3821,7 @@ Name | Type | Description | Notes
38183821
**height** | **int32**| The converted image height. | [default to 0]
38193822
**folder** | **string**| The document folder. |
38203823
**storage** | **string**| The document storage. |
3824+
**password** | **string**| The password (Base64). |
38213825

38223826
### Return type
38233827

@@ -3853,6 +3857,7 @@ Name | Type | Description | Notes
38533857
**height** | **int32**| The converted image height. | [default to 0]
38543858
**folder** | **string**| The document folder. |
38553859
**storage** | **string**| The document storage. |
3860+
**password** | **string**| The password (Base64). |
38563861

38573862
### Return type
38583863

@@ -3888,6 +3893,7 @@ Name | Type | Description | Notes
38883893
**height** | **int32**| The converted image height. | [default to 0]
38893894
**folder** | **string**| The document folder. |
38903895
**storage** | **string**| The document storage. |
3896+
**password** | **string**| The password (Base64). |
38913897

38923898
### Return type
38933899

@@ -3923,6 +3929,7 @@ Name | Type | Description | Notes
39233929
**height** | **int32**| The converted image height. | [default to 0]
39243930
**folder** | **string**| The document folder. |
39253931
**storage** | **string**| The document storage. |
3932+
**password** | **string**| The password (Base64). |
39263933

39273934
### Return type
39283935

@@ -4933,7 +4940,7 @@ Name | Type | Description | Notes
49334940

49344941
# **GetPdfInStorageToDoc**
49354942
> []byte GetPdfInStorageToDoc(name, optional)
4936-
Converts PDF document (located on storage) to DOC format and returns resulting file in response content
4943+
Converts PDF document (located on storage) to DOC format and returns resulting file in response content.
49374944

49384945
### Required Parameters
49394946

@@ -4958,6 +4965,7 @@ Name | Type | Description | Notes
49584965
**relativeHorizontalProximity** | **float64**| Relative horizontal proximity. |
49594966
**folder** | **string**| The document folder. |
49604967
**storage** | **string**| The document storage. |
4968+
**password** | **string**| The password (Base64). |
49614969

49624970
### Return type
49634971

@@ -8399,6 +8407,39 @@ Name | Type | Description | Notes
83998407

84008408
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
84018409

8410+
# **PostSplitRangePdfDocument**
8411+
> SplitResultResponse PostSplitRangePdfDocument(name, options, optional)
8412+
8413+
8414+
### Required Parameters
8415+
8416+
Name | Type | Description | Notes
8417+
------------- | ------------- | ------------- | -------------
8418+
**name** | **string**| |
8419+
**options** | [**SplitRangePdfOptions**](SplitRangePdfOptions.md)| |
8420+
**optional** | **map[string]interface{}** | optional parameters | nil if no parameters
8421+
8422+
### Optional Parameters
8423+
Optional parameters are passed through a map[string]interface{}.
8424+
8425+
Name | Type | Description | Notes
8426+
------------- | ------------- | ------------- | -------------
8427+
**name** | **string**| |
8428+
**options** | [**SplitRangePdfOptions**](SplitRangePdfOptions.md)| |
8429+
**storage** | **string**| |
8430+
**folder** | **string**| |
8431+
8432+
### Return type
8433+
8434+
[**SplitResultResponse**](SplitResultResponse.md)
8435+
8436+
### HTTP request headers
8437+
8438+
- **Content-Type**: application/json
8439+
- **Accept**: application/json
8440+
8441+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
8442+
84028443
# **PostTextBoxFields**
84038444
> AsposeResponse PostTextBoxFields(name, fields, optional)
84048445
Add document text box fields.
@@ -9977,6 +10018,7 @@ Name | Type | Description | Notes
997710018
**height** | **int32**| The converted image height. | [default to 0]
997810019
**folder** | **string**| The document folder. |
997910020
**storage** | **string**| The document storage. |
10021+
**password** | **string**| The password (Base64). |
998010022

998110023
### Return type
998210024

@@ -10014,6 +10056,7 @@ Name | Type | Description | Notes
1001410056
**height** | **int32**| The converted image height. | [default to 0]
1001510057
**folder** | **string**| The document folder. |
1001610058
**storage** | **string**| The document storage. |
10059+
**password** | **string**| The password (Base64). |
1001710060

1001810061
### Return type
1001910062

@@ -10051,6 +10094,7 @@ Name | Type | Description | Notes
1005110094
**height** | **int32**| The converted image height. | [default to 0]
1005210095
**folder** | **string**| The document folder. |
1005310096
**storage** | **string**| The document storage. |
10097+
**password** | **string**| The password (Base64). |
1005410098

1005510099
### Return type
1005610100

@@ -10088,6 +10132,7 @@ Name | Type | Description | Notes
1008810132
**height** | **int32**| The converted image height. | [default to 0]
1008910133
**folder** | **string**| The document folder. |
1009010134
**storage** | **string**| The document storage. |
10135+
**password** | **string**| The password (Base64). |
1009110136

1009210137
### Return type
1009310138

@@ -10125,6 +10170,7 @@ Name | Type | Description | Notes
1012510170
**height** | **int32**| The converted image height. | [default to 0]
1012610171
**folder** | **string**| The document folder. |
1012710172
**storage** | **string**| The document storage. |
10173+
**password** | **string**| The password (Base64). |
1012810174

1012910175
### Return type
1013010176

@@ -10162,6 +10208,7 @@ Name | Type | Description | Notes
1016210208
**height** | **int32**| The converted image height. | [default to 0]
1016310209
**folder** | **string**| The document folder. |
1016410210
**storage** | **string**| The document storage. |
10211+
**password** | **string**| The password (Base64). |
1016510212

1016610213
### Return type
1016710214

@@ -10267,6 +10314,7 @@ Name | Type | Description | Notes
1026710314
**recognizeBullets** | **bool**| Recognize bullets. |
1026810315
**relativeHorizontalProximity** | **float64**| Relative horizontal proximity. |
1026910316
**storage** | **string**| The document storage. |
10317+
**password** | **string**| The password (Base64). |
1027010318
**file** | ***os.File**| A file to be converted. |
1027110319

1027210320
### Return type
@@ -10712,7 +10760,7 @@ Name | Type | Description | Notes
1071210760

1071310761
# **PutPdfInStorageToDoc**
1071410762
> AsposeResponse PutPdfInStorageToDoc(name, outPath, optional)
10715-
Converts PDF document (located on storage) to DOC format and uploads resulting file to storage
10763+
Converts PDF document (located on storage) to DOC format and uploads resulting file to storage.
1071610764

1071710765
### Required Parameters
1071810766

@@ -10739,6 +10787,7 @@ Name | Type | Description | Notes
1073910787
**relativeHorizontalProximity** | **float64**| Relative horizontal proximity. |
1074010788
**folder** | **string**| The document folder. |
1074110789
**storage** | **string**| The document storage. |
10790+
**password** | **string**| The password (Base64). |
1074210791

1074310792
### Return type
1074410793

docs/SplitRangePdfOptions.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# SplitRangePdfOptions
2+
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**PageRanges** | [**[]PageRange**](PageRange.md) | | [optional] [default to null]
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)[[View Source]](../split_range_pdf_options.go)
10+
11+

page_range.go

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
*
3+
* Copyright (c) 2022 Aspose.PDF Cloud
4+
* Permission is hereby granted, free of charge, to any person obtaining a copy
5+
* of this software and associated documentation files (the "Software"), to deal
6+
* in the Software without restriction, including without limitation the rights
7+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
* copies of the Software, and to permit persons to whom the Software is
9+
* furnished to do so, subject to the following conditions:
10+
* The above copyright notice and this permission notice shall be included in all
11+
* copies or substantial portions of the Software.
12+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18+
* SOFTWARE.
19+
*
20+
*/
21+
22+
package asposepdfcloud
23+
24+
type PageRange struct {
25+
From int32 `json:"from,omitempty"`
26+
To int32 `json:"to,omitempty"`
27+
}

0 commit comments

Comments
 (0)