Skip to content

Commit d512c84

Browse files
Cumulative commit - moving to GitHub
1 parent 8c41159 commit d512c84

File tree

134 files changed

+28148
-84
lines changed

Some content is hidden

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

134 files changed

+28148
-84
lines changed

.classpath

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" output="target/classes" path="src/main/java">
4+
<attributes>
5+
<attribute name="optional" value="true"/>
6+
<attribute name="maven.pomderived" value="true"/>
7+
</attributes>
8+
</classpathentry>
9+
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
10+
<attributes>
11+
<attribute name="optional" value="true"/>
12+
<attribute name="maven.pomderived" value="true"/>
13+
</attributes>
14+
</classpathentry>
15+
<classpathentry exported="true" kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
16+
<attributes>
17+
<attribute name="maven.pomderived" value="true"/>
18+
</attributes>
19+
</classpathentry>
20+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
21+
<attributes>
22+
<attribute name="maven.pomderived" value="true"/>
23+
</attributes>
24+
</classpathentry>
25+
<classpathentry kind="output" path="target/classes"/>
26+
</classpath>

.gitignore

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
1-
# Compiled class file
21
*.class
32

4-
# Log file
5-
*.log
6-
7-
# BlueJ files
8-
*.ctxt
9-
103
# Mobile Tools for Java (J2ME)
114
.mtj.tmp/
125

136
# Package Files #
147
*.jar
158
*.war
169
*.ear
17-
*.zip
18-
*.tar.gz
19-
*.rar
2010

2111
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
2212
hs_err_pid*
13+
14+
# build files
15+
**/target
16+
target
17+
build

