Convert PDF Page to Image (PHP REST)

Skip to end of metadata
Go to start of metadata
This example allows you to convert a PDF page to image using Saaspose Pdf REST API in your PHP applications.


        //check whether file is set or not
        if ($this->FileName == "")
            throw new Exception("No file name specified");
               
        $strURI = Product::$BaseProductUri . "/pdf/" . $this->FileName . "/pages/" . $pageNumber . "?format=" . $imageFormat . "&width=" . $width . "&height=" . $height;
        
        $signedURI = Utils::Sign($strURI);

        $responseStream = Utils::processCommand($signedURI, "GET", "", "");
        
        Utils::saveFile($responseStream, SaasposeApp::$OutPutLocation . "output." . $imageFormat);
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.