Skip to content

Commit 8e5cd2d

Browse files
committed
Updated sources
1 parent 3270be9 commit 8e5cd2d

216 files changed

Lines changed: 316 additions & 243 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/GroupDocs.Conversion.Cloud.Sdk.Test/Api/AuthApiTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// --------------------------------------------------------------------------------------------------------------------
22
// <copyright company="Aspose Pty Ltd">
3-
// Copyright (c) 2003-2021 Aspose Pty Ltd
3+
// Copyright (c) 2003-2022 Aspose Pty Ltd
44
// </copyright>
55
// <summary>
66
// Permission is hereby granted, free of charge, to any person obtaining a copy

src/GroupDocs.Conversion.Cloud.Sdk.Test/Api/BaseApiTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// --------------------------------------------------------------------------------------------------------------------
22
// <copyright company="Aspose Pty Ltd">
3-
// Copyright (c) 2003-2021 Aspose Pty Ltd
3+
// Copyright (c) 2003-2022 Aspose Pty Ltd
44
// </copyright>
55
// <summary>
66
// Permission is hereby granted, free of charge, to any person obtaining a copy

src/GroupDocs.Conversion.Cloud.Sdk.Test/Api/ConvertApiTests.cs

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// --------------------------------------------------------------------------------------------------------------------
22
// <copyright company="Aspose Pty Ltd">
3-
// Copyright (c) 2003-2021 Aspose Pty Ltd
3+
// Copyright (c) 2003-2022 Aspose Pty Ltd
44
// </copyright>
55
// <summary>
66
// Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -159,5 +159,25 @@ public void TestConversionFontSubs()
159159
// Convert to specified format
160160
var response = ConvertApi.ConvertDocument(new ConvertDocumentRequest(settings));
161161
}
162+
163+
[Test]
164+
public void ConvertDocumentDirectTestWithOptions()
165+
{
166+
var format = "pdf";
167+
var testFile = TestFiles.PasswordProtectedDocx;
168+
169+
var loadOptions = new DocxLoadOptions
170+
{
171+
Format = "docx",
172+
Password = TestFiles.PasswordProtectedDocx.Password
173+
};
174+
var convertOptions = new PdfConvertOptions();
175+
176+
var request = new ConvertDocumentDirectRequest(format, GetTestFileStream(testFile), null, null, loadOptions, convertOptions);
177+
var result = ConvertApi.ConvertDocumentDirect(request);
178+
179+
Assert.IsNotNull(result);
180+
Assert.Greater(result.Length, 0);
181+
}
162182
}
163183
}

src/GroupDocs.Conversion.Cloud.Sdk.Test/Api/FileApiTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// --------------------------------------------------------------------------------------------------------------------
22
// <copyright company="Aspose Pty Ltd">
3-
// Copyright (c) 2003-2021 Aspose Pty Ltd
3+
// Copyright (c) 2003-2022 Aspose Pty Ltd
44
// </copyright>
55
// <summary>
66
// Permission is hereby granted, free of charge, to any person obtaining a copy

src/GroupDocs.Conversion.Cloud.Sdk.Test/Api/FolderApiTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// --------------------------------------------------------------------------------------------------------------------
22
// <copyright company="Aspose Pty Ltd">
3-
// Copyright (c) 2003-2021 Aspose Pty Ltd
3+
// Copyright (c) 2003-2022 Aspose Pty Ltd
44
// </copyright>
55
// <summary>
66
// Permission is hereby granted, free of charge, to any person obtaining a copy

src/GroupDocs.Conversion.Cloud.Sdk.Test/Api/InfoApiTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// --------------------------------------------------------------------------------------------------------------------
22
// <copyright company="Aspose Pty Ltd">
3-
// Copyright (c) 2003-2021 Aspose Pty Ltd
3+
// Copyright (c) 2003-2022 Aspose Pty Ltd
44
// </copyright>
55
// <summary>
66
// Permission is hereby granted, free of charge, to any person obtaining a copy

src/GroupDocs.Conversion.Cloud.Sdk.Test/Api/Internal/TestFile.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// --------------------------------------------------------------------------------------------------------------------
22
// <copyright company="Aspose Pty Ltd">
3-
// Copyright (c) 2003-2021 Aspose Pty Ltd
3+
// Copyright (c) 2003-2022 Aspose Pty Ltd
44
// </copyright>
55
// <summary>
66
// Permission is hereby granted, free of charge, to any person obtaining a copy

src/GroupDocs.Conversion.Cloud.Sdk.Test/Api/Internal/TestFiles.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// --------------------------------------------------------------------------------------------------------------------
22
// <copyright company="Aspose Pty Ltd" file="TestFiles.cs">
3-
// Copyright (c) 2003-2021 Aspose Pty Ltd
3+
// Copyright (c) 2003-2022 Aspose Pty Ltd
44
// </copyright>
55
// <summary>
66
// Permission is hereby granted, free of charge, to any person obtaining a copy