.project

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>aspose-cloud-html</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.m2e.core.maven2Builder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
</buildSpec>
19+
<natures>
20+
<nature>org.eclipse.jdt.core.javanature</nature>
21+
<nature>org.eclipse.m2e.core.maven2Nature</nature>
22+
</natures>
23+
</projectDescription>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
eclipse.preferences.version=1
2+
encoding//src/main/java=UTF-8
3+
encoding//src/test/java=UTF-8
4+
encoding/<project>=UTF-8
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
3+
org.eclipse.jdt.core.compiler.compliance=1.7
4+
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
5+
org.eclipse.jdt.core.compiler.source=1.7
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
activeProfiles=
2+
eclipse.preferences.version=1
3+
resolveWorkspaceProjects=true
4+
version=1

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018 aspose-html-cloud
3+
Copyright (c) 2018 Aspose Pty Ltd
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 63 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
1-
# aspose-html-cloud-java
2-
Java library for communicating with the Aspose.HTML for Cloud API
1+
# Aspose HTML Cloud SDK
2+
3+
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.
4+
5+
See [API Reference](https://apireference.aspose.cloud/html/) for full API specification.
6+
7+
## How to use the SDK?
8+
The complete source code is available in this repository folder, you can either directly use it in your project.
9+
310

411
## Requirements
512

613
Building the API client library requires [Maven](https://maven.apache.org/) to be installed.
714

15+
### Prerequisites
16+
17+
To use Aspose HTML for Cloud SDK you need to register an account with [Aspose Cloud](https://www.aspose.cloud/) and lookup/create App Key and SID at [Cloud Dashboard](https://dashboard.aspose.cloud/#/apps). There is free quota available. For more details, see [Aspose Cloud Pricing](https://purchase.aspose.cloud/pricing).
18+
19+
820
## Installation
921

1022
To install the API client library to your local Maven repository, simply execute:
@@ -27,21 +39,13 @@ Add this dependency to your project's POM:
2739

2840
```xml
2941
<dependency>
30-
<groupId>io.swagger</groupId>
31-
<artifactId>swagger-java-client</artifactId>
42+
<groupId>com.aspose</groupId>
43+
<artifactId>aspose-html-cloud</artifactId>
3244
<version>1.0.0</version>
3345
<scope>compile</scope>
3446
</dependency>
3547
```
3648

37-
### Gradle users
38-
39-
Add this dependency to your project's build file:
40-
41-
```groovy
42-
compile "io.swagger:swagger-java-client:1.0.0"
43-
```
44-
4549
### Others
4650

4751
At first generate the JAR by executing:
@@ -50,18 +54,31 @@ At first generate the JAR by executing:
5054

5155
Then manually install the following JARs:
5256

53-
* target/swagger-java-client-1.0.0.jar
57+
* target/aspose-html-cloud-1.0.0.jar
5458
* target/lib/*.jar
5559

56-
## Getting Started
57-
58-
Please follow the [installation](#installation) instruction and execute the following Java code:
60+
### Sample usage
61+
62+
Before fill all fields in /setting/config.json
63+
64+
Example:
65+
```json
66+
{
67+
"basePath":"https://api.aspose.cloud/v1.1",
68+
"authPath":"https://api.aspose.cloud/oauth2/token",
69+
"apiKey":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
70+
"appSID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
71+
"storage":"\\data\\",
72+
"testdata":"\\testdata\\",
73+
"defaultUserAgent":"Webkit",
74+
"debug": false
75+
}
76+
```
5977

6078
```java
6179

6280
import com.aspose.html.client.invoker.*;
6381
import com.aspose.html.client.invoker.auth.*;
64-
import com.aspose.html.client.model.*;
6582
import com.aspose.html.client.api.ConversionApi;
6683

6784
import java.io.File;
@@ -73,22 +90,25 @@ public class ConversionApiExample {
7390

7491
ConversionApi apiInstance = new ConversionApi();
7592
String name = "name_example"; // String | Document name.
76-
String outFormat = "outFormat_example"; // String | Resulting image format.
77-
Integer width = 56; // Integer | Resulting image width.
78-
Integer height = 56; // Integer | Resulting image height.
79-
Integer leftMargin = 56; // Integer | Left resulting image margin.
80-
Integer rightMargin = 56; // Integer | Right resulting image margin.
81-
Integer topMargin = 56; // Integer | Top resulting image margin.
82-
Integer bottomMargin = 56; // Integer | Bottom resulting image margin.
83-
Integer xResolution = 56; // Integer | Horizontal resolution of resulting image.
84-
Integer yResolution = 56; // Integer | Vertical resolution of resulting image.
93+
String outFormat = "jpg"; // String | Resulting image format.
94+
Integer width = 800; // Integer | Resulting image width.
95+
Integer height = 1000; // Integer | Resulting image height.
96+
Integer leftMargin = 10; // Integer | Left resulting image margin.
97+
Integer rightMargin = 10; // Integer | Right resulting image margin.
98+
Integer topMargin = 10; // Integer | Top resulting image margin.
99+
Integer bottomMargin = 10; // Integer | Bottom resulting image margin.
100+
Integer xResolution = 300; // Integer | Horizontal resolution of resulting image.
101+
Integer yResolution = 300; // Integer | Vertical resolution of resulting image.
85102
String folder = "folder_example"; // String | The document folder.
86103
String storage = "storage_example"; // String | The document storage.
87104
try {
88-
File result = apiInstance.conversionGetConvertDocumentToImage(name, outFormat, width, height, leftMargin, rightMargin, topMargin, bottomMargin, xResolution, yResolution, folder, storage);
89-
System.out.println(result);
105+
File result = apiInstance.GetConvertDocumentToImage(name, outFormat, width, height, leftMargin, rightMargin, topMargin, bottomMargin, xResolution, yResolution, folder, storage);
106+
107+
//Save to test directory
108+
File copyFile = new File("~/testdir/test.jpg");
109+
result.renameTo(copyFile);
90110
} catch (ApiException e) {
91-
System.err.println("Exception when calling ConversionApi#conversionGetConvertDocumentToImage");
111+
System.err.println("Exception when calling ConversionApi#GetConvertDocumentToImage");
92112
e.printStackTrace();
93113
}
94114
}
@@ -102,57 +122,27 @@ All URIs are relative to *https://api.aspose.cloud/v1.1*
102122

103123
Class | Method | HTTP request | Description
104124
------------ | ------------- | ------------- | -------------
105-
*ConversionApi* | [**conversionGetConvertDocumentToImage**](docs/ConversionApi.md#conversionGetConvertDocumentToImage) | **GET** /html/{name}/convert/image/{outFormat} | Convert the HTML document from the storage by its name to the specified image format.
106-
*ConversionApi* | [**conversionGetConvertDocumentToImageByUrl**](docs/ConversionApi.md#conversionGetConvertDocumentToImageByUrl) | **GET** /html/convert/image/{outFormat} | Convert the HTML page from the web by its URL to the specified image format.
107-
*ConversionApi* | [**conversionGetConvertDocumentToPdf**](docs/ConversionApi.md#conversionGetConvertDocumentToPdf) | **GET** /html/{name}/convert/pdf | Convert the HTML document from the storage by its name to PDF.
108-
*ConversionApi* | [**conversionGetConvertDocumentToPdfByUrl**](docs/ConversionApi.md#conversionGetConvertDocumentToPdfByUrl) | **GET** /html/convert/pdf | Convert the HTML page from the web by its URL to PDF.
109-
*ConversionApi* | [**conversionGetConvertDocumentToXps**](docs/ConversionApi.md#conversionGetConvertDocumentToXps) | **GET** /html/{name}/convert/xps | Convert the HTML document from the storage by its name to XPS.
110-
*ConversionApi* | [**conversionGetConvertDocumentToXpsByUrl**](docs/ConversionApi.md#conversionGetConvertDocumentToXpsByUrl) | **GET** /html/convert/xps | Convert the HTML page from the web by its URL to XPS.
111-
*ConversionApi* | [**conversionPutConvertDocumentToImage**](docs/ConversionApi.md#conversionPutConvertDocumentToImage) | **PUT** /html/convert/image/{outFormat} | Convert the HTML document to the specified image format.
112-
*ConversionApi* | [**conversionPutConvertDocumentToPdf**](docs/ConversionApi.md#conversionPutConvertDocumentToPdf) | **PUT** /html/convert/pdf | Convert the HTML document to PDF.
113-
*ConversionApi* | [**conversionPutConvertDocumentToXps**](docs/ConversionApi.md#conversionPutConvertDocumentToXps) | **PUT** /html/convert/xps | Convert the HTML document to XPS.
114-
*DocumentApi* | [**documentGetDocument**](docs/DocumentApi.md#documentGetDocument) | **GET** /html/{name} | Return the HTML document by the name from default or specified storage.
115-
*DocumentApi* | [**documentGetDocumentFragmentByXPath**](docs/DocumentApi.md#documentGetDocumentFragmentByXPath) | **GET** /html/{name}/fragments/{outFormat} | Return list of HTML fragments matching the specified XPath query.
116-
*DocumentApi* | [**documentGetDocumentImages**](docs/DocumentApi.md#documentGetDocumentImages) | **GET** /html/{name}/images/all | Return all HTML document images packaged as a ZIP archive.
117-
*TranslationApi* | [**translationGetTranslateDocument**](docs/TranslationApi.md#translationGetTranslateDocument) | **GET** /html/{name}/translate/{srcLang}/{resLang} | Translate the HTML document specified by the name from default or specified storage.
118-
*TranslationApi* | [**translationGetTranslateDocumentByUrl**](docs/TranslationApi.md#translationGetTranslateDocumentByUrl) | **GET** /html/translate/{srcLang}/{resLang} | Translate the HTML document specified by its URL.
119-
*TranslationApi* | [**translationPutTranslateDocument**](docs/TranslationApi.md#translationPutTranslateDocument) | **PUT** /html/{name}/translate/{srcLang}/{resLang} | Translate the HTML document specified by the name from default or specified storage.
120-
*TranslationApi* | [**translationPutTranslateDocumentByUrl**](docs/TranslationApi.md#translationPutTranslateDocumentByUrl) | **PUT** /html/translate/{srcLang}/{resLang} | Translate the HTML document specified by its URL.
121-
122-
123-
## Documentation for Models
124-
125-
126-
127-
## Documentation for Authorization
128-
129-
Authentication schemes defined for the API:
130-
### appsid
131-
132-
- **Type**: API key
133-
- **API key parameter name**: appsid
134-
- **Location**: URL query string
135-
136-
### oauth
137-
138-
- **Type**: OAuth
139-
- **Flow**: application
140-
- **Authorization URL**: api.aspose.cloud/oauth2/token
141-
- **Scopes**: N/A
142-
143-
### signature
144-
145-
- **Type**: API key
146-
- **API key parameter name**: signature
147-
- **Location**: URL query string
125+
*ConversionApi* | **GetConvertDocumentToImage** | **GET** /html/{name}/convert/image/{outFormat} | Convert the HTML document from the storage by its name to the specified image format.
126+
*ConversionApi* | **GetConvertDocumentToImageByUrl** | **GET** /html/convert/image/{outFormat} | Convert the HTML page from the web by its URL to the specified image format.
127+
*ConversionApi* | **GetConvertDocumentToPdf** | **GET** /html/{name}/convert/pdf | Convert the HTML document from the storage by its name to PDF.
128+
*ConversionApi* | **GetConvertDocumentToPdfByUrl** | **GET** /html/convert/pdf | Convert the HTML page from the web by its URL to PDF.
129+
*ConversionApi* | **GetConvertDocumentToXps** | **GET** /html/{name}/convert/xps | Convert the HTML document from the storage by its name to XPS.
130+
*ConversionApi* | **GetConvertDocumentToXpsByUrl** | **GET** /html/convert/xps | Convert the HTML page from the web by its URL to XPS.
131+
*DocumentApi* | **GetDocument** | **GET** /html/{name} | Return the HTML document by the name from default or specified storage.
132+
*DocumentApi* | **GetDocumentFragmentByXPath** | **GET** /html/{name}/fragments/{outFormat} | Return list of HTML fragments matching the specified XPath query.
133+
*DocumentApi* | **GetDocumentImages** | **GET** /html/{name}/images/all | Return all HTML document images packaged as a ZIP archive.
134+
*TranslationApi* | **GetTranslateDocument** | **GET** /html/{name}/translate/{srcLang}/{resLang} | Translate the HTML document specified by the name from default or specified storage.
135+
*TranslationApi* | **GetTranslateDocumentByUrl** | **GET** /html/translate/{srcLang}/{resLang} | Translate the HTML document specified by its URL.
148136

149137

150138
## Recommendation
151139

152140
It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues.
153141

154-
## Author
142+
### Examples
155143

144+
[Tests](./src/test/java/com/aspose/html/client/api) contain various examples of using the Aspose.HTML SDK.
156145

146+
[Docs](./docs/) Full javadoc for Aspose.HTML Api SDK
157147

158148

data/TranslateUrl_en_de.zip

9.99 KB
Binary file not shown.

data/TranslateUrl_en_fr.zip

7.93 KB
Binary file not shown.

0 commit comments

Comments
 (0)