Wednesday, February 26, 2014

Document Processing using Aspose Cloud REST API on Salesforce Platform

What's New in this Release?

We are pleased to announce that Aspose team has set up a project that provides source code examples for achieving various document processing tasks using the Aspose Cloud REST API on the Salesforce platform. Apex is a strongly typed, object-oriented programming language that allows developers to execute flow and transaction control statements on the Force.com platform server in conjunction with calls to the Force.com​ API.  The project has been hosted on Github. The initial version of this project provides source code for mail merge and presentation merge feature. We’ll add more examples in upcoming iteration so developers can save time and quickly implement their required functionalities on the force.com platform. Along with this project we’ve also set up salesforce packages which you can install on your Salesforce platform. 

Overview: Aspose for Cloud

Aspose for Cloud is a cloud-based document generation, conversion and automation platform for developers. Before Aspose for Cloud document processing and manipulation tasks in the cloud were not so easy. The Aspose for Cloud APIs give developers full control over documents and file formats. Each API has been developed to offer a wide range of features for file processing in cloud. The Aspose for Cloud REST APIs are platform independent and can be used across any platform such as Node.js, Amazon, Salesforce etc. without any installation. Being language independent makes it a suitable choice for developers’ expert in any programming language. We also provide SDKs in different programming languages such as .NET, Java, PHP, Ruby and Node.js

Wednesday, February 19, 2014

Delete All Hyperlinks from Excel Workbook & Replace Multiple PDF Texts in Cloud

What's New in this Release?

We are pleased to announce the release of Aspose for Cloud 1.1.6.4. With this new release, create, read, manipulate and export features are greatly improved. You can find and replace multiple text elements of a PDF with a single API call and delete all hyperlinks from a Microsoft Excel worksheet. You can also split Microsoft Word documents to ODT, MHT, RTF, OTT, OpenXPS, WML, SVG and several other formats. Several UI and API issues have also been fixed in this release. The improvements are listed, by product, below. Following are some important enhancements made to different Aspose for Cloud APIs.
  • Find and Replace Multiple Texts – This feature allows you to replace multiple text elements of a PDF file or page with a single API call. You can set the storage and folder parameters if your PDF file is uploaded to a third party storage and use the POST method of the replaceTextList resource to replace old text instances with new ones.
  • Delete Hyperlinks from Excel Worksheets – This feature allows you to remove all existing hyperlinks from a worksheets. The hyperlinks resource can be used and a DELETE request can be sent to remove all hyperlinks from a worksheet.
  • Split Word Documents – This feature allows you to convert all or specific pages of a Word document to your desired format. The feature already existed but now supports many new formats including ODT, MHT, RTF, OTT, OpenXPS, WML and several others.
  • The convert Microsoft PowerPoint presentations to PDF feature has been improved. Some text elements were missing or misplaced and some images were also misplaced when converting complex presentations prior to this improvement. Complex presentations now render correctly.
  • Improve live API test section – Aspose for Cloud API’s Help section has been improved to provide a better user experience when testing GET, PUT, POST and DELETE requests.
  • The convert TIFF to fax compatible format feature has been improved and fixed the toFax resource throws “The stream reader has passed over the data boundary. The data is corrupt,” exception.
  • The following issues have been fixed in Aspose for Cloud UI:
    • Redirect URIs parameter is incorrect when creating Google Cloud storage.
    • Redirect URIs parameter is incorrect when creating Google Drive storage.
    • Terms of Use’ and ‘Privacy Policy’ missing from Sing Up page.
In addition to the above features, several bugs have been fixed and several enhancements have been made to Aspose for Cloud APIs.
  
Overview: Aspose for Cloud

Aspose for Cloud is a cloud-based document generation, conversion and automation platform for developers that offer a unique suite of APIs to work with Word documents, Excel spreadsheets, PowerPoint presentations, PDFs, and email formats and protocols. It supports all features for file processing, document scanning, barcodes creation and recognition, and allows extracting text or images too. You can also work with SaaSpose APIs using REST SDKs that can be called from .NET, Java, PHP and Ruby etc.

More about Aspose for Cloud

Wednesday, February 12, 2014

Enhanced Working with Docs, Spreadsheet & Presentations APIs in Aspose Cloud PHP SDK

What's New in this Release?

