Thursday, January 31, 2013

Manipulate Word, Excel, PowerPoint & PDF Files in Android Applications

What’s new in this release?
Saaspose development team is pleased to announce the release of Saaspose SDK for Android. It is great news for all Android developers to enjoy a whole new experience of document manipulation in the cloud. We have been working on Saaspose SDK for Android to facilitate the android developers with feature-rich APIs round the globe. Saaspose REST APIs gives developers total control over documents and file formats on all platforms. We have developed SDKs for these file format APIs to help you utilize these feature-rich APIs in you applications for quick file processing. You can now use Saaspose APIs in your Android applications and take document manipulation experience to another level. Whether its text extraction from PDF files or conversion of MS Word document to different file formats, Saaspose REST APIs have much more to offer for your Android applications. You can extract text from documents, calculate formula in worksheets, convert PDF to images, extract images and slides from presentations and perform many such operations on the documents in your Android applications. You can also integrate multiple Saaspose APIs to use a combination of features for best quality results. For instance, you can convert a workbook to presentation using Saaspose.Cells and merge multiple presentations using Saaspose.Slides. You can integrate the features in your applications through simple steps, all you need to do is download the required SDK and enjoy using a variety of features for your document processing requirements. You can download our SDKs in different programming languages such as .NET, Java, PHP and Ruby from Github. Get started with Saaspose APIs right away and enjoy a whole new experience of document manipulation. You can opt for free development account to evaluate these APIs for your Android applications. You may choose to upgrade to our monthly pricing plans that have been prepared to offer you the best value for your required package. Stay tuned to our blog and newsletter for latest updates on Android SDKs and the release announcements. Contact us if you have any queries, confusions or suggestions regarding Saaspose SDKs for Android.
About Saaspose
SaaSpose is a cloud-based document generation, conversion and automation platform for developers. Using SaaSpose makes it easy for Web & Mobile Developers to work with Microsoft Word documents, Microsoft Excel spreadsheets, Microsoft PowerPoint presentations, Adobe PDFs, OpenDocument formats, and email formats and protocols in their Apps.  The SaaSpose REST API enables you to quickly integrate the following into your Web: Document Assembly & Mail-Merge, Reporting, Document Conversion, Text and Image Extraction, Device Targeting, Metadata Removal, Barcode Recognition, Generation & Embedding, Email Templating & Tracking. The REST API can be called from any platform: .NET, Java, Ruby, Salesforce, Amazon etc.
More about Saaspose
Contact Information
Aspose Pty Ltd, Suite 163,
79 Longueville Road
Lane Cove, NSW, 2066
Australia
Saaspose - Your File Format Experts 2.0
sales@aspose.com
Phone: 1.214.329.1520
Fax: 866.810.9465

Tuesday, January 29, 2013

Convert Documents to TIFF XPS, PDF, HTML or SWF Format Using REST API

What’s new in this release?
Online documents have gained enormous popularity in the era of emerging technologies. Whether it is storage of analytical data, or conversion of images to documents, different file formats play a great role in minimizing the manual work. You can convert the documents to the different file formats through Saaspose.Words such as PDF, XPS, TIFF, HTML, SWF etc. This REST API ensures that the format and quality of original documents is retained. You can either convert document by using the uploaded document on Saaspose storage, Amazon S3 storage etc. or send the document as request stream to Saaspose API. Previously, we have provided examples for different programming languages such as Java, .NET and PHP; we are pleased to announce that you can now use Saaspose.Words REST examples in Ruby as well. You can either invoke these REST operations directly using your own code or you can use a REST client for your particular language. You can upload the document to Saaspose storage or Amazon S3 storage using Saaspose REST API. Once it’s uploaded, you can convert the uploaded file to desired document format using Saaspose.Words REST API in Ruby. Another approach is to convert document on local system using Saaspose.Words REST API or SDKs without saving the file to Saaspose Storage. You can use the file path or stream to convert the local document to different file formats using Saaspose.Words API. It is a single call process that uses convert controller resource; it uploads the document to server as stream, converts the document to desired file format, sends the converted file back as response stream and deletes the source document from the server. For more information, please refer to Saaspose.Words documentation. Sign up at Saaspose and enjoy a whole new experience of document processing or you may opt for free development account to evaluate our APIs. Please write to us in case of any queries, confusion or suggestions.
About Saaspose
SaaSpose is a cloud-based document generation, conversion and automation platform for developers. Using SaaSpose makes it easy for Web & Mobile Developers to work with Microsoft Word documents, Microsoft Excel spreadsheets, Microsoft PowerPoint presentations, Adobe PDFs, OpenDocument formats, and email formats and protocols in their Apps.  The SaaSpose REST API enables you to quickly integrate the following into your Web: Document Assembly & Mail-Merge, Reporting, Document Conversion, Text and Image Extraction, Device Targeting, Metadata Removal, Barcode Recognition, Generation & Embedding, Email Templating & Tracking. The REST API can be called from any platform: .NET, Java, Ruby, Salesforce, Amazon etc.
More about Saaspose
Contact Information
Aspose Pty Ltd, Suite 163,
79 Longueville Road
Lane Cove, NSW, 2066
Australia
Saaspose - Your File Format Experts 2.0
sales@aspose.com
Phone: 1.214.329.1520
Fax: 866.810.9465

