Last active
December 19, 2020 17:39
-
-
Save aspose-cloud/3beac24bdea025c4aad5a2f1ea81be9f to your computer and use it in GitHub Desktop.
This Gist repository contains code snippet related to Aspose.OMR Cloud SDK for PHP
This file contains 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
Aspose.OMR-Cloud-SDK-PHP |
This file contains 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
<? | |
// For complete examples and data files, please go to https://github.com/aspose-omr-cloud/aspose-omr-cloud-php/ | |
if (! $this->storage->uploadFile($imageFilePath)) | |
throw new \Exception("Unable to upload file {$imageFilePath}"); | |
$imageName = basename($imageFilePath); | |
$param = new AsposeOmr\Model\OMRFunctionParam(); | |
$param->setFunctionParam($this->serializeFiles([$templateFilePath])); | |
$response = $this->omrApi->postRunOmrTask($imageName, "CorrectTemplate", $param); | |
return $this->checkOMRReponse($response, 'CorrectTemplate'); |
This file contains 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
<? | |
// For complete examples and data files, please go to https://github.com/aspose-omr-cloud/aspose-omr-cloud-php/ | |
if (! $this->storage->uploadFile($correctedTemplateFilePath)) | |
throw new \Exception("Unable to upload file {$correctedTemplateFilePath}"); | |
$correctedTemplateFileName = basename($correctedTemplateFilePath); | |
$param = new AsposeOmr\Model\OMRFunctionParam(); | |
$param->setFunctionParam($templateId); | |
$response = $this->omrApi->postRunOmrTask($correctedTemplateFileName, "FinalizeTemplate", $param); | |
return $this->checkOMRReponse($response, 'FinalizeTemplate'); |
This file contains 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
<? | |
// For complete examples and data files, please go to https://github.com/aspose-omr-cloud/aspose-omr-cloud-php/ | |
if (! $this->storage->uploadFile($templateFilePath)) | |
throw new \Exception("Unable to upload file {$templateFilePath}"); | |
$templateName = basename($templateFilePath); | |
$param = new AsposeOmr\Model\OMRFunctionParam(); | |
$param->setFunctionParam(json_encode(array('ExtraStoragePath' => self::$logosFolderName))); | |
$response = $this->omrApi->postRunOmrTask($templateName, "GenerateTemplate", $param); | |
return $this->checkOMRReponse($response, 'GenerateTemplate'); |
This file contains 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
<? | |
// For complete examples and data files, please go to https://github.com/aspose-omr-cloud/aspose-omr-cloud-php/ | |
if (! $this->storage->uploadFile($imagePath)) | |
throw new \Exception("Unable to upload file {$imagePath}"); | |
$imageName = basename($imagePath); | |
$param = new AsposeOmr\Model\OMRFunctionParam(); | |
$param->setFunctionParam($templateId); | |
$response = $this->omrApi->postRunOmrTask($imageName, "RecognizeImage", $param); | |
return $this->checkOMRReponse($response, 'RecognizeImage'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment