Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 21 additions & 12 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
ConvertAPI
https://www.convertapi.com
(c) 2011-2018 Baltsoft

ConvertAPI-Java
https://github.com/ConvertAPI/convertapi-java
Copyright (c) 2018 Tomas Rutkauskas

The MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
MIT License

Copyright (c) 2012-2026 ConvertAPI

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Config.setDefaultApiCredentials("api-token");
### File conversion

Example to convert DOCX file to PDF. All supported formats and options can be found
[here](https://www.convertapi.com/conversions).
[here](https://www.convertapi.com/api).

```java
CompletableFuture<ConversionResult> result = ConvertApi.convert("docx", "pdf", new Param("file", Paths.get("test.docx")));
Expand Down Expand Up @@ -69,7 +69,7 @@ CompletableFuture<ConversionResult> result = ConvertApi.convert("pptx", "pdf",
#### Additional conversion parameters

ConvertAPI accepts extra conversion parameters depending on converted formats. All conversion
parameters and explanations can be found [here](https://www.convertapi.com/conversions).
parameters and explanations can be found [here](https://www.convertapi.com/api).

```java
CompletableFuture<ConversionResult> result = ConvertApi.convert("pdf", "jpg",
Expand All @@ -83,7 +83,7 @@ CompletableFuture<ConversionResult> result = ConvertApi.convert("pdf", "jpg",

### User information

You can always check the remaining conversions amount and other account information by fetching [user information](https://www.convertapi.com/doc/user).
You can always check the remaining conversions amount and other account information by fetching [user information](https://www.convertapi.com/docs/user-information).

```java
User user = ConvertApi.getUser();
Expand All @@ -93,7 +93,7 @@ int conversionsConsumed = user.ConversionsConsumed;

### Alternative domain

Create `Config` instance with the alternative domain and provide it in `convert` method. Dedicated to the region [domain list](https://www.convertapi.com/doc/servers-location).
Create `Config` instance with the alternative domain and provide it in `convert` method. Dedicated to the region [domain list](https://www.convertapi.com/docs/servers-location).

```java
Config config = new Config(credentials, "https", "eu-v2.convertapi.com", 0, httpClientBuilder);
Expand All @@ -119,21 +119,21 @@ You can find more advanced examples in the [examples](https://github.com/Convert
ConvertAPI is designed to make converting file super easy, the following snippet shows how easy it is to get started. Let's convert WORD DOCX file to PDF:

```java
import com.convertapi.ConvertApi;
import com.convertapi.client.ConvertApi;

public class SimpleConversion {
public static void main(String[] args) {
ConvertApi.convert("source.docx", "result.pdf", "api-token");
ConvertApi.convertFile("source.docx", "result.pdf", "api-token");
}
}
```

This is the bare-minimum to convert a file using the ConvertAPI client, but you can do a great deal more with the ConvertAPI Java library.
Take special note that you should replace `api-token` with the token you obtained in item two of the pre-requisites.
Replace `api-token` with your API token from https://www.convertapi.com/a/authentication.

### Issues &amp; Comments
Please leave all comments, bugs, requests, and issues on the Issues page. We'll respond to your request ASAP!

### License
The ConvertAPI Java Library is licensed under the [MIT](http://www.opensource.org/licenses/mit-license.php "Read more about the MIT license form") license.
The ConvertAPI Java Library is licensed under the [MIT](https://opensource.org/licenses/MIT) license.
Refer to the [LICENSE](https://github.com/ConvertAPI/convertapi-library-java/blob/main/LICENSE.txt) file for more information.
21 changes: 21 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Security policy

## Reporting a vulnerability

Please do not report security vulnerabilities in public GitHub issues, discussions or pull requests.

Report them privately on GitHub instead: open the [Security tab](https://github.com/ConvertAPI/convertapi-library-java/security) of this repository and click "Report a vulnerability", or go straight to [the report form](https://github.com/ConvertAPI/convertapi-library-java/security/advisories/new). Only you and the maintainers can see the report.

Please include:

- the version of the com.convertapi.client:convertapi Maven package and of Java you use;
- the steps to reproduce the issue, or a proof of concept;
- what an attacker could do with it.

We will confirm that we received your report and keep you updated until it is fixed. Please give us reasonable time to release a fix before you disclose the issue publicly.

You can use the same private route if you are not sure whether the issue is in this SDK or in the ConvertAPI service itself.

## Supported versions

Security fixes are released in the latest version of the [com.convertapi.client:convertapi package on Maven Central](https://central.sonatype.com/artifact/com.convertapi.client/convertapi). Please check that the issue still occurs with the latest version before you report it.
Loading