@@ -30,9 +30,7 @@ Example to convert DOCX file to PDF. All supported formats and options can be fo
3030[ here] ( https://www.convertapi.com ) .
3131
3232``` java
33- CompletableFuture<ConversionResult > result = ConvertApi . convert(" docx" , " pdf" , new Param []{
34- new Param (" file" , Paths . get(" test.docx" ))
35- });
33+ CompletableFuture<ConversionResult > result = ConvertApi . convert(" docx" , " pdf" , new Param (" file" , Paths . get(" test.docx" )));
3634
3735// save to file
3836result. get(). saveFile(Paths . get(" my_file.pdf" )). get();
@@ -54,9 +52,9 @@ Integer cost = result.get().conversionCost();
5452#### Convert file url
5553
5654``` java
57- CompletableFuture<ConversionResult > result = ConvertApi . convert(" pptx" , " pdf" , new Param []{
55+ CompletableFuture<ConversionResult > result = ConvertApi . convert(" pptx" , " pdf" ,
5856 new Param (" file" , " https://cdn.convertapi.com/cara/testfiles/presentation.pptx" )
59- } );
57+ );
6058```
6159
6260#### Additional conversion parameters
@@ -65,12 +63,12 @@ ConvertAPI accepts extra conversion parameters depending on converted formats. A
6563parameters and explanations can be found [ here] ( https://www.convertapi.com ) .
6664
6765``` java
68- CompletableFuture<ConversionResult > result = ConvertApi . convert(" pdf" , " jpg" , new Param []{
66+ CompletableFuture<ConversionResult > result = ConvertApi . convert(" pdf" , " jpg" ,
6967 new Param (" file" , Paths . get(" test.pdf" )),
7068 new Param (" scaleimage" , " true" ),
7169 new Param (" scaleproportions" , " true" ),
7270 new Param (" imageheight" , 300 )
73- } );
71+ );
7472```
7573
7674### User information
0 commit comments