Aspose Cloud PHP SDK

[![][1] as per Aspose Cloud 1.1.7.1. With this new release it is possible to create, read, manipulate and export features are greatly improved. You can extract sections, paragraphs, runs, page setup and fonts and update page setup and font in a Word document. Read more

New Aspose.Words Methods

As per the latest version of Aspose Cloud 1.1.7.1, we’ve implemented the following functions to the Aspose Cloud PHP SDK:

  • [Save Word documents as other formats][2] – This feature allows you to save Word documents as DOC, DOCX, DOCM, DOT, DOTX, DOTM, OOXML, HTML, HTMLFixed, WordML, MHTML, ODT, PDF, XPS, TIFF, EPUB, image and several other formats. Now this feature also supports export to XAML_FIXED format. You can use the [saveAs][3] “Aspose.Cells Cloud”) resource and send a POST request (specifying save options in the request body) to convert to any supported format.
  • [Split Word documents][4] – This feature allows you to split all or specific pages of a Word document to many formats. This feature was already supported but now it supports split to XAML_FIXED format. You can use [splitDocument][5] resource and send a POST request to split to any supported format.
  • [Get all sections][6] – This feature allows you to get a list of all sections present in a Word document. You can use the [sections][7] resource and send a GET request to get this list.
  • [Get a specific section][8] – This feature allows you to get any section from a Word document. You can use the [section][9] resource and send a GET request to get a section.
  • [Get all paragraphs][10] – This feature allows you to get a list of all paragraphs present in a Word document. You can use the [paragraphs][11] resource and send a GET request to get this list.
  • [Get a specific paragraph][12] – This feature allows you to get any paragraph from a Word document. You can use the [paragraph][13] resource and send a GET request to get a paragraph.
  • [Get a specific run][14] – This feature allows you to get any run of any paragraph from a Word document. You can use the [run][15] resource and send a GET request to get a run.
  • [Get font information][16] – This feature allows you to get font information from any run of a paragraph. You can use the [font][17] resource and send a GET request for this purpose.
  • [Update a run’s font][18] – This feature allows you to update font of any run in a Word document. You can use the [font][19] resource and send a POST request (specifying font options in the request body) to update font.
  • [Get page setup information][20] – This feature allows you to get page setup information from any section of a Word document. You can use the [pageSetup][21] resource and send a GET request for this purpose.
  • [Update page setup][22] – This feature allows you to update page setup of any section in a Word document. You can use the [pageSetup][23] resource and send a POST request (specifying page setup options in the request body) to update page setup.
  • [Get mustache field names][24] – This feature allows you to get mail merge and mustache field names. You can use the [mailMergeFieldNames][25] resource and send a GET request (passing useNonMergeFields parameter in the request URI) to get all merge fields including mustache fields.

Code Snippets

Sample Code Aspose.Words - Save Word Documents as Other Formats

use Aspose\Cloud\Common\AsposeApp;
use Aspose\Cloud\Common\Product;
use Aspose\Cloud\Words\Document;

AsposeApp::$appSID = '******';
AsposeApp::$appKey = '******';
AsposeApp::$outPutLocation = "******";

// Create object of document class
$document = new Document('AsposeDOC.docx');

// Provide Options
$xml_string =

"<PDFSaveOptions>

<SaveFormat>pdf</SaveFormat>

<FileName>Output_qazi.pdf</FileName>

<ImageCompression>Jpeg</ImageCompression>

<JpegQuality>70</JpegQuality>

<TextCompression>Flate</TextCompression>

</PDFSaveOptions>";

$document->saveAs($xml_string,'MainDocument.docx'); 

Sample Code Aspose.Words - Get Paragraphs

use Aspose\Cloud\Common\AsposeApp;
use Aspose\Cloud\Common\Product;
use Aspose\Cloud\Words\Document;

AsposeApp::$appSID = '******';
AsposeApp::$appKey = '******';

// Create object of document class
$document = new Document('MainDocument.docx');

$document->getParagraphs('MainDocument.docx'); 

Download

Start a Free Trial Today

Start a free trial today - all you need is to [sign up][26] with Aspose Cloud service. Once you have signed up, you are ready to try powerful file processing features offered by Aspose Cloud.

[1]: https://blogs.asposeptyltd.com/cloudsite/wp-content/uploads/sites/15/2014/09/aspose-logo-1-300x81.png “aspose-logo-1-300x81”)](http://www.aspose.com/cloud/total-api.aspx)We are pleased to announce the release of [Aspose Cloud PHP SDK](https://github.com/asposeforcloud/Aspose_Cloud_SDK_For_PHP “Aspose Cloud PHP SDK” [2]: http://www.aspose.com/docs/display/wordscloud/Convert+Word+Documents+to+any+Format+with+Additional+Settings [3]: http://www.aspose.com/docs/display/wordscloud/saveAs+(Controller+resource [4]: http://www.aspose.com/docs/display/wordscloud/Working+with+Split+Resource [5]: http://www.aspose.com/docs/display/wordscloud/splitDocument+%28Controller+Resource%29 “Aspose.Cells Cloud” [6]: http://www.aspose.com/docs/display/wordscloud/Get+a+List+of+Sections+from+a+Word+Document [7]: http://www.aspose.com/docs/display/wordscloud/sections “Aspose.Cells Cloud” [8]: http://www.aspose.com/docs/display/wordscloud/Get+a+specific+Section+from+a+Word+Document [9]: http://www.aspose.com/docs/display/wordscloud/section “Aspose.Cells Cloud” [10]: http://www.aspose.com/docs/display/wordscloud/Get+a+List+of+Paragraphs+from+a+Word+Document [11]: http://www.aspose.com/docs/display/wordscloud/paragraphs “Aspose.Cells Cloud” [12]: http://www.aspose.com/docs/display/wordscloud/Get+a+Paragraph+from+a+Word+Document [13]: http://www.aspose.com/docs/display/wordscloud/paragraph “Aspose.Cells Cloud” [14]: http://www.aspose.com/docs/display/wordscloud/Get+a+specific+Run+of+a+Paragraph+from+a+Word+Document [15]: http://www.aspose.com/docs/display/wordscloud/run “Aspose.Cells Cloud” [16]: http://www.aspose.com/docs/display/wordscloud/Get+Font+Information+of+a+Run+from+a+Word+Document [17]: http://www.aspose.com/docs/display/wordscloud/font “Aspose.Cells Cloud” [18]: http://www.aspose.com/docs/display/wordscloud/Update+Font+of+a+Run+in+a+Word+Document [19]: http://www.aspose.com/docs/display/wordscloud/font “Aspose.Cells Cloud” [20]: http://www.aspose.com/docs/display/wordscloud/Extract+Page+Setup+Information+from+a+Word+Document [21]: http://www.aspose.com/docs/display/wordscloud/pageSetup “Aspose.Cells Cloud” [22]: http://www.aspose.com/docs/display/wordscloud/Update+Page+Setup+of+a+Section+in+a+Word+Document [23]: http://www.aspose.com/docs/display/wordscloud/pageSetup “Aspose.Cells Cloud” [24]: http://www.aspose.com/docs/display/wordscloud/Get+All+Merge+Field+Names+from+a+Word+Document [25]: http://www.aspose.com/docs/display/wordscloud/mailMergeFieldNames “Aspose.Cells Cloud” [26]: https://cloud.aspose.com/SignUp