We are pleased to announce the release of Aspose Cloud SDK for PHP as per Aspose Cloud 1.1.6.3. Aspose Cloud SDK for PHP allows you to use cloud based REST API in your applications quickly and easily. With this new release the create, read, manipulate and export features are greatly improved, and many new resources have been implemented. This release adds new important methods and enhancements for creating, edit and manipulating MS Word Documents, Excel Spreadsheet and PowerPoint Presentation. Here are some of these features
  • In this version of Aspose Cloud PHP SDK you can split Microsoft Word documents to DOC, DOCX, DOCM, DOT, DOTX, DOTM, PDF, XPS,TIFF, EPUB and several other formats, get document statistics, accept or reject all tracking changes, update fields and add or delete watermarks in a Word document.
  • Using Aspose.Cells you can convert Microsoft Excel workbooks to other formats with additional settings, copy, rename and update Excel worksheets, set or delete background or watermark of a worksheet, freeze or unfreeze panes of a worksheet, hide, unhide, group, ungroup, auto-fit or copy rows in a worksheet. You can further add, update or delete hyperlinks in Excel worksheets, merge or unmerge cells, set value of cells or range, delete value of cells or range, set style of cells or range and delete formatting of cells or range in a worksheet and get cell properties including the first cell, last cell, minimum row, minimum data row, minimum column, minimum data column, maximum row, maximum data row, maximum column and maximum data column.
  • You can create Microsoft PowerPoint presentations from scratch, merge presentations, split presentations, export all or specific slides to HTML, set export options, add new slides, copy existing slides, change position of slides and work with different sections of your slides including comments, font settings, background, height, width and aspect ratio.
Overview: Aspose for Cloud

Aspose for Cloud is a cloud-based document generation, conversion and automation platform for developers that offer a unique suite of APIs to work with Word documents, Excel spreadsheets, PowerPoint presentations, PDFs, and email formats and protocols. It supports all features for file processing, document scanning, barcodes creation and recognition, and allows extracting text or images too. You can also work with SaaSpose APIs using REST SDKs that can be called from .NET, Java, PHP and Ruby etc.

Tuesday, February 11, 2014

Split Worksheets of an Excel Workbook to TIFF or PNG Formats in Cloud


