For some needs, some time we need to convert VeryPDF Image to PDF Converter Cloud API, by which we can convert easily. Meanwhile this software also can help you convert multi-page TIFF file to multi-page PDF file, convert scanned image files to searchable PDF files by OCR technologies.by API through PHP, C# or other programming applications. When you have such needs, maybe you can have a free trial of software
Different with other API, VeryPDF API is cloud based, so you can run the conversion at any place or at any system only there is web net connection available. When you run the conversion, simply open browser then the conversion could be done. And before run the conversion, you’d better get an API code which allows you to use it under more than 20 API applications. Please check more information of this software on homepage, in the following part, I will show you how to convert color image to grayscale PDF from PHP code.
Step 1. Convert color image to grayscale PDF
- When simply run the conversion within browser, please input URL following the below example.
By this above URL, we can convert color image to grayscale PDF easily. Now let us check parameters which play important role in the conversion.
-grayscale: when run the conversion, please add this parameter at the end of the URL. There is also other one URL example for converting color image to black and white PDF file, Color image to Black and white image, please have a check.
Step 2. Convert color image to grayscale PDF from PHP code.
- When you need to run the conversion from PHP code, please add the above URL to PHP code that would be OK.
- Here are some code for your reference:
/* gets the data from a URL */
$ch = curl_init();
$timeout = 5;
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$data = curl_exec($ch);
$returned_content = get_data('http://online.verypdf.com/api/apikey=XXXXXXXXXXXXX&
By the above code, we can convert color image to grayscale PDF easily. Now let us check the conversion effect from the following snapshot. During the using, if you have any question, please contact us as soon as possible.