@@ -37,7 +37,7 @@ Example to convert file to PDF. All supported formats and options can be found
3737[ here] ( https://www.convertapi.com/doc/supported-formats ) .
3838
3939``` ruby
40- result = ConvertApi .convert(' pdf' , File: ' /path/to/my_file.docx' )
40+ result = ConvertApi .convert(' pdf' , { File: ' /path/to/my_file.docx' } )
4141
4242# save to file
4343result.file.save(' /path/to/save/file.pdf' )
@@ -59,16 +59,16 @@ conversion_cost = result.conversion_cost
5959#### Convert file url
6060
6161``` ruby
62- result = ConvertApi .convert(' pdf' , File: ' https://website/my_file.docx' )
62+ result = ConvertApi .convert(' pdf' , { File: ' https://website/my_file.docx' } )
6363```
6464
6565#### Specifying from format
6666
6767``` ruby
6868result = ConvertApi .convert(
6969 ' pdf' ,
70- { File: / path/ to/ my_file' } ,
71- from_format: ' docx'
70+ { File: / path/ to/ my_file' ,
71+ from_format: ' docx' }
7272)
7373```
7474
@@ -80,9 +80,9 @@ parameters and explanations can be found [here](https://www.convertapi.com).
8080```ruby
8181result = ConvertApi.convert(
8282 ' pdf' ,
83- File: /path/to/my_file.docx' ,
83+ { File: /path/to/my_file.docx' ,
8484 PageRange: ' 1-10' ,
85- PdfResolution: ' 150' ,
85+ PdfResolution: ' 150' }
8686)
8787```
8888
@@ -91,7 +91,7 @@ result = ConvertApi.convert(
9191You can access result file collection like this:
9292
9393``` ruby
94- result = ConvertApi .convert(' pdf' , File: ' https://website/my_file.docx' )
94+ result = ConvertApi .convert(' pdf' , { File: ' https://website/my_file.docx' } )
9595
9696puts result.files[0 ].url
9797puts result.files[0 ].size
0 commit comments