Skip to content

Commit da8968d

Browse files
committed
Update to v20.2
1 parent 928d77a commit da8968d

File tree

5 files changed

+284
-6
lines changed

5 files changed

+284
-6
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Aspose.PDF Cloud
22
- API version: 3.0
3-
- Package version: 20.1.0
3+
- Package version: 20.2.0
44

55
[Aspose.PDF Cloud](https://products.aspose.cloud/pdf) is a true REST API that enables you to perform a wide range of document processing operations including creation, manipulation, conversion and rendering of PDF documents in the cloud.
66

@@ -194,6 +194,7 @@ Class | Method | HTTP request | Description
194194
*PdfApi* | [**GetPageUnderlineAnnotations**](docs/PdfApi.md#getpageunderlineannotations) | **Get** /pdf/{name}/pages/{pageNumber}/annotations/underline | Read document page underline annotations.
195195
*PdfApi* | [**GetPages**](docs/PdfApi.md#getpages) | **Get** /pdf/{name}/pages | Read document pages info.
196196
*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.
197+
*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.
197198
*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
198199
*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
199200
*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
@@ -347,6 +348,7 @@ Class | Method | HTTP request | Description
347348
*PdfApi* | [**PutPageConvertToPng**](docs/PdfApi.md#putpageconverttopng) | **Put** /pdf/{name}/pages/{pageNumber}/convert/png | Convert document page to png image and upload resulting file to storage.
348349
*PdfApi* | [**PutPageConvertToTiff**](docs/PdfApi.md#putpageconverttotiff) | **Put** /pdf/{name}/pages/{pageNumber}/convert/tiff | Convert document page to Tiff image and upload resulting file to storage.
349350
*PdfApi* | [**PutPclInStorageToPdf**](docs/PdfApi.md#putpclinstoragetopdf) | **Put** /pdf/{name}/create/pcl | Convert PCL file (located on storage) to PDF format and upload resulting file to storage.
351+
*PdfApi* | [**PutPdfAInStorageToPdf**](docs/PdfApi.md#putpdfainstoragetopdf) | **Put** /pdf/{name}/create/pdfa | Convert PDFA file (located on storage) to PDF format and upload resulting file to storage.
350352
*PdfApi* | [**PutPdfInRequestToDoc**](docs/PdfApi.md#putpdfinrequesttodoc) | **Put** /pdf/convert/doc | Converts PDF document (in request content) to DOC format and uploads resulting file to storage.
351353
*PdfApi* | [**PutPdfInRequestToEpub**](docs/PdfApi.md#putpdfinrequesttoepub) | **Put** /pdf/convert/epub | Converts PDF document (in request content) to EPUB format and uploads resulting file to storage.
352354
*PdfApi* | [**PutPdfInRequestToHtml**](docs/PdfApi.md#putpdfinrequesttohtml) | **Put** /pdf/convert/html | Converts PDF document (in request content) to Html format and uploads resulting file to storage.

convert_to_pdf_test.go

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -595,8 +595,8 @@ func TestGetMarkdownInStorageToPdf(t *testing.T) {
595595

596596
func TestPutMarkdownInStorageToPdf(t *testing.T) {
597597

598-
name := "Typography.PS"
599-
resFileName := "mixed.md"
598+
name := "mixed.md"
599+
resFileName := "mixed.pdf"
600600
srcPath := GetBaseTest().remoteFolder + "/" + name
601601

602602
if err := GetBaseTest().UploadFile(name); err != nil {
@@ -615,4 +615,50 @@ func TestPutMarkdownInStorageToPdf(t *testing.T) {
615615
} else {
616616
fmt.Printf("%d\tTestPutMarkdownInStorageToPdf - %d\n", GetBaseTest().GetTestNumber(), response.Code)
617617
}
618+
}
619+
620+
// from PDFA
621+
func TestGetPdfAInStorageToPdf(t *testing.T) {
622+
623+
name := "4pagesPdfA.pdf"
624+
srcPath := GetBaseTest().remoteFolder + "/" + name
625+
626+
if err := GetBaseTest().UploadFile(name); err != nil {
627+
t.Error(err)
628+
}
629+
630+
args := make(map[string]interface{})
631+
632+
response, httpResponse, err := GetBaseTest().PdfAPI.GetPdfAInStorageToPdf(srcPath, args)
633+
if err != nil {
634+
t.Error(err)
635+
} else if httpResponse.StatusCode < 200 || httpResponse.StatusCode > 299 {
636+
t.Fail()
637+
} else {
638+
fmt.Printf("%d\tTestGetPdfAInStorageToPdf - %db\n", GetBaseTest().GetTestNumber(), len(response))
639+
}
640+
}
641+
642+
func TestPutPdfAInStorageToPdf(t *testing.T) {
643+
644+
name := "4pagesPdfA.pdf"
645+
resFileName := "fromPdfA.pdf"
646+
srcPath := GetBaseTest().remoteFolder + "/" + name
647+
648+
if err := GetBaseTest().UploadFile(name); err != nil {
649+
t.Error(err)
650+
}
651+
652+
args := map[string]interface{} {
653+
"folder": GetBaseTest().remoteFolder,
654+
}
655+
656+
response, httpResponse, err := GetBaseTest().PdfAPI.PutPdfAInStorageToPdf(resFileName, srcPath, args)
657+
if err != nil {
658+
t.Error(err)
659+
} else if httpResponse.StatusCode < 200 || httpResponse.StatusCode > 299 {
660+
t.Fail()
661+
} else {
662+
fmt.Printf("%d\tTestPutPdfAInStorageToPdf - %d\n", GetBaseTest().GetTestNumber(), response.Code)
663+
}
618664
}

docs/PdfApi.md

Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ Method | HTTP request | Description
145145
[**GetPageUnderlineAnnotations**](PdfApi.md#GetPageUnderlineAnnotations) | **Get** /pdf/{name}/pages/{pageNumber}/annotations/underline | Read document page underline annotations.
146146
[**GetPages**](PdfApi.md#GetPages) | **Get** /pdf/{name}/pages | Read document pages info.
147147
[**GetPclInStorageToPdf**](PdfApi.md#GetPclInStorageToPdf) | **Get** /pdf/create/pcl | Convert PCL file (located on storage) to PDF format and return resulting file in response.
148+
[**GetPdfAInStorageToPdf**](PdfApi.md#GetPdfAInStorageToPdf) | **Get** /pdf/create/pdfa | Convert PDFA file (located on storage) to PDF format and return resulting file in response.
148149
[**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
149150
[**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
150151
[**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
@@ -298,6 +299,7 @@ Method | HTTP request | Description
298299
[**PutPageConvertToPng**](PdfApi.md#PutPageConvertToPng) | **Put** /pdf/{name}/pages/{pageNumber}/convert/png | Convert document page to png image and upload resulting file to storage.
299300
[**PutPageConvertToTiff**](PdfApi.md#PutPageConvertToTiff) | **Put** /pdf/{name}/pages/{pageNumber}/convert/tiff | Convert document page to Tiff image and upload resulting file to storage.
300301
[**PutPclInStorageToPdf**](PdfApi.md#PutPclInStorageToPdf) | **Put** /pdf/{name}/create/pcl | Convert PCL file (located on storage) to PDF format and upload resulting file to storage.
302+
[**PutPdfAInStorageToPdf**](PdfApi.md#PutPdfAInStorageToPdf) | **Put** /pdf/{name}/create/pdfa | Convert PDFA file (located on storage) to PDF format and upload resulting file to storage.
301303
[**PutPdfInRequestToDoc**](PdfApi.md#PutPdfInRequestToDoc) | **Put** /pdf/convert/doc | Converts PDF document (in request content) to DOC format and uploads resulting file to storage.
302304
[**PutPdfInRequestToEpub**](PdfApi.md#PutPdfInRequestToEpub) | **Put** /pdf/convert/epub | Converts PDF document (in request content) to EPUB format and uploads resulting file to storage.
303305
[**PutPdfInRequestToHtml**](PdfApi.md#PutPdfInRequestToHtml) | **Put** /pdf/convert/html | Converts PDF document (in request content) to Html format and uploads resulting file to storage.
@@ -4928,6 +4930,37 @@ Name | Type | Description | Notes
49284930

49294931
[[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)
49304932

4933+
# **GetPdfAInStorageToPdf**
4934+
> []byte GetPdfAInStorageToPdf(srcPath, optional)
4935+
Convert PDFA file (located on storage) to PDF format and return resulting file in response.
4936+
4937+
### Required Parameters
4938+
4939+
Name | Type | Description | Notes
4940+
------------- | ------------- | ------------- | -------------
4941+
**srcPath** | **string**| Full source filename (ex. /folder1/folder2/template.pdf) |
4942+
**optional** | **map[string]interface{}** | optional parameters | nil if no parameters
4943+
4944+
### Optional Parameters
4945+
Optional parameters are passed through a map[string]interface{}.
4946+
4947+
Name | Type | Description | Notes
4948+
------------- | ------------- | ------------- | -------------
4949+
**srcPath** | **string**| Full source filename (ex. /folder1/folder2/template.pdf) |
4950+
**dontOptimize** | **bool**| If set, document resources will not be optimized. |
4951+
**storage** | **string**| The document storage. |
4952+
4953+
### Return type
4954+
4955+
**[]byte**
4956+
4957+
### HTTP request headers
4958+
4959+
- **Content-Type**: application/json
4960+
- **Accept**: multipart/form-data
4961+
4962+
[[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)
4963+
49314964
# **GetPdfInStorageToDoc**
49324965
> []byte GetPdfInStorageToDoc(name, optional)
49334966
Converts PDF document (located on storage) to DOC format and returns resulting file in response content
@@ -6500,7 +6533,7 @@ Add document bookmarks.
65006533
Name | Type | Description | Notes
65016534
------------- | ------------- | ------------- | -------------
65026535
**name** | **string**| The document name. |
6503-
**bookmarkPath** | **string**| The bookmark path. |
6536+
**bookmarkPath** | **string**| The parent bookmark path. Specify an empty string when adding a bookmark to the root. |
65046537
**bookmarks** | [**[]Bookmark**](Bookmark.md)| The array of bookmark. |
65056538
**optional** | **map[string]interface{}** | optional parameters | nil if no parameters
65066539

@@ -6510,7 +6543,7 @@ Optional parameters are passed through a map[string]interface{}.
65106543
Name | Type | Description | Notes
65116544
------------- | ------------- | ------------- | -------------
65126545
**name** | **string**| The document name. |
6513-
**bookmarkPath** | **string**| The bookmark path. |
6546+
**bookmarkPath** | **string**| The parent bookmark path. Specify an empty string when adding a bookmark to the root. |
65146547
**bookmarks** | [**[]Bookmark**](Bookmark.md)| The array of bookmark. |
65156548
**folder** | **string**| The document folder. |
65166549
**storage** | **string**| The document storage. |
@@ -10207,6 +10240,40 @@ Name | Type | Description | Notes
1020710240

1020810241
[[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)
1020910242

10243+
# **PutPdfAInStorageToPdf**
10244+
> AsposeResponse PutPdfAInStorageToPdf(name, srcPath, optional)
10245+
Convert PDFA file (located on storage) to PDF format and upload resulting file to storage.
10246+
10247+
### Required Parameters
10248+
10249+
Name | Type | Description | Notes
10250+
------------- | ------------- | ------------- | -------------
10251+
**name** | **string**| The document name. |
10252+
**srcPath** | **string**| Full source filename (ex. /folder1/folder2/template.pdf) |
10253+
**optional** | **map[string]interface{}** | optional parameters | nil if no parameters
10254+
10255+
### Optional Parameters
10256+
Optional parameters are passed through a map[string]interface{}.
10257+
10258+
Name | Type | Description | Notes
10259+
------------- | ------------- | ------------- | -------------
10260+
**name** | **string**| The document name. |
10261+
**srcPath** | **string**| Full source filename (ex. /folder1/folder2/template.pdf) |
10262+
**dstFolder** | **string**| The destination document folder. |
10263+
**dontOptimize** | **bool**| If set, document resources will not be optimized. |
10264+
**storage** | **string**| The document storage. |
10265+
10266+
### Return type
10267+
10268+
[**AsposeResponse**](AsposeResponse.md)
10269+
10270+
### HTTP request headers
10271+
10272+
- **Content-Type**: application/json
10273+
- **Accept**: application/json
10274+
10275+
[[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)
10276+
1021010277
# **PutPdfInRequestToDoc**
1021110278
> AsposeResponse PutPdfInRequestToDoc(outPath, optional)
1021210279
Converts PDF document (in request content) to DOC format and uploads resulting file to storage.

0 commit comments

Comments
 (0)