Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
io.github.kmozsi:convertapi
Advanced tools
The ConvertAPI helps converting various file formats. Creating PDF and Images from various sources like Word, Excel, Powerpoint, images, web pages or raw HTML codes. Merge, Encrypt, Split, Repair and Decrypt PDF files. And many others files manipulations. In just few minutes you can integrate it into your application and use it easily. The ConvertAPI client library makes it easier to use the Convert API from your Java 8 projects without having to build your own API calls.
The ConvertAPI helps converting various file formats. Creating PDF and Images from various sources like Word, Excel, Powerpoint, images, web pages or raw HTML codes. Merge, Encrypt, Split, Repair and Decrypt PDF files. And many others files manipulations. In just few minutes you can integrate it into your application and use it easily.
The ConvertAPI-Java library makes it easier to use the Convert API from your Java 8 projects without having to build your own API calls. You can get your free API secret at https://www.convertapi.com/a
Download latest JAR file and place it in your project library directory.
You can get your secret at https://www.convertapi.com/a
Config.setDefaultSecret("your-api-secret");
Example to convert DOCX file to PDF. All supported formats and options can be found here.
CompletableFuture<ConversionResult> result = ConvertApi.convert("docx", "pdf", new Param("file", Paths.get("test.docx")));
// save to file
result.get().saveFile(Paths.get("my_file.pdf")).get();
Other result operations:
// save all result files to folder
result.get().saveFiles(Paths.get("/tmp"));
// get result file
ConversionResultFile file = result.get().getFile(0);
// get conversion cost
Integer cost = result.get().conversionCost();
CompletableFuture<ConversionResult> result = ConvertApi.convert("pptx", "pdf",
new Param("file", "https://cdn.convertapi.com/cara/testfiles/presentation.pptx")
);
ConvertAPI accepts extra conversion parameters depending on converted formats. All conversion parameters and explanations can be found here.
CompletableFuture<ConversionResult> result = ConvertApi.convert("pdf", "jpg",
new Param("file", Paths.get("test.pdf")),
new Param("scaleimage", "true"),
new Param("scaleproportions", "true"),
new Param("imageheight", 300)
);
You can always check remaining seconds amount by fetching user information.
User user = ConvertApi.getUser();
int secondsLeft = user.SecondsLeft;
You can find more advanced examples in the examples folder.
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:
import com.convertapi.ConvertApi;
public class SimpleConversion {
public static void main(String[] args) {
ConvertApi.convertFile("source.docx", "result.pdf", "your-api-secret");
}
}
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 your-api-secret
with the secret you obtained in item two of the pre-requisites.
Please leave all comments, bugs, requests, and issues on the Issues page. We'll respond to your request ASAP!
The ConvertAPI Java Library is licensed under the MIT license. Refer to the LICENSE file for more information.
FAQs
The ConvertAPI helps converting various file formats. Creating PDF and Images from various sources like Word, Excel, Powerpoint, images, web pages or raw HTML codes. Merge, Encrypt, Split, Repair and Decrypt PDF files. And many others files manipulations. In just few minutes you can integrate it into your application and use it easily. The ConvertAPI client library makes it easier to use the Convert API from your Java 8 projects without having to build your own API calls.
We found that io.github.kmozsi:convertapi demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.