This technical tip shows how developers can split worksheets of a workbook to a separate workbook, TIFF, PNG or any supported image format in the cloud.  This example allows you to split all or specific worksheets of a workbook file and save each worksheet as a new workbook, TIFF or any supported image format using Aspose.Cells for Cloud API in your applications. You can use our REST API with any language: .NET, Java, PHP, Ruby, Rails, Python, jQuery and many more. Some of the code samples are provided for the above languages.
Please take a look over the following code snippet for Split all Worksheets to PNGs
[C# Code]
AsposeApp.AppSID  = "77***********************************";
AsposeApp.AppKey = "9a*******************************";
string outputPath = "C:\\TempFiles\\";

//build URI to split workbook
string strURI = "http://api.aspose.com/v1.1/cells/Sample.xlsx/split?format=png";
//sign URI
string signedURI = Utils.Sign(strURI);
StreamReader reader = new StreamReader(Utils.ProcessCommand(signedURI, "POST"));
//further process JSON response
string strJSON = reader.ReadToEnd();
//Parse the json string to JObject
JObject parsedJSON = JObject.Parse(strJSON);
SplitWorkbookResponse responseStream = JsonConvert.DeserializeObject<SplitWorkbookResponse>(parsedJSON.ToString());

foreach (DocumentResponse splitSheet in responseStream.Result.Documents)
{
    string splitFileName = System.IO.Path.GetFileName(splitSheet.link.Href);
    //build URI to download split worksheets
    strURI = "http://api.aspose.com/v1.1/storage/file/" + splitFileName;
    //sign URI
    signedURI = Utils.Sign(strURI);
    //save split worksheets
    using (Stream fileStream = System.IO.File.OpenWrite(outputPath + splitFileName))
    {
        Utils.CopyStream(Utils.ProcessCommand(signedURI, "GET"), fileStream);
    }
}

    // class definitions
    public class SplitWorkbookResponse : Aspose.Cloud.Common.BaseResponse
    {
        public SplitWorkbook Result { get; set; }
    }
    public class SplitWorkbook
    {
        public DocumentResponse[] Documents { get; set; }
    }
    public class DocumentResponse
    {
        public int Id { get; set; }
        public LinkResponse link { get; set; }
    }
    /// <summary>
    /// represents link part of the response
    /// </summary>
    public class LinkResponse
    {
        public string Href { get; set; }
        public string Rel { get; set; }
        public string Title { get; set; }
        public string Type { get; set; }
    }

[VB.NET]
AsposeApp.AppSID  = "77***********************************";
AsposeApp.AppKey = "9a*******************************";
string outputPath = "C:\\TempFiles\\";

//build URI to split workbook
string strURI = "http://api.aspose.com/v1.1/cells/Sample.xlsx/split?from=1&to=2&format=tiff";
//sign URI
string signedURI = Utils.Sign(strURI);
StreamReader reader = new StreamReader(Utils.ProcessCommand(signedURI, "POST"));
//further process JSON response
string strJSON = reader.ReadToEnd();
//Parse the json string to JObject
JObject parsedJSON = JObject.Parse(strJSON);
SplitWorkbookResponse responseStream = JsonConvert.DeserializeObject<SplitWorkbookResponse>(parsedJSON.ToString());

foreach (DocumentResponse splitSheet in responseStream.Result.Documents)
{
    string splitFileName = System.IO.Path.GetFileName(splitSheet.link.Href);
    //build URI to download split worksheets
    strURI = "http://api.aspose.com/v1.1/storage/file/" + splitFileName;
    //sign URI
    signedURI = Utils.Sign(strURI);
    //save split worksheets
    using (Stream fileStream = System.IO.File.OpenWrite(outputPath + splitFileName))
    {
        Utils.CopyStream(Utils.ProcessCommand(signedURI, "GET"), fileStream);
    }
}

    // class definitions
    public class SplitWorkbookResponse : Aspose.Cloud.Common.BaseResponse
    {
        public SplitWorkbook Result { get; set; }
    }
    public class SplitWorkbook
    {
        public DocumentResponse[] Documents { get; set; }
    }
    public class DocumentResponse
    {
        public int Id { get; set; }
        public LinkResponse link { get; set; }
    }
    /// <summary>
    /// represents link part of the response
    /// </summary>
    public class LinkResponse
    {
        public string Href { get; set; }
        public string Rel { get; set; }
        public string Title { get; set; }
        public string Type { get; set; }
    } 

More about Aspose.Cells for Cloud

Wednesday, February 5, 2014

Implement Simple Mail Merge or Mail Merge with Regions in Cloud Using PHP

What's New in this Release?

Mail merge allows you to produce document (potentially large numbers of documents) from a single template and a structured data source. The letter may be sent out to many recipients with small changes, such as a change of address or a change in the greeting line. It can also be used to generate business reports, purchase orders, receipts, catalogs, inventories, and invoices etc. Aspose.Words for Cloud Mail Merge allows you to generate documents from a template and XML in any language including .NET, Java, PHP, Ruby, Rails, Python, jQuery and many more. You can use it with any language or platform that supports REST. (Almost all platforms and languages support REST and provide native REST clients to work with REST API). This post covers mail merge in PHP, you can check Aspose.Words for Cloud documentation for other languages. To execute mail merge, you need to upload a template to Aspose for Cloud or any supported third party storage and then send a POST request (passing XML data in the request body) to generate documents based on template and data. The following steps describe the process in detail. Aspose.Words for Cloud supports simple mail merge and mail merge with regions. If you want to insert simple or non-repeating data, for example name, address and code fields on an envelope, or to and from fields in a letter, use simple mail merge (also called mail merge without regions). If you are preparing reports, invoices and purchase orders, or similar documents, and want to insert tables, rows or repeating data, or if you want your documents to dynamically grow based on your input data, use mail merge with regions.
Mail Merge using PHP REST
Before you execute mail merge, you need to upload your template Word file and XML data to Aspose for Cloud or any supported third party storage. See Upload File examples for more details. Once you upload your template and XML, you can use the URI to execute mail merge
There are several optional parameters you can use with the above mentioned URI. All or specific parameters can be used according to your requirement. Following is the detail of these optional parameters.
  • withRegions — This parameter can be set to true if you want to execute mail merge with regions. See section 1 of the complete code.
  • mailMergeDataFile — This parameter can be set to specify the XML data file. See section 1 of the complete code.
  • cleanup — This parameter can be set specify different cleanup options e.g. if you want to remove empty paragraphs, unused fields and empty tables etc. See section 1 of the complete code and executeMailMerge resource.
  • filename — This parameter can be used to specify name of the file generated as a result of mail merge.
  • storage — This parameter can be used to set storage name if you are using a third party storage.
  • folder — This parameter can be used to set the name/path of the folder where template file is uploaded.
After building the URI, go through the following steps:
  • Set App SID and App Key and sign URI. See section 2 of the complete code and Sign URI method for more details.
  • Send a POST request to Aspose for Cloud service. See section 3 of the complete code and ProcessCommand method for more details.
  • Get output file name from the response stream. See section 4 of the complete code.
Mail Merge using PHP SDK

If you want to use our PHP SDK to execute mail merge, you can download this SDK from Aspose for Cloud SDK for PHP. In order to use PHP SDK, you need to perform following steps:
  • Set base product URI, App SID and App Key. See section 1 of the complete code.
  • Set output location, input file name and input XML. See section 2 of the complete code.
  • Upload input file. See section 3 of the complete code.
  • Create object of MailMerge class and call executeMailMerge method for simple mail merge and executeMailMergeWithRegions method for mail merge with regions. See section 4 of the complete code.
For XML & PDF Code Samples and other details please visit the main blog post page. 

Overview: Aspose for Cloud

Aspose for Cloud is a cloud-based document generation, conversion and automation platform for developers that offer a unique suite of APIs to work with Word documents, Excel spreadsheets, PowerPoint presentations, PDFs, and email formats and protocols. It supports all features for file processing, document scanning, barcodes creation and recognition, and allows extracting text or images too. You can also work with SaaSpose APIs using REST SDKs that can be called from .NET, Java, PHP and Ruby etc.