Sunday, January 27, 2013

Protect Excel Workbook from Unauthorized Access in Java Applications

This technical tip allows developers how to protect a Excel workbook from unauthorized access using Saaspose.Cells REST API in Java applications. Some important steps for performing this task is to build URI to Protect Workbook, sign URI, serialize the JSON request content, Represents Protection Types and use Protection Class above to apply the protection.
Sample Code for protecting Excel workbook from unauthorized access
//build URI to Protect Workbook
string strURI = "http://api.saaspose.com/v1.0/cells/input.xls/protection";
//sign URI
string signedURI = Sign(strURI);
//serialize the JSON request content
Protection protection = new Protection();
protection.setProtectionType(ProtectionType.All);
protection.setPassword("password");
              
String strJSON = "";
Gson gson = new Gson();
              
strJSON = gson.toJson(encryption, Encryption.class);
InputStream responseStream = ProcessCommand(signedURI, "POST", strJSON);
           
String strResponse = StreamToString(responseStream);
//Following is the Protection Class used above
public class Protection
    {
        public Protection()
        {
      
        }
        private ProtectionType ProtectionType;
        private String Password;
      
        public ProtectionType getProtectionType(){return ProtectionType;}
        public String getPassword(){return Password;}
      
        public void setProtectionType(ProtectionType ProtectionType){ this.ProtectionType=ProtectionType;}
        public void setPassword(String Password ){ this.Password=Password;}
     
    }
    /// <summary>
    /// Represents Protection Types
    /// </summary>
    public enum ProtectionType
    {
        All,
        Structure,
        Windows,
        None
    }
Overview: Saaspose.Cells
Saaspose.Cells is a REST API for processing spreadsheets in the cloud. It allows creating, manipulating & converting spreadsheets in web, desktop, mobile & cloud applications. It supports rows, columns, cells, text, data, images, hyperlinks, comments, formulas & many other aspects of spreadsheets. It can be used with any language to incorporate the spreadsheet processing features in any type of business application. It renders spreadsheets & charts to images like JPEG, PNG, SVG, GIF or TIFF etc.
More about Saaspose.Cells
Contact Information
Aspose Pty Ltd, Suite 163,
79 Longueville Road
Lane Cove, NSW, 2066
Australia
Saaspose - Your File Format Experts 2.0
sales@aspose.com
Phone: 1.214.329.1520
Fax: 866.810.9465

Tuesday, January 22, 2013

Create PDF File from Web Pages, Raw HTML & HTML Template inYour Apps.

What's New in this Release?
Saaspose.Pdf is a REST API that allows Create PDF from HTML templates Using Saaspose.Pdf examples in Python. While working with HTML pages, there might be scenarios where you need to generate the printable version. Usually there are layout issues that occur in the printable HTML such as fitting the content into the print preview screen etc. Saaspose.Pdf REST API is the perfect solution that lets you create PDF from web pages and raw HTML code in your applications. You can create a PDF file from HTML templates and the components of the HTML are retained in the PDF file. PDF files support interactive functions such as hyperlinks, markup, file attachments, annotations, PDF files can be created from XML, HTMLs etc. Saaspose.Pdf assures that these functions are retained in the PDF files created from HTML templates. Previously, we have provided examples for different programming languages such as Java, .NET, PHP and Ruby; we are pleased to announce that you can now use Saaspose.Pdf REST examples in Python as well. As it is a REST API, you only need to consume its REST interface in your application. or more details, please refer to Saaspose.Pdf documentation. You can create PDF files using Saaspose.Pdf REST API or you can also choose to convert doc to PDF, xls to PDF, slides to PDF using Saaspose APIs. You can integrate the features into your application using any programming language of your choice. Get started with this feature rich API and create PDF files from HTML templates. You can also opt for our free development account for evaluation of Saaspose APIs.
Overview: Saaspose.Pdf 
Saaspose.Pdf is a REST API to create, edit & manipulate PDF files. It also convert PDF file to DOC, DOCX, HTML, XPS, TIFF etc. You can create a new PDF either from scratch or from HTML, XML, template, database, XPS or an image. A PDF file can also be rendered to JPEG, PNG, GIF, BMP, TIFF and many other image formats. It works with any language like .NET, Java, PHP, Ruby, Python and many others. It is platform independent REST API & working with web, desktop, mobile or cloud applications alike.
More about Saaspose.Pdf
Contact Information
Aspose Pty Ltd, Suite 163,
79 Longueville Road
Lane Cove, NSW, 2066
Australia
Saaspose - Your File Format Experts 2.0
sales@aspose.com
Phone: 1.214.329.1520
Fax: 866.810.9465

Monday, January 21, 2013

Workbook to Slide Conversion & Merging Several Presentations in Cloud

