You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Introduce alternative converter parameter in conversion method #18
One of our users complains that if he set converter it is still ignored.
<?php
require __DIR__ . '/../lib/ConvertApi/autoload.php';
use \ConvertApi\ConvertApi;
# set your api secret
ConvertApi::setApiSecret(getenv('CONVERT_API_SECRET'));
# Example of saving Word docx to PDF using OpenOffice converter
# https://www.convertapi.com/doc-to-pdf/openoffice
$dir = sys_get_temp_dir();
$upload = new \ConvertApi\FileUpload('files/test.docx');
$result = ConvertApi::convert('pdf', ['File' => $upload, 'converter' => 'openoffice']);
$savedFiles = $result->saveFiles($dir);
echo "The PDF saved to:\n";
print_r($savedFiles);
@laurynas-baltsoft customers are complaining about this issue. We need to convert the $params['converter'] to lowercase before appending it to the URL. I cannot see a commit referenced to this issue. Is this fixed already?
@laurynas-baltsoft @kostas-baltsoft I think the problem is not how the library appends parameters in lower or uppercase but how it compares. The all-string comparison should be Case-Insensitive and not Case-Sensitive like now.
Activity
laurynas-convertapi commentedon Jul 4, 2020
Implemented in version
v1.2.1tomasr78 commentedon Jan 26, 2022
The alternative converter is not working, how URL is built?
The URL should look like this using example below
https://v2.convertapi.com/convert/docx/to/pdf/converter/openofficeOne of our users complains that if he set converter it is still ignored.
felixprawira commentedon Jan 26, 2022
found the issue, the parameter converter must be in lowercase, while the other parameters can be in first letter uppercase

kostas-jonauskas commentedon Nov 1, 2022
@laurynas-baltsoft customers are complaining about this issue. We need to convert the
$params['converter']to lowercase before appending it to the URL. I cannot see a commit referenced to this issue. Is this fixed already?tomasr78 commentedon Nov 2, 2022
@laurynas-baltsoft @kostas-baltsoft I think the problem is not how the library appends parameters in lower or uppercase but how it compares. The all-string comparison should be Case-Insensitive and not Case-Sensitive like now.