11# ConvertAPI CLI Client
22
3- ## Convert your files with our command line file conversion utility
3+ ## Convert your files with our command- line file conversion utility
44
5- The ConvertAPI helps converting various file formats.
6- Creating PDF and Images from various sources like Word, Excel, Powerpoint, images, web pages or raw HTML codes.
7- Merge, Encrypt, Split, Repair and Decrypt PDF files.
8- And many others files manipulations.
9- In just few minutes you can integrate it into your application or shell script and use it easily.
5+ ConvertAPI helps in 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 other file manipulations. You can integrate it into your application in just a few minutes and use it easily.
106
117The ConvertAPI CLI makes it easier to use the Convert API from your shell without having to build your own HTTP calls.
128You can get your free secret at https://www.convertapi.com/a
@@ -20,7 +16,7 @@ Download compressed CLI executable
2016* Darwin (MacOS): [ convertapi_mac.zip] ( https://github.com/ConvertAPI/convertapi-cli/releases/download/v1/convertapi_mac.zip )
2117* Windows: [ convertapi_win.zip] ( https://github.com/ConvertAPI/convertapi-cli/releases/download/v1/convertapi_win.zip )
2218
23- (this utility also can be built from source code for many other CPU and OS)
19+ (this utility can also be built from source code for many other CPU and OS)
2420
2521Unzip executable
2622
@@ -29,7 +25,7 @@ unzip convertapi_*.zip
2925```
3026
3127And you are done.
32- Optionally you can move executable file to more appropriate place and make utility accessible for all local users. On Linux would be:
28+ Optionally you can move the executable file to a more appropriate place and make utility accessible for all local users. On Linux it would be:
3329
3430``` shell
3531sudo mv convertapi /usr/local/bin
@@ -39,13 +35,13 @@ sudo mv convertapi /usr/local/bin
3935
4036### Before you start
4137
42- In order to use this CLI utility you must create your free trial account on https://www.convertapi.com site.
43- After sign up process you will get your secret at https://www.convertapi.com/a .
44- Secret will be used in every CLI utility run.
38+ In order to use this CLI utility, you must create your free trial account on https://www.convertapi.com site.
39+ After the sign- up process, you will get your secret at https://www.convertapi.com/a .
40+ The secret will be used in every CLI utility run.
4541
46- ### Most basic file conversion
42+ ### Basic file conversion
4743
48- Before we go in to details, short usage example how to convert DOCX file to PDF.
44+ Before we go into detail, a short usage example of how to convert DOCX file to PDF.
4945
5046``` shell
5147convertapi --iformat=docx --oformat=pdf --params=" file:@/path/to/test.docx" --out=" @/path/to/resultdir" --secret=your-api-secret
@@ -85,12 +81,12 @@ _Example:_
8581##### File parameter
8682
8783Special case is file parameter.
88- Value can have prefix and can be provided as an array with ` ; ` semicolon separator.
89- Prefix can be one of those:
84+ Value can have a prefix and can be provided as an array with the ` ; ` semicolon separator.
85+ The prefix can be one of those:
9086
9187###### no prefix
9288
93- No prefix means that value is http or https scheme URL to file.
89+ No prefix means that the value is http or https scheme URL to a file.
9490_ Example:_
9591
9692``` shell
@@ -99,7 +95,7 @@ _Example:_
9995
10096###### @
10197
102- Parameter values starting from ` @ ` are treated as paths to local files or directories.
98+ Parameter values starting with ` @ ` are treated as paths to the local files or directories.
10399_ Example:_
104100
105101``` shell
@@ -108,8 +104,8 @@ _Example:_
108104
109105###### <
110106
111- Parameters with ` < ` values are substituted with data taken from ` STDIN ` .
112- As raw value can only be URL so in this case data received from ` STDIN ` should be URL or URL array separated by ` \n `
107+ Parameters with ` < ` values are substituted with the data taken from ` STDIN ` .
108+ As a raw value can only be the URL then, in this case, the data received from ` STDIN ` should be URL or URL array separated by ` \n `
113109_ Example:_
114110
115111``` shell
@@ -118,9 +114,9 @@ _Example:_
118114
119115###### @<
120116
121- Parameters with ` @< ` values are substituted with data taken from ` STDIN ` .
122- Data received from ` STDIN ` should be local path to file or directory.
123- Also can be an array of paths separated by ` \n ` .
117+ Parameters with ` @< ` values are substituted with the data taken from ` STDIN ` .
118+ Data received from ` STDIN ` should be a local path to the file or directory.
119+ It can also be an array of paths separated by ` \n ` .
124120_ Example:_
125121
126122``` shell
@@ -129,7 +125,7 @@ _Example:_
129125
130126###### <<
131127
132- Parameters with ` << ` values are substituted with data taken from ` STDIN ` .
128+ Parameters with ` << ` values are substituted with the data taken from ` STDIN ` .
133129Data received from ` STDIN ` should be file content.
134130_ Example:_
135131
@@ -139,7 +135,7 @@ _Example:_
139135
140136##### Array parameter
141137
142- If parameter name is suffixed with ` [] ` parameter gets treated as an array parameter.
138+ If a parameter name is suffixed with ` [] ` , the parameter is treated as an array parameter.
143139Mainly array parameters are used when one conversion needs to accept multiple files (e.g. pdf merge or zip compression).
144140
145141``` shell
@@ -148,17 +144,17 @@ Mainly array parameters are used when one conversion needs to accept multiple fi
148144
149145#### --out
150146
151- Argument defines how conversion result should be outputted.
147+ The argument defines how conversion result should be outputted.
152148Values can be one of those:
153149
154150##### url
155151
156- This is default output method. It prints to ` STDOUT ` URL or array of URLs that point to converted files.
152+ This is the default output method. It prints to ` STDOUT ` URL or array of URLs that point to the converted files.
157153This method should be used for conversion chaining.
158154
159155##### @
160156
161- Value prefixed with ` @ ` is treated as local file or directory path where converted file will be stored.
157+ Value prefixed with ` @ ` is treated as a local file or directory path where the converted file will be stored.
162158_ Example:_
163159
164160``` shell
171167
172168##### stdout
173169
174- Conversion result will be outputted to ` STDOUT ` .
175- If result consists of multiple files, second and other files will be outputted to file descriptors starting from 3.
170+ The Conversion result will be outputted to ` STDOUT ` .
171+ If the result contains multiple files, second and the following files will be outputted to the file descriptors starting from 3.
176172
177173``` shell
178174--out=" stdout"
@@ -189,54 +185,54 @@ Outputs CLI utility version information and exits.
189185
190186#### --help
191187
192- Displays short usage information.
188+ Displays a short usage information.
193189
194190
195191### Examples
196192
197- Convert local DOCX file to PDF A3 page size saving result to ` /path/to/resultdir `
193+ Convert a local DOCX file to PDF A3 page size saving the result to ` /path/to/resultdir `
198194``` shell
199195convertapi --iformat=docx --oformat=pdf --params=" file:@/path/to/test.docx, pagesize:a3" --out=" @/path/to/resultdir" --secret=your-api-secret
200196```
201197
202- Merge all PDF files that are in ` /path/to/dir ` directory and save it locally
198+ Merge all PDF files that are located in ` /path/to/dir ` directory and save it locally
203199``` shell
204200convertapi --iformat=pdf --oformat=merge --params=" files[]:@/path/to/dir" --out=" @/path/to/resultdir" --secret=your-api-secret
205201```
206202
207- Convert remote PPTX file to PDF saving result to ` /path/to/result.pdf `
203+ Convert remote PPTX file to PDF saving the result to ` /path/to/result.pdf `
208204``` shell
209205convertapi --iformat=pptx --oformat=pdf --params=" file:https://example.com/myfile.pptx" --out=" @/path/to/result.pdf" --secret=your-api-secret
210206```
211207
212- Convert from DOCX to JPG and ZIP result JPG files
208+ Convert from DOCX to JPG and ZIP the result JPG files into a single archive
213209``` shell
214210convertapi --iformat=docx --oformat=jpg --params=" file:@/path/to/test.docx" --secret=your-api-secret \
215211 | convertapi --iformat=jpg --oformat=zip --params=" files[]:<" --out=" @/path/to/result.zip" --secret=your-api-secret
216212```
217213
218- Convert DOCX to PDF and save result in remote server over SSH
214+ Convert DOCX to PDF and save the result on a remote server over SSH
219215``` shell
220216convertapi --iformat=docx --oformat=pdf --params=" file:@/path/to/test.docx" --out=stdout --secret=your-api-secret \
221217 | ssh user@myserver " cat >/tmp/my.pdf"
222218```
223219
224- Get PDF file from remote server, convert it to JPG and save result locally
220+ Get the PDF file from a remote server, convert it to JPG and save the result locally
225221``` shell
226222ssh user@server " cat /tmp/my.pdf" \
227223 | convertapi --iformat=pdf --oformat=jpg --params=" file:<<" --out=@/path/to/resultdir --secret=your-api-secret
228224```
229225
230- Do PDF->JPG and DOCX->JPG conversions in parallel and ZIP result JPG files
226+ Do PDF->JPG and DOCX->JPG conversions in parallel and ZIP the converted JPG files
231227``` shell
232228( \
233229 convertapi --iformat=pdf --oformat=jpg --params=" file:/path/to/dir" --secret=your-api-secret \
234230 & convertapi --iformat=docx --oformat=jpg --params=" file:@/path/to/dir" --secret=your-api-secret \
235231) | convertapi --iformat=jpg --oformat=zip --params=" files[]:<" --out=@/path/to/resultdir --secret=your-api-secret
236232```
237233
238- Merge PDFs files from various locations: remote SSH server, local file, local directory, remote HTTP server.
239- Save result file to remote SSH server. All this done without writing to disk.
234+ Merge PDFs files from various locations: a remote SSH server, local file, local directory, and a remote HTTP server.
235+ Save the result file on a remote SSH server. All of this is done without writing to disk.
240236``` shell
241237ssh user@server1 " cat /tmp/my.pdf" \
242238 | convertapi --iformat=pdf --oformat=merge --params=" files[]:<<;@/path/to/test.pdf;@/path/to/dir;https://example.com/my.pdf" --out=stdout --secret=your-api-secret \
0 commit comments