Skip to content

Commit 42769fc

Browse files
committed
Description
1 parent 09b199b commit 42769fc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ Config.setDefaultSecret("YOUR API SECRET");
2626

2727
### File conversion
2828

29-
Example to convert file to PDF. All supported formats and options can be found
29+
Example to convert DOCX file to PDF. All supported formats and options can be found
3030
[here](https://www.convertapi.com).
3131

3232
```java
3333
CompletableFuture<ConversionResult> result = ConvertApi.convert("docx", "pdf", new Param[]{
34-
new Param("file", Paths.get("test-files/test.docx"))
34+
new Param("file", Paths.get("test.docx"))
3535
});
3636

3737
// save to file
38-
result.get().saveFile(Paths.get("/tmp/my_file.pdf"));
38+
result.get().saveFile(Paths.get("my_file.pdf")).get();
3939
```
4040

4141
Other result operations:
@@ -97,7 +97,7 @@ import com.convertapi.ConvertApi;
9797

9898
public class SimpleConversion {
9999
public static void main(String[] args) {
100-
ConvertApi.convert("test-files/test.docx", "result.pdf", "YOUR API SECRET");
100+
ConvertApi.convert("test.docx", "result.pdf", "YOUR API SECRET");
101101
}
102102
}
103103
```

src/main/java/com/convertapi/examples/ConvertRemoteFile.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public static void main(String[] args) throws IOException, ExecutionException, I
2424
CompletableFuture<ConversionResult> result = ConvertApi.convert("pptx", "pdf", new Param[]{fileParam});
2525

2626
Path pdfFile = Paths.get(System.getProperty("java.io.tmpdir") + "/myfile.pdf");
27-
result.get().saveFile(pdfFile);
27+
result.get().saveFile(pdfFile).get();
2828

2929
System.out.println("PDF file saved to: " + pdfFile.toString());
3030
}

0 commit comments

Comments
 (0)