1. Products
  2.   Word Processing
  3.   PHP
  4.   Aspose.Words Cloud SDK for PHP

Aspose.Words Cloud SDK for PHP

 
 

PHP API to Create & Process Microsoft Word Documents

REST API for creating, editing, splitting, merging, manipulating, and converting Word (DOC, DOCX, ODT) to PDF, HTML, EPUB, images & more in PHP Apps.

Aspose.Words Cloud SDK for PHP is a cloud-based platform that allows developers to easily integrate Word document processing features into their PHP applications with lesser cost and effort. With this SDK, you can create, edit, and convert Word documents, as well as manipulate document properties, such as the author, title, and keywords. The PHP Cloud SDK is a wrapper around Cloud API, designed to be simple, efficient, secure, and more productive. Software Developers can easily incorporate Word document generation, editing, and conversion facilities into PHP applications running on any modern OS.

Aspose.Words Cloud SDK for PHP is a powerful and easy-to-use platform and has included several important features for word documents generation and management, such as inserting & updating bookmarks, text searching in word documents, replacing text with other values, inserting comments, getting all comments from word file, update comments, add new pages, compress word document, insert & manage DrawingObjects, insert a field into a word document, insert/update headers and footers, gt all headers/footers in a Word document, insert & update footnotes, insert and manage tables, perform Mail Merge online, get all fonts in a Word document and many more.

Aspose.Words Cloud SDK for PHP supports document conversion to some popular file formats and from one format to another with ease. The library supports conversion to more than 20 file formats including EMF, PDF, HTML, EPUB, DOTX, GIF, BMP, PNG, RTF, XPS, WML, and many more. The SDK can be used to perform mail merge operations, such as creating letters, envelopes, and labels from a database or other data source.

Previous Next

Getting Started with Aspose.Words Cloud PHP REST API

Download, install and configure PHP 7.1 or higher version on your web-server. The recommend way to install Aspose.Words Cloud PHP REST API is using Composer. Please use the following command for a smooth installation.

Install Aspose.Words Cloud PHP REST API via Composer

composer require aspose-cloud/aspose-words-cloud 
You can also download it directly from GitHub.

Generate & Manage Word Documents via PHP REST API

Aspose.Words Cloud PHP REST API has provided complete support for creating new Word documents from the scratch inside PHP applications. The library fully supports several basic as well as advanced features for Word documents creation and processing such as add new pages, compress a Word document online, access and modify document properties, get statistics on a Word document, protect word documents, render parts of a Word document into an image, remove all macros from a Word document and many more.

Create New Word Documents via PHP API

 
<php
use Aspose\Words\WordsApi;
use Aspose\Words\Model\Requests\{CreateDocumentRequest};

$clientId = '####-####-####-####-####';
$secret = '##################';
$wordsApi = new WordsApi($clientId, $secret);
$createRequest = new CreateDocumentRequest(
    "Sample.docx", NULL, NULL);
$wordsApi->createDocument($createRequest); ?>

Convert Word Documents using PHP REST API

Aspose.Words Cloud PHP REST API allows software developers to convert Microsoft Word and OpenOffice documents to other supported file formats with high quality and speed. The library supports conversion to various popular file formats such as DOCX, DOC, RTF, ODT, PDF, HTML, MD, XAML, TXT, PNG, JPG and many others. The library also included various other popular documents conversions such as, Convert PDF to Word, Convert Word to PDF, Convert MOBI to EPUB, Convert MOBI to PDF, Convert Word to EPUB, Convert Word to Image, Convert Word to HTML and many more.

How to convert PDF to Word Programmatically via PHP REST API?

 
<php

use Aspose\Words\WordsApi;
use Aspose\Words\Model\Requests\{SaveAsOnlineRequest};
use Aspose\Words\Model\{SaveOptionsData};
$clientId = '####-####-####-####-####';
$secret = '##################';
$wordsApi = new WordsApi($clientId, $secret);
$requestDocument = "Sample.docx";
$requestSaveOptionsData = new SaveOptionsData(array(
"save_format" => "pdf",
"file_name" => "Sample_out.pdf",));
$saveRequest = new SaveAsOnlineRequest(
$requestDocument, $requestSaveOptionsData, NULL, NULL, NULL, NULL);
$wordsApi->saveAsOnline($saveRequest); ?>

Comparing Multiple Word Documents via PHP

Aspose.Words Cloud SDK for PHP enables software developers to compare their Word documents with just couple of lines of PHP code. The library allows programmatically comparing two Word documents and retrieving the differences between them. The library supports displaying the result of the documents comparison and can include information about the type of difference such as updated text, deleted text, newly added text, formatting change and so on. It may provide information about the location of the difference in the document, and the text that was added or deleted.

Generate Report via PHP library

Aspose.Words Cloud SDK for PHP has provided complete functionality for generating professional print-ready DOCX, DOC, RTF, PDF reports from templates inside PHP applications. To generate a report, first you need to prepare your source data in JSON, XML or CSV formats, then Create a report template and write a simple PHP application to bind the data to the template and produce the output document.  

Run Report Generation Process using PHP Commands

<php
use Aspose\Words\WordsApi;
use Aspose\Words\Model\Requests\{BuildReportOnlineRequest};
use Aspose\Words\Model\{ReportEngineSettings};

$clientId = '####-####-####-####-####';
$secret = '##################';
$wordsApi = new WordsApi($clientId, $secret);
$requestTemplate = "Sample.docx";
$requestReportEngineSettings = new ReportEngineSettings(array(
    "data_source_type" => "Json",
    "data_source_name" => "persons",));
$buildReportRequest = new BuildReportOnlineRequest(
    $requestTemplate, "Data.json", $requestReportEngineSettings, NULL);
$wordsApi->buildReportOnline($buildReportRequest); ?>
 English