This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sdfsd sdf sd fsdsdf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl --url 'https://v2.convertapi.com/docx/to/pdf?secret=XXXXXX' -F [email protected] --header 'Accept: application/octet-stream' > result.pdf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$curl = curl_init(); | |
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($curl, CURLOPT_POST, true); | |
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Accept: application/octet-stream')); | |
curl_setopt($curl, CURLOPT_URL, "https://v2.convertapi.com/docx/to/pdf?secret=XXXXXXXXXXXX"); | |
curl_setopt($curl, CURLOPT_POSTFIELDS, array('file' => new CurlFile('C:\my_file.docx'))); | |
file_put_contents("result.pdf", curl_exec($curl)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Function converts file format. More info about formats on http://www.convertapi.com/ | |
// secret (string) - secret can be obtained at http://www.convertapi.com/ (registration required) | |
// format (string) - conversion result file format ('pdf', 'jpg', 'tif', etc.) | |
// path_to_file (string) - path to local ore remote file ('C:\myfile.doc', '/home/jon/myfile.doc', 'http://mydomain.com/myfile.doc') | |
// parameters (array) - key-value array of additional parameters (array('FileName' => 'myfile', 'StoreFile' => true) more information on http://www.convertapi.com/) | |
function convert_api($secret, $format, $path_to_file, $parameters = array()) { | |
$curl = curl_init(); | |
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); |