What’s new in this release?
Saaspose APIs support different kinds of document processing and manipulation tasks for MS Word documents, presentations, worksheets and images through web or mobile applications in the cloud. The business requirements of your applications may you require to convert workbooks to slides or Presentations. You can then merge presentation with other presentations. In such scenarios, Saaspose.Cells and Saaspose.Slides make the perfect combination of APIs for your application. Saaspose.Cells is a REST API that helps you create, manipulate and convert spreadsheets in the cloud. Saaspose.Slides allows you to process presentations; create, modify, and convert presentations in the cloud. Using a combination of these two REST APIs, you can convert a workbook and merge multiple presentations. Saaspose.Cells provides support for conversion of workbooks to slides. Using Saaspose.Cells REST examples and SDKs, you can convert workbooks to presentations in no time. The conversion process is a quick and easy process with Saaspose.Cells and the formatting information and data is retained in the converted format i.e. presentation. This is quite a useful aspect of workbooks where you want to represent your analytical data as presentations and slides. Saaspose.Cells provides support for conversion of workbooks to slides. Using Saaspose.Cells REST examples and SDKs, you can convert workbooks to presentations in no time. The conversion process is a quick and easy process with Saaspose.Cells and the formatting information and data is retained in the converted format i.e. presentation. This is quite a useful aspect of workbooks where you want to represent your analytical data as presentations and slides. For more information, please refer to Saaspose.Cells and Saaspose.Slides documentation. Using a combination of these two REST APIs, you can easily achieve quality results of workbook conversion and merging multiple presentations. Please write to us in case of any queries or your requirements of using combination of REST APIs to produce better results. Stay tuned to our blog for more updates and announcements.
About Saaspose
SaaSpose is a cloud-based document generation, conversion and automation platform for developers. Using SaaSpose makes it easy for Web & Mobile Developers to work with Microsoft Word documents, Microsoft Excel spreadsheets, Microsoft PowerPoint presentations, Adobe PDFs, OpenDocument formats, and email formats and protocols in their Apps.  The SaaSpose REST API enables you to quickly integrate the following into your Web: Document Assembly & Mail-Merge, Reporting, Document Conversion, Text and Image Extraction, Device Targeting, Metadata Removal, Barcode Recognition, Generation & Embedding, Email Templating & Tracking. The REST API can be called from any platform: .NET, Java, Ruby, Salesforce, Amazon etc.
More about Saaspose.Cells
Contact Information
Aspose Pty Ltd, Suite 163,
79 Longueville Road
Lane Cove, NSW, 2066
Australia
Saaspose - Your File Format Experts 2.0
sales@aspose.com
Phone: 1.214.329.1520
Fax: 866.810.9465

Thursday, January 17, 2013

Convert PDF Files to Slide, Image, HTML & Many Other Formats in Cloud

What's New in this Release?
Saaspose.Pdf is a REST API that allows creating, editing and manipulating PDF files in the cloud. While working with PDF files, you may require converting PDF to other file formats such as slides, images, HTML, etc. Saaspose.Pdf provides the best solution for this important aspect of your PDF manipulation requirement. You can convert PDF to other file formats using Saaspose.Pdf REST API in your applications. Previously, we have provided examples for different programming languages such as Java, .NET, PHP and Ruby; we are pleased to announce that you can now use Saaspose.Pdf REST examples in Python as well. As it is a REST API, you only need to consume its REST interface in your application. You can either invoke these REST operations directly using your own code or you can use a REST client for your particular language. You can upload the desired PDF file to Saaspose Storage using Saaspose REST API. Then you can convert the uploaded file to desired document format using Saaspose.Pdf REST examples in Python. You can also directly convert PDF file on local system using Saaspose.Pdf REST API or SDKs without saving the file to Saaspose Storage.  It is a single call process that uses convert controller resource, it uploads the file to server, converts the file to the desired format, sends the converted file back as response stream and deletes the source file from the server. For more details, please refer to Saaspose.Pdf documentation. Saaspose.Pdf has been designed to provide the best solutions for PDF manipulation tasks. You can also integrate this feature-rich API with Saaspose APIs to use a variety of features according to your business needs. Get your application information by signing up at Saaspose.com and start converting PDF files to other formats. You can opt for free development account that enables you to evaluate all of our APIs. Your valuable feedback helps us improve our products and features. Stay tuned to our blog for announcements and updates.
Overview: Saaspose.Pdf 
Saaspose.Pdf is a REST API to create, edit & manipulate PDF files. It also convert PDF file to DOC, DOCX, HTML, XPS, TIFF etc. You can create a new PDF either from scratch or from HTML, XML, template, database, XPS or an image. A PDF file can also be rendered to JPEG, PNG, GIF, BMP, TIFF and many other image formats. It works with any language like .NET, Java, PHP, Ruby, Python and many others. It is platform independent REST API & working with web, desktop, mobile or cloud applications alike.
More about Saaspose.Pdf
Contact Information
Aspose Pty Ltd, Suite 163,
79 Longueville Road
Lane Cove, NSW, 2066
Australia
Saaspose - Your File Format Experts 2.0
sales@aspose.com
Phone: 1.214.329.1520
Fax: 866.810.9465

