Here is the code, I create a document using TemplateProcessor phpWord extensions.
$processor= new TemplateProcessor($document->getPath());
$regexps=$this->repository->getRegExp($document->id);
if($regexps) {
foreach ($regexps as $regexp) {
$processor->setValue(
$regexp->regKey,
$this->documentSave[$regexp->regKey]
);
}
}
$fileName=DownloadDocuments::saveAsPath().’/’.$this->number;
$processor->saveAs($fileName.’.docx’);
$config= new Configuration();
$config->setAppKey(Yii::$app->params[‘asposeKey’])->setAppSid(Yii::$app->params[‘asposeSid’]);
$words=new WordsApi(null,$config);
$saveOptions = new SaveOptionsData([“save_format” => “pdf”, “file_name” => $fileName.’.pdf’]);
$request = new PostDocumentSaveAsRequest($fileName.’.docx’,$saveOptions);
getting the specified error
[500] Server error:
POST https://api.aspose.com//v1/words/%2Fvar%2Fwww%2Ftiger.lc%2Fbackend%2Fruler%2Ffiles%2Fdoc%2F38-3-%D0%97.docx/saveAs
resulted in a500 Internal Server Error
response:
Runtime Error
<meta name=“viewport” content="width= (truncated…)