src/GroupDocs.Conversion.Cloud.Sdk.Test/Api/StorageApiTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// --------------------------------------------------------------------------------------------------------------------
22
// <copyright company="Aspose Pty Ltd">
3-
// Copyright (c) 2003-2021 Aspose Pty Ltd
3+
// Copyright (c) 2003-2022 Aspose Pty Ltd
44
// </copyright>
55
// <summary>
66
// Permission is hereby granted, free of charge, to any person obtaining a copy

src/GroupDocs.Conversion.Cloud.Sdk/Api/ConvertApi.cs

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// --------------------------------------------------------------------------------------------------------------------
22
// <copyright company="Aspose Pty Ltd" file="ConvertApi.cs">
3-
// Copyright (c) 2003-2021 Aspose Pty Ltd
3+
// Copyright (c) 2003-2022 Aspose Pty Ltd
44
// </copyright>
55
// <summary>
66
// Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -154,6 +154,8 @@ public System.IO.Stream ConvertDocumentDirect(ConvertDocumentDirectRequest reque
154154
.Replace("&amp;", "&")
155155
.Replace("/?", "?");
156156
var formParams = new Dictionary<string, object>();
157+
158+
157159
resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "format", request.format);
158160
resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "fromPage", request.fromPage);
159161
resourcePath = UrlHelper.AddQueryParameterToUrl(resourcePath, "pagesCount", request.pagesCount);
@@ -163,6 +165,16 @@ public System.IO.Stream ConvertDocumentDirect(ConvertDocumentDirectRequest reque
163165
formParams.Add("file", this.apiInvoker.ToFileInfo(request.File, "File"));
164166
}
165167

168+
if (request.loadOptions != null)
169+
{
170+
formParams.Add("loadOptions", request.loadOptions); // form parameter
171+
}
172+
173+
if (request.convertOptions != null)
174+
{
175+
formParams.Add("convertOptions", request.convertOptions); // form parameter
176+
}
177+
166178
return this.apiInvoker.InvokeBinaryApi(
167179
resourcePath,
168180
"PUT",
@@ -174,7 +186,7 @@ public System.IO.Stream ConvertDocumentDirect(ConvertDocumentDirectRequest reque
174186
}
175187
// --------------------------------------------------------------------------------------------------------------------
176188
// <copyright company="Aspose Pty Ltd" file="ConvertDocumentRequest.cs">
177-
// Copyright (c) 2003-2021 Aspose Pty Ltd
189+
// Copyright (c) 2003-2022 Aspose Pty Ltd
178190
// </copyright>
179191
// <summary>
180192
// Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -230,7 +242,7 @@ public ConvertDocumentRequest(ConvertSettings convertSettings)
230242
}
231243
// --------------------------------------------------------------------------------------------------------------------
232244
// <copyright company="Aspose Pty Ltd" file="ConvertDocumentDirectRequest.cs">
233-
// Copyright (c) 2003-2021 Aspose Pty Ltd
245+
// Copyright (c) 2003-2022 Aspose Pty Ltd
234246
// </copyright>
235247
// <summary>
236248
// Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -276,12 +288,16 @@ public ConvertDocumentDirectRequest()
276288
/// <param name="file">Input file to convert</param>
277289
/// <param name="fromPage">Page start conversion from</param>
278290
/// <param name="pagesCount">Number of pages to convert</param>
279-
public ConvertDocumentDirectRequest(string format, System.IO.Stream file, int? fromPage = null, int? pagesCount = null)
291+
/// <param name="loadOptions">Input file load options</param>
292+
/// <param name="convertOptions">Conversion options</param>
293+
public ConvertDocumentDirectRequest(string format, System.IO.Stream file, int? fromPage = null, int? pagesCount = null, LoadOptions loadOptions = null, ConvertOptions convertOptions = null)
280294
{
281295
this.format = format;
282296
this.File = file;
283297
this.fromPage = fromPage;
284298
this.pagesCount = pagesCount;
299+
this.loadOptions = loadOptions;
300+
this.convertOptions = convertOptions;
285301
}
286302

287303
/// <summary>
@@ -303,5 +319,15 @@ public ConvertDocumentDirectRequest(string format, System.IO.Stream file, int? f
303319
/// Number of pages to convert
304320
/// </summary>
305321
public int? pagesCount { get; set; }
322+
323+
/// <summary>
324+
/// Input file load options
325+
/// </summary>
326+
public LoadOptions loadOptions { get; set; }
327+
328+
/// <summary>
329+
/// Conversion options
330+
/// </summary>
331+
public ConvertOptions convertOptions { get; set; }
306332
}
307333
}

0 commit comments

Comments
 (0)