Tuesday, January 15, 2013

OLE Data Extraction from Specific Drawing Object at Amazon S3 Storage

This technical tip allows developers to extract ole data from a specific drawing object using Saaspose.Words REST API in your .NET applications. You need to upload file to Amazon S3 storage before running this example.  Some important steps for performing this task are to specify product URI, Choose from jpeg, tiff, png and bmp, build URI, sign URI, get response stream, required methods and classes are also given in detail. Please check Saaspose example section for more details on how to upload files to Amazon S3 storage.
Sample Code for Extracting Ole Data from a Drawing Object at Amazon S3 Storage
SaasposeApp.AppKey = "9a******************";
            SaasposeApp.AppSID = "77*********************";
            //specify product URI
            Product.BaseProductUri = @"http://api.saaspose.com/v1.0";
            try
            {
                int drawingObjectIndex = 1;
                string fileName = "SampleDrawingObject.doc";
                string saveFormat = "xls"; //Choose from jpeg, tiff, png and bmp
                string outputFile = "C:\\OutputDrawingObject." + saveFormat;
                string amazonS3StorageName = "MyAmazonS3Storage";
                string amazonS3BucketName = "MyS3Bucket"; // include folder name if file is not at root folder
                //build URI
                string strURI = Product.BaseProductUri + "/words/" + fileName + "/drawingObjects/" + drawingObjectIndex;
                strURI += "/oleData?storage=" + amazonS3StorageName + "&folder=" + amazonS3BucketName;
                //sign URI
                string signedURI = Sign(strURI);
                //get response stream
                Stream responseStream = ProcessCommand(signedURI, "GET");
                using (Stream fileStream = System.IO.File.OpenWrite(outputFile))
                {
                    CopyStream(responseStream, fileStream);
                }
                responseStream.Close();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
//Following are the required methods and classes
        public static string Sign(string url)
        {
            try
            {
                // Add appSID parameter.
                UriBuilder builder = new UriBuilder(url);
                if (builder.Query != null && builder.Query.Length > 1)
                    builder.Query = builder.Query.Substring(1) + "&appSID=" + SaasposeApp.AppSID;
                else
                    builder.Query = "appSID=" + SaasposeApp.AppSID;
                // Remove final slash here as it can be added automatically.
                builder.Path = builder.Path.TrimEnd('/');
                // Compute the hash.
                byte[] privateKey = System.Text.Encoding.UTF8.GetBytes(SaasposeApp.AppKey);
                System.Security.Cryptography.HMACSHA1 algorithm = new System.Security.Cryptography.HMACSHA1(privateKey);
                //System.Text.ASCIIEncoding
                byte[] sequence = System.Text.ASCIIEncoding.ASCII.GetBytes(builder.Uri.AbsoluteUri);
                byte[] hash = algorithm.ComputeHash(sequence);
                string signature = Convert.ToBase64String(hash);
                // Remove invalid symbols.
                signature = signature.TrimEnd('=');
                signature = System.Web.HttpUtility.UrlEncode(signature);
                // Convert codes to upper case as they can be updated automatically.
                signature = System.Text.RegularExpressions.Regex.Replace(signature, "%[0-9a-f]{2}", e => e.Value.ToUpper());
               
                // Add the signature to query string.
                return string.Format("{0}&signature={1}", builder.Uri.AbsoluteUri, signature);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
        public static Stream ProcessCommand(string strURI, string strHttpCommand)
        {
            try
            {
                Uri address = new Uri(strURI);
                System.Net.HttpWebRequest request = (System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create(address);
                request.Method = strHttpCommand;
                request.ContentType = "application/json";
                request.ContentLength = 0;
                System.Net.HttpWebResponse response = (System.Net.HttpWebResponse)request.GetResponse();
                return response.GetResponseStream();
            }
            catch (System.Net.WebException webex)
            {
                throw new Exception(webex.Message);
            }
            catch (Exception Ex)
            {
                throw new Exception(Ex.Message);
            }
        }
        public static void CopyStream(Stream input, Stream output)
        {
            try
            {
                byte[] buffer = new byte[8 * 1024];
                int len;
                while ((len = input.Read(buffer, 0, buffer.Length)) > 0)
                {
                    output.Write(buffer, 0, len);
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
    }
    public class Product
    {
       public static string BaseProductUri { get; set; }
    }
    public class SaasposeApp
    {
       public static string AppSID { get; set; }
       public static string AppKey { get; set; }
    }
Overview: Saaspose.Words
Saaspose.Words is a platform independent REST API used for cloud based document creation, manipulation & conversion. It allows converting document to DOC, DOCX, XPS, TIFF, PDF, HTML, SWF & many other formats. It can be used languages like .NET, Java, PHP, Ruby, Rails, Python, jQuery & many others. It can also be integrated with other cloud services to process documents. Other features include Create & modify watermark, content & formatting manipulation, mail merge abilities, reporting features.
More about Saaspose.Words
Contact Information
Aspose Pty Ltd, Suite 163,
79 Longueville Road
Lane Cove, NSW, 2066
Australia
Saaspose - Your File Format Experts 2.0
sales@aspose.com
Phone: 1.214.329.1520
Fax: 866.810.9465

Sunday, January 13, 2013

PDF File to HTML Conversion in Java Applications Using REST API

This technical tip allows developers to convert local PDF file to HTML without using Saaspose or any other storage using Saaspose.Pdf REST API in your Java applications. Saaspose API returns the output as a ZIP file when converting to HTML. We will create and use getZippedFiles method in this example to save output ZIP file as HTML. Some important steps for performing this task is to build url to convert Pdf file, sign URI, execute signed URI request and get response stream.
Sample Code for Converting PDF File to HTML Locally
SaasposeApp.setAppKey("9a6************************");
           SaasposeApp.setAppSID("77**************************");
            //build uri to convert Pdf file
            String strURI = "http://api.saaspose.com/v1.0/pdf/convert?format=html";
            //sign URI
            String signedURI = Sign(strURI);
            InputStream fileStream = new FileInputStream(inputPath);
            //get response stream
            InputStream htmlOutput = ProcessCommand(signedURI, "PUT", fileStream);
           
            String destination = "c:\\OutputHTML\\";
            boolean success = (new File(destination)).mkdir();
       
           if (success) {
                  getZippedFiles(htmlOutput, destination);
           }
public static void getZippedFiles(InputStream zipFile, String destination) {
        try {
                       byte[] buf = new byte[1024];
                       ZipInputStream zipinputstream = null;
                       ZipEntry zipentry;
                       zipinputstream = new ZipInputStream(zipFile);
                       zipentry = zipinputstream.getNextEntry();
                       while (zipentry != null) {
                               // for each entry to be extracted
                       String entryName = destination + zipentry.getName();
                       entryName = entryName.replace('/', File.separatorChar);
                       entryName = entryName.replace('\\', File.separatorChar);
                       System.out.println("entryname " + entryName);
                       int n;
                       FileOutputStream fileoutputstream;
                       File newFile = new File(entryName);
                       if (zipentry.isDirectory()) {
                               if (!newFile.mkdirs()) {
                                      break;
                               }
                               zipentry = zipinputstream.getNextEntry();
                               continue;
                       }
                       fileoutputstream = new FileOutputStream(entryName);
                       while ((n = zipinputstream.read(buf, 0, 1024)) > -1) {
                               fileoutputstream.write(buf, 0, n);
                       }
                       fileoutputstream.close();
                       zipinputstream.closeEntry();
                       zipentry = zipinputstream.getNextEntry();
               }// while
                       zipinputstream.close();
        } catch (Exception e) {
               e.printStackTrace();
        }
}
Overview: Saaspose.Pdf
Saaspose.Pdf is a REST API to create, edit & manipulate PDF files. It also convert PDF file to DOC, DOCX, HTML, XPS, TIFF etc. You can create a new PDF either from scratch or from HTML, XML, template, database, XPS or an image. A PDF file can also be rendered to JPEG, PNG, GIF, BMP, TIFF and many other image formats. It works with any language like .NET, Java, PHP, Ruby, Python and many others. It is platform independent REST API & working with web, desktop, mobile or cloud applications alike.
More about Saaspose.BarCode
Contact Information
Aspose Pty Ltd, Suite 163,
79 Longueville Road
Lane Cove, NSW, 2066
Australia
Saaspose - Your File Format Experts 2.0
sales@aspose.com
Phone: 1.214.329.1520
Fax: 866.810.9465

Thursday, January 10, 2013

Convert Workbook to HTML & Embed Your Analytical Data to Website Quickly

What’s new in this release?
The latest version of Saaspose.Cells includes a remarkable feature for converting workbooks to HTML in cloud. Saaspose.Cells is a REST API that helps you create, manipulate and convert spreadsheets in the cloud. Saaspose.Cells allows work with various aspects of workbook manipulation such as conversion to other file formats, encryption and decryption of workbooks, calculate formula, find and replace text etc. You can convert your workbooks to different file formats as per your requirements. Saaspose.Cells provides support for conversion of workbooks to HTML. Using Saaspose.Cells REST examples and SDKs, you can convert workbooks to HTML in no time. Conversion from workbook to HTML is a quick and easy process with Saaspose.Cells and the formatting information and data is retained in the converted format i.e. HTML. This is quite a useful aspect of workbooks where you want to represent your analytical data as HTML page and embed into your websites. You can upload the desired file to Saaspose Storage using Saaspose REST API. Then you can convert the uploaded file to desired document format using Saaspose.Cells REST examples. You can also directly convert the XLS/XLSX file on your local system using Saaspose.Cells REST API or SDKs without saving the file to Saaspose Storage. You can use the file path or stream to convert the local workbook to HTML using Saaspose.Cells API. You can utilize Saaspose.Cells REST examples and SDKs for converting the file uploaded on Saaspose Storage for different languages like .NET, Java, PHP and Ruby. For more information, please refer to Saaspose.Cells documentation. Get your application information by signing up at Saaspose.com and start processing your spreadsheets! You can opt for free development account that enables you to evaluate all of our APIs.
Overview: Saaspose.Cells
Saaspose.Cells is a REST based API for processing spreadsheets in the cloud. It allows creating, manipulating and converting spreadsheets in your web, desktop, mobile and cloud applications. It supports rows, columns, cells, text, data, images, hyperlinks, comments, formulas & many other aspects of spreadsheet. It can be used with any language to incorporate the spreadsheet processing features in any type of business application. It is a platform independent API & can be used with any language.
More about Saaspose.Cells
Contact Information
Aspose Pty Ltd, Suite 163,
79 Longueville Road
Lane Cove, NSW, 2066
Australia
Saaspose - Your File Format Experts 2.0
sales@aspose.com
Phone: 1.214.329.1520
Fax: 866.810.9465

Tuesday, January 8, 2013

Convert Word Docs to Images & PDF with Same Data & Formatting in Cloud

What’s new in this release?
Saaspose development team is happy to announce the conversion of documents into images and PDFs as per user’s requirements in this new release. Saaspose.Words allows creating, editing and manipulating documents including MS Word documents in the cloud. There can be different requirements in user’s applications according to different scenarios in today’s web applications era. You may require to create a document that user can download and use its data accordingly. Using Saaspose.Words REST API, you can create an empty MS Word document. Saaspose APIs are designed to meet your cloud computing requirements in a well-organized manner that yields quality results. Once you have created the documents using Saaspose.Words, you can now convert the documents to images and PDFs as per your requirements. Your documents including MS Word documents may contain any kind of data including pictures, plain text, rich text, watermarks drawing objects etc. The PDF file created from MS Word documents contains the same data, formatting, and objects such as images, charts, tables etc. as present in the source document. Saaspose.Words assures that the formatting information and the content of document is retained after conversion from .docx to pdf or .docx to jpeg. You can either convert document to other file formats by using the uploaded document on Saaspose Storage or send the document as request stream to Saaspose API. Document conversion to images and PDF files is simple, quick and time-saving with Saaspose.Words API. You can choose from your desired programming language such as .NET, Java, PHP and Ruby. Please refer toSaaspose.Words documentation for more details. Sign up at Saaspose and enjoy a whole new experience of document processing and conversions through Saaspose feature-rich APIs. You can also opt for our free development account to evaluate the file format APIs. Please write to us in case of any queries. Stay tuned to our blog for more updates and announcements.
Overview: Saaspose.Words
Saaspose.Words is a platform independent REST API used for cloud based document creation, manipulation & conversion. It allows converting document to DOC, DOCX, XPS, TIFF, PDF, HTML, SWF & many other formats. It can be used languages like .NET, Java, PHP, Ruby, Rails, Python, jQuery & many others. It can also be integrated with other cloud services to process documents. Other features include Create & modify watermark, content & formatting manipulation, mail merge abilities, reporting features.
More about Saaspose.Words
Contact Information
Aspose Pty Ltd, Suite 163,
79 Longueville Road
Lane Cove, NSW, 2066
Australia
Saaspose - Your File Format Experts 2.0
sales@aspose.com
Phone: 1.214.329.1520
Fax: 866.810.9465

Sunday, January 6, 2013

Add Page Number Field into Document Uploaded at Amazon S3 Storage

This technical tip allows developers to insert page number field into the Word document using Saaspose.Words REST API in your .NET applications.  You need to upload file to Amazon S3 storage before running this example.  Some important steps for performing this task are to specify product URI, serialize the JSON request content, build URI, sign URI, get response stream, required methods and classes are also given in detail. Please check Saaspose example section for more details on how to upload files to Amazon S3 storage.
Sample Code for Inserting Page Number Field in Doc at Amazon S3 Storage
SaasposeApp.AppKey = "9a******************";
SaasposeApp.AppSID = "77*********************";
            //specify product URI
            Product.BaseProductUri = @"http://api.saaspose.com/v1.0";
           
            try
            {
                string fileName = "Sample.doc";
                string saveFormat = "doc";
                string outputFile = "C:\\Output." + saveFormat;
                string amazonS3StorageName = "MyAmazonS3Storage";
                string amazonS3BucketName = "MyS3Bucket"; // include folder name if file is not at root folder
                //serialize the JSON request content
                Field field = new Field();
                field.Alignment = "right";
                field.Format = "{PAGE} of {NUMPAGES}";
                field.IsTop = true;
                field.SetPageNumberOnFirstPage = true;
                string strJSON = JsonConvert.SerializeObject(field);
                //build URI
                string strURI = Product.BaseProductUri + "/words/" + fileName + "/insertPageNumbers";
                strURI += "?storage=" + amazonS3StorageName + "&folder=" + amazonS3BucketName;
                //sign URI
                string signedURI = Sign(strURI);
                //get response stream
                Stream responseStream = ProcessCommand(signedURI, "POST", strJSON, "json");
                //build URI
                strURI = Product.BaseProductUri + "/words/" + fileName;
                strURI += "?format=" + saveFormat + "&storage=" + amazonS3StorageName + "&folder=" + amazonS3BucketName; ;
                //sign URI
                signedURI = Sign(strURI);
                //get response stream
                responseStream = ProcessCommand(signedURI, "GET");
                using (Stream fileStream = System.IO.File.OpenWrite(outputFile))
                {
                    CopyStream(responseStream, fileStream);
                }
                responseStream.Close();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            } 
   public static string Sign(string url)
    {
        try
        {
            UriBuilder builder = new UriBuilder(url);
            if (builder.Query != null && builder.Query.Length > 1)
                builder.Query = builder.Query.Substring(1) + "&appSID=" + SaasposeApp.AppSID;
            else
                builder.Query = "appSID=" + SaasposeApp.AppSID;
                builder.Path = builder.Path.TrimEnd('/');
            byte[] privateKey = System.Text.Encoding.UTF8.GetBytes(SaasposeApp.AppKey);
            System.Security.Cryptography.HMACSHA1 algorithm = new System.Security.Cryptography.HMACSHA1(privateKey);
            byte[] sequence = System.Text.ASCIIEncoding.ASCII.GetBytes(builder.Uri.AbsoluteUri);
            byte[] hash = algorithm.ComputeHash(sequence);
            string signature = Convert.ToBase64String(hash);
            signature = signature.TrimEnd('=');
            signature = System.Web.HttpUtility.UrlEncode(signature);
            signature = System.Text.RegularExpressions.Regex.Replace(signature, "%[0-9a-f]{2}", e => e.Value.ToUpper());
     return string.Format("{0}&signature={1}", builder.Uri.AbsoluteUri, signature);
        }
        catch (Exception ex)
        {
            throw new Exception(ex.Message);
        }
    }
    public static Stream ProcessCommand(string strURI, string strHttpCommand)
    {
        try
        {
            Uri address = new Uri(strURI);
            System.Net.HttpWebRequest request = (System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create(address);
            request.Method = strHttpCommand;
            request.ContentType = "application/json";
            request.ContentLength = 0;
            System.Net.HttpWebResponse response = (System.Net.HttpWebResponse)request.GetResponse();
            return response.GetResponseStream();
        }
        catch (System.Net.WebException webex)
        {
            throw new Exception(webex.Message);
        }
        catch (Exception Ex)
        {
            throw new Exception(Ex.Message);
        }
    }
   public static Stream ProcessCommand(string strURI, string strHttpCommand, string strContent, string ContentType = "xml")
    {
        try
        {
            byte[] arr = System.Text.Encoding.UTF8.GetBytes(strContent);
            Uri address = new Uri(strURI);
            System.Net.HttpWebRequest request = (System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create(address);
            request.Method = strHttpCommand;
            if (ContentType.ToLower() == "xml")
                request.ContentType = "application/xml";
            else
                request.ContentType = "application/json";
            request.ContentLength = arr.Length;
            Stream dataStream = request.GetRequestStream();
            dataStream.Write(arr, 0, arr.Length);
            dataStream.Close();
            System.Net.HttpWebResponse response = (System.Net.HttpWebResponse)request.GetResponse();
            return response.GetResponseStream();
        }
        catch (System.Net.WebException webex)
        {
            throw new Exception(webex.Message);
        }
        catch (Exception Ex)
        {
            throw new Exception(Ex.Message);
        }
    }
    public static void CopyStream(Stream input, Stream output)
    {
        try
        {
            byte[] buffer = new byte[8 * 1024];
            int len;
            while ((len = input.Read(buffer, 0, buffer.Length)) > 0)
            {
                output.Write(buffer, 0, len);
            }
        }
        catch (Exception ex)
        {
            throw new Exception(ex.Message);
        }
    }
}
public class Product
{
   public static string BaseProductUri { get; set; }
}
public class SaasposeApp
{
    public static string AppSID { get; set; }
    public static string AppKey { get; set; }
}
public class Field
{
    public string Format { get; set; }
    public string Alignment { get; set; }
    public bool IsTop { get; set; }
    public bool SetPageNumberOnFirstPage { get; set; }
}
Overview: Saaspose.Words
Saaspose.Words is a platform independent REST API used for cloud based document creation, manipulation & conversion. It allows converting document to DOC, DOCX, XPS, TIFF, PDF, HTML, SWF & many other formats. It can be used languages like .NET, Java, PHP, Ruby, Rails, Python, jQuery & many others. It can also be integrated with other cloud services to process documents. Other features include Create & modify watermark, content & formatting manipulation, mail merge abilities, reporting features.
More about Saaspose.Words
Contact Information
Aspose Pty Ltd, Suite 163,
79 Longueville Road
Lane Cove, NSW, 2066
Australia
Saaspose - Your File Format Experts 2.0
sales@aspose.com
Phone: 1.214.329.1520
Fax: 866.810.9465

Thursday, January 3, 2013

Sort Worksheet Data in Ascending or Descending Order Using REST APIs

What’s new in this release?
The latest version of Saaspose.Cells includes a demanding feature for sorting worksheet data using Saaspose.Cells REST API. Using Saaspose.Cells, you can sort worksheet data in the cloud. This REST API allows you to sort the data of single or multiple columns in a single worksheet. You can choose to sort worksheet data in ascending or descending order as per your requirements. Saaspose.Cells makes data sorting a simple and hassle-free task and performs the function in a well-organized manner. It supports to ascend column data or descend column data of a worksheet in no time. This feature can be used in your application using any language of your choice and across any platform. You can utilize our SDK and REST examples to sort worksheet data in the cloud. It requires a simple step, download the required SDK from Github.com and incorporate the useful features into your application or more details, please refer to Saaspose.Cells documentation. Saaspose.Cells is a platform independent API and you can integrate it with other file format APIs to use a variety of features for your applications in the cloud. We offer a free development account for evaluation of the document properties features. You can sign up at Saaspose and get started with the feature rich APIs in no time. Feel free to write to us in case of any queries or feedback regarding Saaspose APIs.
Newly added documentation pages and articles
Some new tips and articles have now been added into Saaspose documentation that may guide you briefly how to use Saaspose APIs on Amazon S3 Storage for performing different tasks like the followings.
Overview: Saaspose.Cells
Saaspose.Cells is a REST based API for processing spreadsheets in the cloud. It allows creating, manipulating and converting spreadsheets in your web, desktop, mobile and cloud applications. It supports rows, columns, cells, text, data, images, hyperlinks, comments, formulas & many other aspects of spreadsheet. It can be used with any language to incorporate the spreadsheet processing features in any type of business application. It is a platform independent API & can be used with any language.
More about Saaspose.Cells
Contact Information
Aspose Pty Ltd, Suite 163,
79 Longueville Road
Lane Cove, NSW, 2066
Australia
Saaspose - Your File Format Experts 2.0
sales@aspose.com
Phone: 1.214.329.1520
Fax: 866.810.9465

Tuesday, January 1, 2013

January 2013 Edition of Saaspose.Newsletter is Out Now

Saaspose Newsletter for January 2013 has now been published that highlights all newly added information, exciting new features & informative blogs about Saaspose APIs & SDKs. This month Saaspose.Words, Saaspose.OCR & Saaspose.Cells have introduced new features for executing mail merge in documents, extracting text from remote image URL, splitting PDF files, encrypt & decrypt workbooks, split excel documents & manage annotations,  Google cloud storage Integration with Saaspose APIs & many more.
Tip of the Month: Integrate Google Cloud Storage with Saaspose APIs
Your valuable feedback has always played a vital role in helping us improve our services. We have moved a step forward and are pleased to announce the integration of Google Cloud storage with Saaspose file format APIs. We have previously provided support for several storage options such as Windows Azure,Google Drive, Amazon S3 and Dropbox storage. Now you can integrate your Google Cloud account with Saaspose cloud APIs and get involved in a whole new experience of document manipulation. For quick and easy access to your data around the world, you just need to follow few simple steps of configuration and get started with document processing tasks in the cloud. Upload your documents on Google Cloud storage and enjoy a variety of document manipulation features for different file formats. Keep tuned in to our blog, and documentation. Click here to view more about Google cloud storage integration.
Best of Saaspose API Blogs
Stay tuned with the recent updates, features and announcements of Saaspose APIs through Saaspose Blog.
Latest From the Documentation
During the month of December 2012, we have added many examples for various features of Saaspose file format APIs in our documentation. These examples have been added in Saaspose.Words, Saapose.Cells and Saaspose.Pdf and Saaspose.Slides. You can utilize these examples in PHP and .NET to incorporate features in your applications such as execute mail merge, split MS Word documents, encrypt a workbook, merge multiple presentations, convert local PDF file to HTML etc. You may view a complete list of examples for each API in the following announcement posts
Saaspose API SDK Updates
  During the month of December 2012, we have introduced new features in our SDKs for different programming languages like .NET, Ruby, Java and Python. There is a list of features available for each API on Github and you can download the required SDK. The new features are added in most of our APIs such as Saaspose.Words, Saaspose.Cells, Saaspose.Pdf etc. These features include convert workbooks, PDF files, MS Word documents to other file formats, encrypt workbook, extract text from local file, etc. For more details, you may refer to the announcement about Saaspose REST API Features Implemented in SDKs During the Month of December 2012.
Collect your copy of Saaspose Newsletter, August 2012 edition
Keep in Touch
There are several ways for you to keep in touch with us. The monthly newsletter is a way for us to keep in touch with you, but we are always interested in hearing from you.
- Ask question from Saaspose Development Team
- Connect with us on Post a question on our Facebook
Contact Information
Aspose Pty Ltd, Suite 163,
79 Longueville Road
Lane Cove, NSW, 2066
Australia
Saaspose - Your File Format Experts 2.0
sales@aspose.com
Phone: 1.214.329.1520
Fax: 866.810.9465