Last active
December 2, 2021 07:26
-
-
Save aspose-cloud/4edb9665c129607ce52c6fbdfa0ee2cd to your computer and use it in GitHub Desktop.
This Gist repository contains code snippet related to Aspose.HTML Cloud SDK for .NET
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Aspose.Tasks-Cloud-SDK-NET |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-html-cloud/aspose-html-cloud-dotnet | |
string name = "testpage2.html"; | |
string outPath = Path.Combine(testoutStorageFolder, $"{name}_converted_at_{DateTime.Now.ToString("yyMMdd_hhmmss")}.jpg"); | |
string srcPath = Path.Combine(LocalTestDataPath, name); | |
using (Stream stream = new FileStream(srcPath, FileMode.Open, FileAccess.Read)) | |
{ | |
var response = this.HtmlApi.PostConvertDocumentToImage(stream, "jpeg", outPath); | |
Assert.IsNotNull(response); | |
Assert.AreEqual(200, response.Code); | |
} | |
Assert.IsTrue(StorageApi.FileOrFolderExists(outPath)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-html-cloud/aspose-html-cloud-dotnet | |
string name = "testpage1.html"; | |
string outPath = Path.Combine(testoutStorageFolder, $"{name}_converted_at_{DateTime.Now.ToString("yyMMdd_hhmmss")}.md"); | |
string srcPath = Path.Combine(LocalTestDataPath, name); | |
using (Stream stream = new FileStream(srcPath, FileMode.Open, FileAccess.Read)) | |
{ | |
var response = this.HtmlApi.PostConvertDocumentToMarkdown(stream, outPath); | |
Assert.IsNotNull(response); | |
Assert.AreEqual(200, response.Code); | |
} | |
Assert.IsTrue(StorageApi.FileOrFolderExists(outPath)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-html-cloud/aspose-html-cloud-dotnet | |
string name = "testpage1.html"; | |
string outPath = Path.Combine(testoutStorageFolder, $"{name}_converted_at_{DateTime.Now.ToString("yyMMdd_hhmmss")}.pdf"); | |
string srcPath = Path.Combine(LocalTestDataPath, name); | |
using (Stream stream = new FileStream(srcPath, FileMode.Open, FileAccess.Read)) | |
{ | |
var response = this.HtmlApi.PostConvertDocumentToPdf(stream, outPath); | |
Assert.IsNotNull(response); | |
Assert.AreEqual(200, response.Code); | |
} | |
Assert.IsTrue(StorageApi.FileOrFolderExists(outPath)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-html-cloud/aspose-html-cloud-dotnet | |
string name = "testpage1.html"; | |
string outPath = Path.Combine(testoutStorageFolder, $"{name}_converted_at_{DateTime.Now.ToString("yyMMdd_hhmmss")}.xps"); | |
string srcPath = Path.Combine(LocalTestDataPath, name); | |
using (Stream stream = new FileStream(srcPath, FileMode.Open, FileAccess.Read)) | |
{ | |
var response = this.HtmlApi.PostConvertDocumentToXps(stream, outPath); | |
Assert.IsNotNull(response); | |
Assert.AreEqual(200, response.Code); | |
} | |
Assert.IsTrue(StorageApi.FileOrFolderExists(outPath)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment