Convert PDF to Images

i have a module Drupal 7 to convert all page PDF to array Images then insert into my database, but it don’t work

Pleasese help me

sorry for my english

File attachment demo.rar

Hi there,

We are sorry for the inconvenience caused. Please share your source PDF document here and also share some details about the error/issue you are facing. We will test the scenario at our end and will guide you accordingly.

Best Regards,

I will try code to

but when i check file on cloud → Sample.pdf = 0.0kb and folder Output is empty

// Include the SDK files that we need here
//The appSID and appKey are used for authentication
Aspose\Cloud\Common\AsposeApp::$appSID = “c3eec53f-a026-4bc3-b121-26dbcfef4c5c”;
Aspose\Cloud\Common\AsposeApp::$appKey = “15a3d291ff619523a7887b630cbe7664”;
// The output location is the directory where we hold the converted images
// It should be have writable permissions. There should be a / at the end of this.
Aspose\Cloud\Common\AsposeApp::$outPutLocation = getcwd() . “/Output/”;
$input = “Sample.pdf”;
$format = “jpeg”;
$page = 1;
// We shall use the Folder and Converter component of SDK
$folder = new Aspose\Cloud\Storage\Folder();
$converter = new Aspose\Cloud\Pdf\Converter($input);
try {
// Upload the $input file to Aspose Cloud Storage
$folder->UploadFile($input, “”);
// Convert $page into specified $format and save the result in $output file
$output = $converter->ConvertToImage($page, $format);
// Tell the web browser that the PHP script is about to send a JPG image
// Send the contents our $output file to the browser
echo file_get_contents($output);
// Delete the generated $output file. We don’t need it anymore
// Delete the uploaded PDF too. We are all done with it.
// It is a good practice to keep the uploaded document until all operation
// are complete and the file is no more needed. Uploading the file
// again on each request will waste time :slight_smile:
} catch (Exception $x) {
// Ooops! let the user know what happened
echo $x->getMessage();


Hi there,

Thanks for your sharing additional information. We are looking into it and will get back to you soon.

Best Regards,