Skip to content

Commit 1f9c04c

Browse files
authored
Merge pull request #88 from aspose-pdf-cloud/develop
update to 23.8
2 parents 7416074 + f35baa6 commit 1f9c04c

File tree

8 files changed

+475
-104
lines changed

8 files changed

+475
-104
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,16 @@ XLS, XLSX, PPTX, DOC, DOCX, MobiXML, JPEG, EMF, PNG, BMP, GIF, TIFF, Text
2929
## Read PDF Formats
3030
MHT, PCL, PS, XSLFO, MD
3131

32-
## Enhancements in Version 23.7
33-
- Form Field MappingName property support.
32+
## Enhancements in Version 23.8
33+
- Support to split password protected PDF documents.
34+
- Support to convert password Protected PDF to Xlsx.
35+
- Support to convert password Protected PDF to Excel.
36+
- Replace a single image using multiple Image Ids.
3437
- A new version of Aspose.PDF Cloud was prepared using the latest version of Aspose.PDF for .NET.
3538

36-
## Bugs fixed in Version 23.7
37-
- Adding Radio Button throws Internal Error.
39+
## Bugs fixed in Version 23.8
40+
- The putMergeDocuments API method in Node.js Throws Gateway Error.
41+
- Text Replacement Changes the Background.
3842

3943
## Unit Tests
4044
Aspose PDF SDK includes a suite of unit tests. These Unit Tests also serves as examples of how to use the Aspose PDF SDK.

docs/PdfApi.md

