Skip to content

Commit 174b7db

Browse files
authored
Merge pull request #85 from aspose-pdf-cloud/develop
update to 23.6
2 parents 626b9fb + 8af2823 commit 174b7db

File tree

7 files changed

+119
-38
lines changed

7 files changed

+119
-38
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,13 @@ 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.5
32+
## Enhancements in Version 23.6
33+
- Support to convert password protected PDF documents to PPTX.
3334
- A new version of Aspose.PDF Cloud was prepared using the latest version of Aspose.PDF for .NET.
3435

36+
## Bugs fixed in Version 23.6
37+
- Text Replacement API constantly hitting 504 Gateway Timeout.
38+
3539
## Unit Tests
3640
Aspose PDF SDK includes a suite of unit tests. These Unit Tests also serves as examples of how to use the Aspose PDF SDK.
3741

docs/PdfApi.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4320,7 +4320,7 @@ Name | Type | Description | Notes
43204320

43214321
<a name="getpdfinstoragetopptx"></a>
43224322
# **GetPdfInStorageToPptx**
4323-
> System.IO.Stream GetPdfInStorageToPptx (string name, bool? separateImages = null, bool? slidesAsImages = null, string folder = null, string storage = null)
4323+
> System.IO.Stream GetPdfInStorageToPptx (string name, bool? separateImages = null, bool? slidesAsImages = null, string folder = null, string storage = null, string password = null)
43244324
43254325
Converts PDF document (located on storage) to PPTX format and returns resulting file in response content
43264326

@@ -4334,6 +4334,7 @@ Name | Type | Description | Notes
43344334
**slidesAsImages** | **bool?**| Slides as images. | [optional]
43354335
**folder** | **string**| The document folder. | [optional]
43364336
**storage** | **string**| The document storage. | [optional]
4337+
**password** | **string**| Base64 encoded password. | [optional]
43374338

43384339
### Return type
43394340

@@ -8758,7 +8759,7 @@ Name | Type | Description | Notes
87588759

87598760
<a name="putpdfinrequesttopptx"></a>
87608761
# **PutPdfInRequestToPptx**
8761-
> AsposeResponse PutPdfInRequestToPptx (string outPath, bool? separateImages = null, bool? slidesAsImages = null, string storage = null, System.IO.Stream file = null)
8762+
> AsposeResponse PutPdfInRequestToPptx (string outPath, bool? separateImages = null, bool? slidesAsImages = null, string storage = null, string password = null, System.IO.Stream file = null)
87628763
87638764
Converts PDF document (in request content) to PPTX format and uploads resulting file to storage.
87648765

@@ -8771,6 +8772,7 @@ Name | Type | Description | Notes
87718772
**separateImages** | **bool?**| Separate images. | [optional]
87728773
**slidesAsImages** | **bool?**| Slides as images. | [optional]
87738774
**storage** | **string**| The document storage. | [optional]
8775+
**password** | **string**| Base64 encoded password. | [optional]
87748776
**file** | **System.IO.Stream**| A file to be converted. | [optional]
87758777

87768778
### Return type
@@ -9167,7 +9169,7 @@ Name | Type | Description | Notes
91679169

91689170
<a name="putpdfinstoragetopptx"></a>
91699171
# **PutPdfInStorageToPptx**
9170-
> AsposeResponse PutPdfInStorageToPptx (string name, string outPath, bool? separateImages = null, bool? slidesAsImages = null, string folder = null, string storage = null)
9172+
> AsposeResponse PutPdfInStorageToPptx (string name, string outPath, bool? separateImages = null, bool? slidesAsImages = null, string folder = null, string storage = null, string password = null)
91719173
91729174
Converts PDF document (located on storage) to PPTX format and uploads resulting file to storage
91739175

@@ -9182,6 +9184,7 @@ Name | Type | Description | Notes
91829184
**slidesAsImages** | **bool?**| Slides as images. | [optional]
91839185
**folder** | **string**| The document folder. | [optional]
91849186
**storage** | **string**| The document storage. | [optional]
9187+
**password** | **string**| Base64 encoded password. | [optional]
91859188

91869189
### Return type
91879190

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

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

26+
using System;
2627
using System.IO;
2728
using System.Net;
29+
using System.Text;
2830
using Aspose.Pdf.Cloud.Sdk.Model;
2931
using NUnit.Framework;
3032

@@ -398,6 +400,19 @@ public void GetPdfInStorageToPptxTest()
398400
Assert.That(response.Length, Is.GreaterThan(0));
399401
}
400402

403+
/// <summary>
404+
/// Test GetPdfInStorageToPptxWithPassword
405+
/// </summary>
406+
[Test]
407+
public void GetPdfInStorageToPptxTestWithPassword()
408+
{
409+
string name = "4pagesEncrypted.pdf";
410+
UploadFile(name, name);
411+
Stream response = PdfApi.GetPdfInStorageToPptx(name, folder: TempFolder,
412+
password: Convert.ToBase64String(Encoding.UTF8.GetBytes(@"user $^Password!&")));
413+
Assert.That(response.Length, Is.GreaterThan(0));
414+
}
415+
401416
/// <summary>
402417
/// Test PutPdfInStorageToPptx
403418
/// </summary>
@@ -412,6 +427,20 @@ public void PutPdfInStorageToPptxTest()
412427
Assert.That(response.Code, Is.EqualTo(200));
413428
}
414429

430+
/// <summary>
431+
/// Test PutPdfInStorageToPptxWithPassword
432+
/// </summary>
433+
[Test]
434+
public void PutPdfInStorageToPptxTestWithPassword()
435+
{
436+
string name = "4pagesEncrypted.pdf";
437+
UploadFile(name, name);
438+
string resFileName = "result.pptx";
439+
var response = PdfApi.PutPdfInStorageToPptx(name, Path.Combine(TempFolder, resFileName), folder: TempFolder,
440+
password: Convert.ToBase64String(Encoding.UTF8.GetBytes(@"user $^Password!&")));
441+
Assert.That(response.Code, Is.EqualTo(200));
442+
}
443+
415444
/// <summary>
416445
/// Test PutPdfInRequestToPptx
417446
/// </summary>
@@ -428,6 +457,21 @@ public void PutPdfInRequestToPptxTest()
428457
}
429458
}
430459

460+
/// <summary>
461+
/// Test PutPdfInRequestToPptxWithPassword
462+
/// </summary>
463+
[Test]
464+
public void PutPdfInRequestToPptxTestWithPassword()
465+
{
466+
string name = "4pagesEncrypted.pdf";
467+
using (Stream stream = System.IO.File.OpenRead(Path.Combine(TestDataFolder, name)))
468+
{
469+
string resFileName = "result.pptx";
470+
var response = PdfApi.PutPdfInRequestToPptx(Path.Combine(TempFolder, resFileName), file: stream,
471+
password: Convert.ToBase64String(Encoding.UTF8.GetBytes(@"user $^Password!&")));
472+
Assert.That(response.Code, Is.EqualTo(200));
473+
}
474+
}
431475

432476
/// <summary>
433477
/// Test GetPdfInStorageToTeX

0 commit comments

Comments
 (0)