We're sorry AsposeCloud doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.cloud

Convert DOCX to PDF in PHP Laravel Without Losing Format Using Aspose.Words REST API


we are evaluating Aspose.words Cloud API for converting Microsoft Word documents, as part of a more complex application we developed for one of our customers (in Laravel PHP).

We tested your API and the result seems good.

But we received a weird question from the Customer: they want to know if the PDF generated through the API will be identical to a PDF generated by exporting manually the same file by Microsoft Word export function. If not, what is the level of similarity between the two PDF files?

Is there an answer to this question?

Thank you.


Yes, we try to mimic Microsoft Word as closest as possible in the Aspose.Words. So you can use Aspose.Words Cloud SDK for PHP to convert DOCX to PDF in PHP Laravel without any issue. However, please let us know if you find any issues in this regard.

PHP Convert DOCX to PHP Online



try {

	//TODO: Get your ClientID and ClientSecret at https://dashboard.aspose.cloud (free registration is required).		

	$wordsApi = new Aspose\Words\WordsApi($ClientId,$ClientSecret);	
    $format = "pdf";
    $file = ("C:/Temp/02_pages.docx");
	$request = new Aspose\Words\Model\Requests\ConvertDocumentRequest($file, $format,null);
    $result = $wordsApi->ConvertDocument($request);	
} catch (Exception $e) {
    echo  "Something went wrong: ",  $e->getMessage(), "\n";

1 Like