Lines changed: 46 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ Method | HTTP request | Description
336336
[**PutRadioButtonField**](PdfApi.md#putradiobuttonfield) | **PUT** /pdf/\{name}/fields/radiobutton/\{fieldName} | Replace document RadioButton field
337337
[**PutRedactionAnnotation**](PdfApi.md#putredactionannotation) | **PUT** /pdf/\{name}/annotations/redaction/\{annotationId} | Replace document redaction annotation
338338
[**PutReplaceImage**](PdfApi.md#putreplaceimage) | **PUT** /pdf/\{name}/images/\{imageId} | Replace document image.
339+
[**PutReplaceMultipleImage**](PdfApi.md#putreplacemultipleimage) | **PUT** /pdf/\{name}/images/replace | Replace document multiple image.
339340
[**PutScreenAnnotation**](PdfApi.md#putscreenannotation) | **PUT** /pdf/\{name}/annotations/screen/\{annotationId} | Replace document screen annotation
340341
[**PutScreenAnnotationDataExtract**](PdfApi.md#putscreenannotationdataextract) | **PUT** /pdf/\{name}/annotations/screen/\{annotationId}/data/extract | Extract document screen annotation content to storage
341342
[**PutSearchableDocument**](PdfApi.md#putsearchabledocument) | **PUT** /pdf/\{name}/ocr | Create searchable PDF document. Generate OCR layer for images in input PDF document.
@@ -4443,7 +4444,7 @@ Name | Type | Description | Notes
44434444

44444445
<a name="getpdfinstoragetoxls"></a>
44454446
# **GetPdfInStorageToXls**
4446-
> System.IO.Stream GetPdfInStorageToXls (string name, bool? insertBlankColumnAtFirst = null, bool? minimizeTheNumberOfWorksheets = null, double? scaleFactor = null, bool? uniformWorksheets = null, string folder = null, string storage = null)
4447+
> System.IO.Stream GetPdfInStorageToXls (string name, bool? insertBlankColumnAtFirst = null, bool? minimizeTheNumberOfWorksheets = null, double? scaleFactor = null, bool? uniformWorksheets = null, string folder = null, string storage = null, string password = null)
44474448
44484449
Converts PDF document (located on storage) to XLS format and returns resulting file in response content
44494450

@@ -4459,6 +4460,7 @@ Name | Type | Description | Notes
44594460
**uniformWorksheets** | **bool?**| Uniform worksheets | [optional]
44604461
**folder** | **string**| The document folder. | [optional]
44614462
**storage** | **string**| The document storage. | [optional]
4463+
**password** | **string**| The password (Base64). | [optional]
44624464

44634465
### Return type
44644466

@@ -4473,7 +4475,7 @@ Name | Type | Description | Notes
44734475

44744476
<a name="getpdfinstoragetoxlsx"></a>
44754477
# **GetPdfInStorageToXlsx**
4476-
> System.IO.Stream GetPdfInStorageToXlsx (string name, bool? insertBlankColumnAtFirst = null, bool? minimizeTheNumberOfWorksheets = null, double? scaleFactor = null, bool? uniformWorksheets = null, string folder = null, string storage = null)
4478+
> System.IO.Stream GetPdfInStorageToXlsx (string name, bool? insertBlankColumnAtFirst = null, bool? minimizeTheNumberOfWorksheets = null, double? scaleFactor = null, bool? uniformWorksheets = null, string folder = null, string storage = null, string password = null)
44774479
44784480
Converts PDF document (located on storage) to XLSX format and returns resulting file in response content
44794481

@@ -4489,6 +4491,7 @@ Name | Type | Description | Notes
44894491
**uniformWorksheets** | **bool?**| Uniform worksheets | [optional]
44904492
**folder** | **string**| The document folder. | [optional]
44914493
**storage** | **string**| The document storage. | [optional]
4494+
**password** | **string**| The password (Base64). | [optional]
44924495

44934496
### Return type
44944497

@@ -7023,7 +7026,7 @@ Name | Type | Description | Notes
70237026

70247027
<a name="postsplitdocument"></a>
70257028
# **PostSplitDocument**
7026-
> SplitResultResponse PostSplitDocument (string name, string format = null, int? from = null, int? to = null, string storage = null, string folder = null)
7029+
> SplitResultResponse PostSplitDocument (string name, string format = null, int? from = null, int? to = null, string storage = null, string folder = null, string password = null)
70277030
70287031
Split document to parts.
70297032

@@ -7038,6 +7041,7 @@ Name | Type | Description | Notes
70387041
**to** | **int?**| End page if defined. | [optional]
70397042
**storage** | **string**| The document storage. | [optional]
70407043
**folder** | **string**| The document folder. | [optional]
7044+
**password** | **string**| Base64 encoded password. | [optional]
70417045

70427046
### Return type
70437047

@@ -7052,7 +7056,7 @@ Name | Type | Description | Notes
70527056

70537057
<a name="postsplitrangepdfdocument"></a>
70547058
# **PostSplitRangePdfDocument**
7055-
> SplitResultResponse PostSplitRangePdfDocument (string name, SplitRangePdfOptions options, string storage = null, string folder = null)
7059+
> SplitResultResponse PostSplitRangePdfDocument (string name, SplitRangePdfOptions options, string storage = null, string folder = null, string password = null)
70567060
70577061
Split document into ranges.
70587062

@@ -7065,6 +7069,7 @@ Name | Type | Description | Notes
70657069
**options** | [**SplitRangePdfOptions**](SplitRangePdfOptions.md)| The splitting options. |
70667070
**storage** | **string**| The document storage. | [optional]
70677071
**folder** | **string**| The document folder. | [optional]
7072+
**password** | **string**| Base64 encoded password. | [optional]
70687073

70697074
### Return type
70707075

@@ -8881,7 +8886,7 @@ Name | Type | Description | Notes
88818886

88828887
<a name="putpdfinrequesttoxls"></a>
88838888
# **PutPdfInRequestToXls**
8884-
> AsposeResponse PutPdfInRequestToXls (string outPath, bool? insertBlankColumnAtFirst = null, bool? minimizeTheNumberOfWorksheets = null, double? scaleFactor = null, bool? uniformWorksheets = null, string storage = null, System.IO.Stream file = null)
8889+
> AsposeResponse PutPdfInRequestToXls (string outPath, bool? insertBlankColumnAtFirst = null, bool? minimizeTheNumberOfWorksheets = null, double? scaleFactor = null, bool? uniformWorksheets = null, string storage = null, string password = null, System.IO.Stream file = null)
88858890
88868891
Converts PDF document (in request content) to XLS format and uploads resulting file to storage.
88878892

@@ -8896,6 +8901,7 @@ Name | Type | Description | Notes
88968901
**scaleFactor** | **double?**| Scale factor (Obsolete) | [optional]
88978902
**uniformWorksheets** | **bool?**| Uniform worksheets | [optional]
88988903
**storage** | **string**| The document storage. | [optional]
8904+
**password** | **string**| The password (Base64). | [optional]
88998905
**file** | **System.IO.Stream**| A file to be converted. | [optional]
89008906

89018907
### Return type
@@ -8911,7 +8917,7 @@ Name | Type | Description | Notes
89118917

89128918
<a name="putpdfinrequesttoxlsx"></a>
89138919
# **PutPdfInRequestToXlsx**
8914-
> AsposeResponse PutPdfInRequestToXlsx (string outPath, bool? insertBlankColumnAtFirst = null, bool? minimizeTheNumberOfWorksheets = null, double? scaleFactor = null, bool? uniformWorksheets = null, string storage = null, System.IO.Stream file = null)
8920+
> AsposeResponse PutPdfInRequestToXlsx (string outPath, bool? insertBlankColumnAtFirst = null, bool? minimizeTheNumberOfWorksheets = null, double? scaleFactor = null, bool? uniformWorksheets = null, string storage = null, string password = null, System.IO.Stream file = null)
89158921
89168922
Converts PDF document (in request content) to XLSX format and uploads resulting file to storage.
89178923

@@ -8926,6 +8932,7 @@ Name | Type | Description | Notes
89268932
**scaleFactor** | **double?**| Scale factor (Obsolete) | [optional]
89278933
**uniformWorksheets** | **bool?**| Uniform worksheets | [optional]
89288934
**storage** | **string**| The document storage. | [optional]
8935+
**password** | **string**| The password (Base64). | [optional]
89298936
**file** | **System.IO.Stream**| A file to be converted. | [optional]
89308937

89318938
### Return type
@@ -9295,7 +9302,7 @@ Name | Type | Description | Notes
92959302

92969303
<a name="putpdfinstoragetoxls"></a>
92979304
# **PutPdfInStorageToXls**
9298-
> AsposeResponse PutPdfInStorageToXls (string name, string outPath, bool? insertBlankColumnAtFirst = null, bool? minimizeTheNumberOfWorksheets = null, double? scaleFactor = null, bool? uniformWorksheets = null, string folder = null, string storage = null)
9305+
> AsposeResponse PutPdfInStorageToXls (string name, string outPath, bool? insertBlankColumnAtFirst = null, bool? minimizeTheNumberOfWorksheets = null, double? scaleFactor = null, bool? uniformWorksheets = null, string folder = null, string storage = null, string password = null)
92999306
93009307
Converts PDF document (located on storage) to XLS format and uploads resulting file to storage
93019308

@@ -9312,6 +9319,7 @@ Name | Type | Description | Notes
93129319
**uniformWorksheets** | **bool?**| Uniform worksheets | [optional]
93139320
**folder** | **string**| The document folder. | [optional]
93149321
**storage** | **string**| The document storage. | [optional]
9322+
**password** | **string**| The password (Base64). | [optional]
93159323

93169324
### Return type
93179325

@@ -9326,7 +9334,7 @@ Name | Type | Description | Notes
93269334

93279335
<a name="putpdfinstoragetoxlsx"></a>
93289336
# **PutPdfInStorageToXlsx**
9329-
> AsposeResponse PutPdfInStorageToXlsx (string name, string outPath, bool? insertBlankColumnAtFirst = null, bool? minimizeTheNumberOfWorksheets = null, double? scaleFactor = null, bool? uniformWorksheets = null, string folder = null, string storage = null)
9337+
> AsposeResponse PutPdfInStorageToXlsx (string name, string outPath, bool? insertBlankColumnAtFirst = null, bool? minimizeTheNumberOfWorksheets = null, double? scaleFactor = null, bool? uniformWorksheets = null, string folder = null, string storage = null, string password = null)
93309338
93319339
Converts PDF document (located on storage) to XLSX format and uploads resulting file to storage
93329340

@@ -9343,6 +9351,7 @@ Name | Type | Description | Notes
93439351
**uniformWorksheets** | **bool?**| Uniform worksheets | [optional]
93449352
**folder** | **string**| The document folder. | [optional]
93459353
**storage** | **string**| The document storage. | [optional]
9354+
**password** | **string**| The password (Base64). | [optional]
93469355

93479356
### Return type
93489357

@@ -9633,6 +9642,35 @@ Name | Type | Description | Notes
96339642

96349643
[[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)
96359644

9645+
<a name="putreplacemultipleimage"></a>
9646+
# **PutReplaceMultipleImage**
9647+
> ImagesResponse PutReplaceMultipleImage (string name, List<string> imageIds, string imageFilePath = null, string storage = null, string folder = null, System.IO.Stream image = null)
9648+
9649+
Replace document multiple image.
9650+
9651+
9652+
### Parameters
9653+
9654+
Name | Type | Description | Notes
9655+
------------- | ------------- | ------------- | -------------
9656+
**name** | **string**| The document name. |
9657+
**imageIds** | **List&lt;string&gt;**| The image IDs. |
9658+
**imageFilePath** | **string**| Path to image file if specified. Request content is used otherwise. | [optional]
9659+
**storage** | **string**| The document storage. | [optional]
9660+
**folder** | **string**| The document folder. | [optional]
9661+
**image** | **System.IO.Stream**| Image file. | [optional]
9662+
9663+
### Return type
9664+
9665+
[**ImagesResponse**](ImagesResponse.md)
9666+
9667+
### HTTP request headers
9668+
9669+
- **Content-Type**: multipart/form-data
9670+
- **Accept**: application/json
9671+
9672+
[[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)
9673+
96369674
<a name="putscreenannotation"></a>
96379675
# **PutScreenAnnotation**
96389676
> ScreenAnnotationResponse PutScreenAnnotation (string name, string annotationId, ScreenAnnotation annotation, string storage = null, string folder = null)

src/Aspose.Pdf.Cloud.Sdk.Test/ImagesTests.cs

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
// </summary>
2424
// --------------------------------------------------------------------------------------------------------------------
2525

26+
using System.Collections.Generic;
2627
using System.IO;
2728
using System.Net;
2829
using NUnit.Framework;
@@ -48,17 +49,15 @@ private string ImageId
4849
{
4950
get
5051
{
51-
if (_imageId != null) return _imageId;
52-
52+
if (_imageId != null)
53+
return _imageId;
5354
var imagesResponse = PdfApi.GetImages(Name, pageNumber: 1, folder: TempFolder);
5455
Assert.That(imagesResponse.Code, Is.EqualTo(200));
5556
_imageId = imagesResponse.Images.List[0].Id;
56-
5757
return _imageId;
5858
}
5959
}
6060

61-
6261
/// <summary>
6362
/// Test GetImage
6463
/// </summary>
@@ -91,18 +90,38 @@ public void GetImagesTest()
9190
}
9291

9392
/// <summary>
94-
/// Test PostReplaceImage
93+
/// Test PutReplaceImage
9594
/// </summary>
9695
[Test]
9796
public void PutReplaceImageTest()
9897
{
9998
const string imageName = "Koala.jpg";
100-
UploadFile(imageName, imageName);
101-
102-
var response = PdfApi.PutReplaceImage(name: Name, imageId: ImageId, imageFilePath: Path.Combine(TempFolder, imageName), folder: TempFolder);
99+
UploadFile(imageName, imageName);
100+
var response = PdfApi.PutReplaceImage(
101+
name: Name,
102+
imageId: ImageId,
103+
imageFilePath: Path.Combine(TempFolder, imageName),
104+
folder: TempFolder);
103105
Assert.That(response.Code, Is.EqualTo(200));
104106
}
105107

108+
/// <summary>
109+
/// Test PutReplaceMultipleImage
110+
/// </summary>
111+
[Test]
112+
public void PutReplaceMultipleImageTest()
113+
{
114+
const string name = "PdfWithImages.pdf";
115+
UploadFile(name, name);
116+
const string imageName = "butterfly.jpg";
117+
UploadFile(imageName, imageName);
118+
var response = PdfApi.PutReplaceMultipleImage(
119+
name: name,
120+
imageIds: new List<string>{"GE5TENJVGQZTWMJYGQWDINRUFQ2DCMRMGY4TC", "GE5TIMJSGY3TWMJXG4WDIMBZFQ2DCOJMGQ3DK"},
121+
imageFilePath: Path.Combine(TempFolder, imageName),
122+
folder: TempFolder);
123+
Assert.That(response.Code, Is.EqualTo(200));
124+
}
106125

107126
/// <summary>
108127
/// Test PostInsertImage

0 commit comments

Comments
 (0)