Skip to content

Commit 593eea5

Browse files
Readme file Update
1 parent 48d5b93 commit 593eea5

File tree

1 file changed

+56
-24
lines changed

1 file changed

+56
-24
lines changed

README.md

Lines changed: 56 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,36 @@
1-
# Aspose HTML Cloud SDK
2-
This repository contains Aspose.HTML Cloud SDK source code. This SDK allows you to work with Aspose.HTML Cloud REST APIs in your applications quickly and easily.
3-
4-
See [API Reference](https://apireference.aspose.cloud/html/) for full API specification.
5-
1+
![](https://img.shields.io/badge/api-v3.0-lightgrey) [![Maven](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Frepository.aspose.cloud%2Frepo%2Fcom%2Faspose%2Faspose-html-cloud%2Fmaven-metadata.xml)](https://repository.aspose.cloud/repo/com/aspose/aspose-html-cloud/) [![License](https://img.shields.io/github/license/aspose-html-cloud/aspose-html-cloud-java)](https://repository.aspose.cloud/repo/com/aspose/aspose-html-cloud/)
2+
# HTML Rendering & Conversion Java Cloud REST API
3+
Aspose.HTML Cloud for Java is a programming SDK that allows software developers to manipulate and convert HTML documents from within their own applications. A Wrapper of RESTful APIs, Aspose.HTML Cloud for Java speeds up HTML programming and conversion.
4+
This cloud SDK assists to develop cloud-based [HTML page rendering, processing, translation & conversion](https://products.aspose.cloud/html/java) apps in Java languages via REST API.
5+
6+
## HTML Processing Features
7+
- Fetch the HTML page along with its resources as a ZIP archive by providing the page URL.
8+
- Based on page URL, retrieve all images of an HTML page as a ZIP package.
9+
- Load data from a local file to populate the HTML document template.
10+
- Use the request body to populate the HTML document template.
11+
- Convert HTML page to numerous other file formats.
12+
13+
## Read & Write HTML Formats
14+
HTML, XHTML, zipped HTML, zipped XHTML, MHTML, HTML containing SVG markup, Markdown, JSON
15+
16+
## Save HTML As
17+
*Fixed Layout*: PDF, XPS
18+
*Images*: TIFF, JPEG, PNG, BMP, GIF
19+
*Other*: TXT, ZIP (images)
20+
21+
## Read HTML Formats
22+
*eBook*: EPUB
23+
*Other*: XML, SVG
24+
25+
## Enhancements Version 20.11
26+
27+
- New generation of Aspose.HTML Cloud SDK for .NET (C#) is provided.
28+
- This version of SDK has been redesigned from scratch being based on the new Aspose.HTML Cloud REST API (v3.0).
29+
- Currently, it provides only the conversion feature. Other features that are still available in the versions up to v.20.08 are planned to be implemented in this SDK later.
30+
- Conversion interface provides a more flexible conversion parameters setup.
31+
- Redesigned storage access is provided using SDK entry point HtmlApi.Storage.
32+
- Availability of synchronous and asynchronous file upload and download methods.
33+
- Asynchronous download provides the ability to get progress data for the longer downloads.
634
## How to use the SDK?
735
The complete source code is available in this repository folder, you can either directly use it in your project.
836

@@ -64,13 +92,13 @@ import retrofit2.Call;
6492
import retrofit2.Response;
6593

6694
public class App {
67-
95+
6896
// Helper method save the response body to the destination directory
6997
public static long saveToDisc(ResponseBody body, String fileName) {
7098

7199
File savedFile = new File(Configuration.getTestDstDir() + File.separator + fileName);
72100
long fileSizeDownloaded = 0;
73-
101+
74102
try (InputStream inputStream = body.byteStream();
75103
OutputStream outputStream = new FileOutputStream(savedFile))
76104
{
@@ -90,12 +118,12 @@ public class App {
90118
return fileSizeDownloaded;
91119
}
92120

93-
121+
94122

95123
public static void main(String[] args) {
96-
124+
97125
// Get keys from aspose site.
98-
// There is free quota available.
126+
// There is free quota available.
99127
// For more details, see https://purchase.aspose.cloud/pricing
100128

101129
Configuration.setAPI_KEY("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
@@ -109,23 +137,23 @@ public class App {
109137

110138
String name = "test.html";// Document name. Place the html document in the folder "testdata".
111139
String outFormat = "jpg"; // Convert to jpg
112-
Integer width = 800; // Resulting image width.
113-
Integer height = 1000; // Resulting image height.
140+
Integer width = 800; // Resulting image width.
141+
Integer height = 1000; // Resulting image height.
114142
Integer leftMargin = 10; // Left resulting image margin.
115143
Integer rightMargin = 10; // Right resulting image margin.
116144
Integer topMargin = 10; // Top resulting image margin.
117145
Integer bottomMargin = 10; // Bottom resulting image margin.
118146
Integer resolution = 300; // Resolution of resulting image.
119147
String folder = "/"; // The folder in the storage. Should exist.
120148
String storage = null; // Name of the storage. null
121-
149+
122150
// Creating API for need operations
123151
ConversionApi conversionApi = new ApiClient().createService(ConversionApi.class);
124152
StorageApi storageApi = new ApiClient().createService(StorageApi.class);
125-
153+
126154

127155
try {
128-
156+
129157
// Upload file to storage
130158
// Test file in the "/testdata" folder in the root of the project
131159
File f = new File(Configuration.getTestSrcDir(), name);
@@ -134,28 +162,28 @@ public class App {
134162
System.out.println("file not found");
135163
throw new RuntimeException("Test file not found");
136164
}
137-
165+
138166
RequestBody requestBody = RequestBody.create( MediaType.parse("multipart/form-data"), f);
139167
MultipartBody.Part fileToUpload = MultipartBody.Part.createFormData("file", f.getName(), requestBody);
140168

141169
// Upload document to storage
142170
Call<FilesUploadResult> callUpload = storageApi.uploadFile(folder + File.separator + name, fileToUpload, null);
143171
Response<FilesUploadResult> res = callUpload.execute();
144172
System.out.println("Executed is successful = " + res.isSuccessful());
145-
173+
146174
// Prepare call execute
147175
Call<ResponseBody> call = conversionApi.GetConvertDocumentToImage(name, outFormat, width, height, leftMargin, rightMargin, topMargin, bottomMargin, resolution, folder, storage);
148-
176+
149177
// Execute request
150178
Response<ResponseBody> img = call.execute();
151-
179+
152180
// Get body from response
153181
ResponseBody answer = img.body();
154-
182+
155183
// Save to test directory
156184
long result = saveToDisc(answer, "test.zip");
157185
System.out.println("Result size = " + result);
158-
186+
159187
} catch (IOException e) {
160188
e.printStackTrace();
161189
}
@@ -272,7 +300,11 @@ Then manually install the following JARs:
272300
It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues.
273301

274302

275-
### Examples
276-
[Tests](./src/test/java/com/aspose/html/client/api) contain various examples of using the Aspose.HTML SDK.
303+
## Aspose.HTML Cloud SDKs in Popular Languages
304+
305+
| .NET | Java | PHP | Python | Ruby | Node.js | Android | Swift|C++|Go|
306+
|---|---|---|---|---|---|---|--|--|--|
307+
| [GitHub](https://github.com/aspose-html-cloud/aspose-html-cloud-dotnet) | [GitHub](https://github.com/aspose-html-cloud/aspose-html-cloud-java) | [GitHub](https://github.com/aspose-html-cloud/aspose-html-cloud-php) | [GitHub](https://github.com/aspose-html-cloud/aspose-html-cloud-python) | [GitHub](https://github.com/aspose-html-cloud/aspose-html-cloud-ruby) | [GitHub](https://github.com/aspose-html-cloud/aspose-html-cloud-nodejs) | [GitHub](https://github.com/aspose-html-cloud/aspose-html-cloud-android) | [GitHub](https://github.com/aspose-html-cloud/aspose-html-cloud-swift)|[GitHub](https://github.com/aspose-html-cloud/aspose-html-cloud-cpp) |[GitHub](https://github.com/aspose-html-cloud/aspose-html-cloud-go) |
308+
| [NuGet](https://www.nuget.org/packages/Aspose.html-Cloud/) | [Maven](https://repository.aspose.cloud/webapp/#/artifacts/browse/tree/General/repo/com/aspose/aspose-html-cloud) | [Composer](https://packagist.org/packages/aspose/aspose-html-cloud-php) | [PIP](https://pypi.org/project/asposehtmlcloud/) | [GEM](https://rubygems.org/gems/aspose_html_cloud) | [NPM](https://www.npmjs.com/package/@asposecloud/aspose-html-cloud) | [Maven](https://repository.aspose.cloud/webapp/#/artifacts/browse/tree/General/repo/com/aspose/aspose-html-cloud) | [Cocoapods](https://cocoapods.org/pods/AsposeHtmlCloud)|[NuGet](https://www.nuget.org/packages/Aspose.Html-Cloud.Cpp/) | [Go.Dev](#) |
277309

278-
[Docs](./doc/) Full javadoc for Aspose.HTML Api SDK in html format.
310+
[Product Page](https://products.aspose.cloud/html/java) | [Documentation](https://docs.aspose.cloud/display/htmlcloud/Home) | [API Reference](https://apireference.aspose.cloud/html/) | [Code Samples](https://github.com/aspose-html-cloud/aspose-html-cloud-java) | [Blog](https://blog.aspose.cloud/category/html/) | [Free Support](https://forum.aspose.cloud/c/html) | [Free Trial](https://dashboard.aspose.cloud/#/apps)

0 commit comments

Comments
 (0)