Thursday, February 28, 2013

Export Selected Link on a Page in PDF File in .NET Applications

This technical tip allows developers to get selected link on a page in PDF file using Saaspose.Pdf REST API in your .NET applications. Saaspose.Pdf is a REST API to create, edit & manipulate PDF files. It also convert PDF file to DOC, DOCX, HTML, XPS, TIFF etc. It is platform independent REST API & working with web, desktop, mobile or cloud applications alike. Some important steps for performing this task are to build URI to get selected link on a page, Parse the json string to JObject, Deserializes the JSON to an object and the classes used in this process are given in detail.

Sample Code for Get Selected Link on a Page in PDF File

[C# Code]

//build URI to get selected link on a page
            string strURI = "http://api.saaspose.com/v1.0/pdf/input.pdf/pages/1/links/1";
            string signedURI = Sign(strURI);
            Stream responseStream = ProcessCommand(signedURI, "GET");
            StreamReader reader = new StreamReader(responseStream);
            string strJSON = reader.ReadToEnd();
            //Parse the json string to JObject
            JObject parsedJSON = JObject.Parse(strJSON);
            //Deserializes the JSON to a object. 
            PdfLinkResponse pdfLinkResponse = JsonConvert.DeserializeObject<PdfLinkResponse>(parsedJSON.ToString());
            Link tempLink = pdfLinkResponse.Link;
                   //Here is the BaseResponse class
                   public class BaseResponse
                   {
                       public BaseResponse() { }
                       public string Code { get; set; }
                       public string Status { get; set; }
                   }
                   //Here is the PdfLinkResponse class
                   public class PdfLinkResponse : BaseResponse
                   {
                       public PdfLinkResponse() { }
                       public Link Link { get; set; }
                   }
                   //Here is the LinkResponse class
                   public class LinkResponse
                   {
                       public string Href { get; set; }
                       public string Rel { get; set; }
                       public string Title { get; set; }
                       public string Type { get; set; }
                   }
                   //Here is the Link class
                   public class Link
                   {
                       public Link() { }
                       public LinkActionType ActionType { get; set; }
                       public string Action { get; set; }
                       public LinkHighlightingMode Highlighting { get; set; }
                       public Color Color { get; set; }
                   }
                   //Here is the LinkActionType enum
                   public enum  LinkActionType
                   {
                       GoToAction,
                       GoToURIAction,
                       JavascriptAction,
                       LaunchAction,
                       NamedAction,
                       SubmitFormAction
                   }
                   //Here is the LinkHighlightingMode enum
                   public enum LinkHighlightingMode
                   {
                       None,
                       Invert,
                       Outline,
                       Push,
                       Toggle
                   }
                   //Here is the Color class
                   public class Color
                   {
                       public Color() { }
                       public List<LinkResponse> Links { get; set; }
                       public int A { get; set; }
                       public int B { get; set; }
                       public int G { get; set; }
                       public int R { get; set; }
                   }

[VB.NET Code]

'build URI to get selected link on a page
                    Dim strURI As String = "http://api.saaspose.com/v1.0/pdf/input.pdf/pages/1/links/1"
                    Dim signedURI As String = Sign(strURI)
                    Dim responseStream As Stream = ProcessCommand(signedURI, "GET")
                    Dim reader As New StreamReader(responseStream)
                    Dim strJSON As String = reader.ReadToEnd()
                    'Parse the json string to JObject
                    Dim parsedJSON As JObject = JObject.Parse(strJSON)
                    'Deserializes the JSON to a object.
                    Dim pdfLinkResponse As PdfLinkResponse = JsonConvert.DeserializeObject(Of PdfLinkResponse)(parsedJSON.ToString())
           Dim tempLink As Link = pdfLinkResponse.Link
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

Wednesday, February 27, 2013

Convert PDF to Image, Merge Presentation, Extract Docs Text in Android Apps

What’s new in this release?
Saaspose development previously shared about the release of Saaspose SDK for Android that facilitates the Android developers with feature-rich APIs round the globe. Let it be text extraction from images, merging multiple presentations or conversion of different file formats, Saaspose APIs provides a wide range of useful and productive features that yield quality results. You can download our SDKs in different programming languages such as .NET, Java, PHP and Ruby from Github. Saaspose has published a demo application for Android SDK. The sample project allows you to test Saaspose SDK in your Android applications quickly and easily. You can integrate this demo application in your applications and enjoy a whole new experience of document manipulation on your Android devices. This demo is composed of the features commonly used by other sections of the SDK and the features to work with Saaspose storage. This adds great benefit for the Android developers as our SDKs enable them achieve the desired results through simple and efficient steps in no time. The sample project contains feature examples for REST APIs like Saaspose.Barcode, Saaspose.Words, Saaspose.Cells, Saaspose.Pdf and Saaspose.Slides. For instance, 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. In order to manipulate any files, you first need to upload them to the Saaspose storage using storage manipulation code. The Saaspose.SDK for Android allows you to save the output files at your specified location. Please refer to our comprehensive documentation of these file format APIs for more information and details on the features and SDKs. If you are not a part of Saaspose family, sign up now and integrate the feature-rich APIs in your Android applications. You can opt for the free development account to evaluate these APIs for your Android applications. Stay tuned to our blog and newsletterfor latest updates on Android SDKs and the release 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
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, February 21, 2013

Find & Replace Text in Word Document Using REST API in .NET Apps

This technical tip allows developers to replace text in Word document using Saaspose.Words REST API in your .NET applications.  Some important steps for performing this task are to build URI to replace text, serialize the JSON request content, set old string to replace, set new string to replace, Parse the json string to JObject, sign URI, get response stream and the ReplaceText class is also given in detail.
Sample Code for replacing text in Word document
//build URI to replace text
string strURI = "http://api.saaspose.com/v1.0/words/input.docx/replaceText";
string signedURI = Sign(strURI);
//serialize the JSON request content
ReplaceText replacetext = new ReplaceText();
// set old string to replace
replacetext.OldValue = OldValue;
// set new string to replace
replacetext.NewValue = NewValue;
// True indicates case-sensitive comparison, false indicates case-insensitive comparision.
replacetext.IsMatchCase = IsMatchCase;
// True indicates the oldValue must be a standalone word.
replacetext.IsMatchWholeWord = IsMatchWholeWord;
string strJSON = JsonConvert.SerializeObject(replacetext);
Stream responseStream = ProcessCommand(signedURI, "POST", strJSON);
StreamReader reader = new StreamReader(responseStream);
string strResponse = reader.ReadToEnd();
//Parse the json string to JObject
JObject pJSON = JObject.Parse(strResponse);
ReplaceTextResponse baseResponse = JsonConvert.DeserializeObject<ReplaceTextResponse>(pJSON.ToString());
//sign URI
signedURI = Sign(baseResponse.DocumentLink.Href + "?format=doc");
//get response stream
responseStream = ProcessCommand(signedURI, "GET");
using (Stream fileStream = System.IO.File.OpenWrite(outputPath))
{
 CopyStream(responseStream, fileStream);
}
responseStream.Close();
//Here is the ReplaceText class
public class ReplaceText
{             
 public string OldValue { get; set; }
 public string NewValue { get; set; }
 public bool IsMatchCase { get; set; }
 public bool IsMatchWholeWord { 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

Tuesday, February 19, 2013

Extract Text from Whole or Specific Block of Images in Doc PDF or TIFF

What’s new in this release?
Saaspose.OCR is a REST API for optical character recognition and document scanning. Saaspose.OCR API also supports character recognition for multiple languages such as English, French and Spanish. The accuracy, high speed and ease of use make Saaspose.OCR the perfect choice for text extraction from images in cloud. Previously, we have provided SDK and REST examples for text extraction from images in different programming languages such as .NET, RUBY and Java. We have recently added examples in PHP that you can utilize in your applications and enjoy the effective text extraction feature. Saaspose.OCR supports text extraction from whole images and a specific block of an image as well. There are two approaches to extract the text from images such as documents, PDFs, or TIFF images. The first method involves the process of file uploading on Saaspose storage using Saaspose.OCR REST API. Once the file is uploaded on the storage, you can extract the text from image using Saaspose.OCR examples in PHP. The second method is that you can directly extract image text from files on your local system using Saaspose.OCR REST API and SDKs without saving the file to Saaspose storage. Using the file path or stream, you can extract text from images or you may choose to extract text from a specific block of an image. The file is sent through request stream to Saaspose servers, processed and the output is sent back as response stream and the file is not saved on Saaspose storage. It is a single call process that uploads the file to server, extracts the text from image, sends image text back as response stream and deletes the source file from the server. For more information, please refer to Saaspose.OCR documentation. Saapose.OCR supports optical character recognition for whole image, partial image or a specific rectangular area of an image file. This feature-rich API not only allows you to manipulate your image files for text extraction but you can also combine multiple REST APIs to enhance your application. Get started with Saaspose.OCR API now enjoy a whole new experience of optical character recognition and document scanning in the cloud. You can opt for free development account that enables you to evaluate all of our APIs. Stay tuned to our blog and newsletter for latest updates on Saaspose APIs.
Overview: Saaspose.OCR
Saaspose.OCR is a platform independent REST API used for optical character recognition and document scanning. It allows developers to scan documents, extract text and recognize characters from the documents in the cloud. It supports OCR feature for whole image, partial image or a specific rectangular area of an image file. It can be used with languages like .NET, Java, PHP, Ruby, Rails, Python, jQuery & many others. It can also be integrated with other cloud services to process documents.
More about Saaspose.OCR
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, February 17, 2013

Protect Layout Content & Structure of Word Docs from Unauthorized Access

What’s new in this release?
Saaspose development team is happy to announce the new release of Saaspose.Words. This new release offers securing your MS Word documents from unauthorized access to modify the structure. Users can protect their document to prevent others from making changes to the layout, content and structure of the documents. Saaspose.Words allow you to assign a password to your document to make sure that only authorized access is permitted to edit the structure and layout such as set document property, append a list of documents etc. Similarly, you can also unprotect the document to allow the access for making any changes to the document. Once you unprotect your MS Word documents by providing the existing password, the content and layout can be modified by anyone. Saaspose.Words REST API offers to update the document protection. You can modify the existing password and choose a secure password for better protection for your documents. Saaspose.Words has gained immense popularity among a large number of people around the world. Saaspose.Words allows creating, editing and manipulating documents including MS Word documents in the cloud. You can extract text, convert documents to other file formats and work with a variety of document elements such as text, paragraph, formatting, form field, document sections, shapes, tables, bookmarks, hyperlinks etc. across any platform. You can refer to our comprehensive documentation that guides you through the complete features and examples of Saaspose.Words. All you need to do is download the required SDK of Saaspose.Words and enhance the productivity of your applications in the cloud. You can protect and unprotect MS Word documents easily using the feature rich Saaspose.Words REST API. The following is list of Saaspose.Words REST examples in PHP that can be used for protect and unprotect requirements of your documents. Sign up at Saaspose and get started with the feature rich and productive APIs in no time. We offer a free development account for evaluation purposes, so you could try these features using PHP examples to manipulate your documents. Feel free to contact us case of any queries or feedback regarding Saaspose APIs.
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, February 14, 2013

Convert Presentations to MS Word, Add Watermark & Perform Mail Merge

Saaspose development team is very happy to announce the conversion of presentations to MS Word documents with ease. You can then manipulate the converted document with a wide range of features. Saaspose.Slides allows you to process presentations; create, modify, and convert presentations. Saaspose.Words is a REST based API that allows you to create, edit and manipulate documents in the cloud. Saaspose file format APIs have been designed with a variety of features to manipulate documents in the cloud across any platform. We have provided SDK and REST examples for these REST APIs in different programming languages such as .NET, RUBY,Java, PHP and Python that you can utilize in your application. Saaspose.Slides enables you to convert presentations to the supported file formats using convert controller resource.You can directly convert the presentations on your local system using Saaspose.Slides REST API and SDKs without saving the file to Saaspose Storage. Saaspose.Slides allows you to upload the desired file to Saaspose Storage using Saaspose REST API. Then you can convert the uploaded file to MS Word format using Saaspose.Slides REST examples. Once you have converted the slides to MS Word document, you can then manipulate it with a variety of features using Saaspose.Words. You can convert drawing object to image, or you may choose to extract ole data from a drawing object. You can also add watermark image or watermark text to a Word document. Using Saaspose.Words REST API,you can choose to specify a region within your document and perform mail merge operation for that specific region or you can also execute mail merge without regions. We have SDK and REST examples for different programming languages that you can utilize to convert presentations and manipulate MS Word documents. Please refer to Saaspose.Slides and Saaspose.Words documentation for more details. . Get started with Saaspose APIs right away and enjoy a whole new experience of document manipulations. You can opt for free development account to evaluate these APIs for your application. Stay tuned to our blog and newsletter for the latest news and updates.
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.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, February 12, 2013

Convert PDF File to Presentation with Original Data & Formatting Info

Saaspose file format APIs have been designed with a variety of features to manipulate documents in the cloud across any platform. Due to its highly productive and easy to use APIs, Saaspose has gained immense popularity across the globe in such a small span of time. We have provided SDK and REST examples for these REST APIs in different programming languages such as .NETRUBYJava, PHP and Python that you can utilize in your application. PDF files are widely used among a large number of people from different walks of life. There might be scenarios where you want to present the data of your PDF files as slides. This brings in the need to convert PDF files to presentations without making extra efforts. In such scenarios, Saaspose.Pdf and SaasposeSlides make the perfect combination of APIs for your application.Saaspose.Pdf is a REST based API for creating, editing, and manipulating PDF files 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 PDF files and manipulate the presentations. Saaspose.Pdf provides support for conversion of PDF files to different file formats. Using Saaspose.Pdf REST examples and SDKs, you can convert PDF files to presentations in no time.Saaspose.Pdf offers best solution for document conversion and eliminates the need of manual work involved in conversions. The formatting information and data is retained in the converted document, for instance, presentations. Once you have converted the PDF file for presentation, you can use a variety of features to manipulate the presentation. Using Saaspose.Slides REST API, you can save a particular slide as an image or you may choose to add one or more new custom properties to the slides. As the data of source file i.e. PDF file is retained in the slides, you can add more slides, delete any slide and merge the presentation with other presentations. For more information, please refer to Saaspose.Pdf and Saaspose.Slides documentation. Get started with Saaspose APIs right away and enjoy a whole new experience of document manipulations. You can opt for free development account to evaluate these APIs for your application. Stay tuned to our blog and newsletter for the latest news and updates.
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 Products
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, February 10, 2013

Split Excel Doc & Save Each Worksheet as PDF, Image at Amazon S3 Storage

This technical tip allows developers to split all or specific pages of an Excel document and save each worksheet as PDF, Image or any supported format using Saaspose.Cells REST API in your PHP applications. Input Excel documents need to be uploaded at Amazon S3 Storage before running this code. You need to configure Amazon S3 Storage with Saaspose before using this example. Some important steps for performing this task are to build URI to split sheets, sign URI, iterate through each document in the result to find output sheets, build URI to download split sheets And save split PDF pages.
Sample Code for Splitting Excel Documents at Amazon S3 Storage
SaasposeApp::$AppSID  = "77***********************************";
SaasposeApp::$AppKey = "9a*******************************";
SaasposeApp::$OutPutLocation = getcwd() . "\\Output\\";
$AmazonS3StorageName = "AmazonS3Storage";
$AmazonS3BucketName = "Saaspose";
$AmazonS3Folder = $AmazonS3BucketName . "/Folder1"; // use $AmazonS3Folder = $AmazonS3BucketName for root folder
//build URI to split sheets
$strURI = 'http://api.saaspose.com/v1.0/cells/Sample1.xlsx/split?format=png&storage=' . $AmazonS3StorageName . '&folder=' . $AmazonS3Folder;
//sign URI
$signedURI = Utils::Sign($strURI);
$responseStream = Utils::processCommand($signedURI, "POST", "", "");
$json = json_decode($responseStream);
//iterate throug each document in the result to find output sheets
foreach ($json->Result->Documents as $splitSheet) {
        $splitFileName = $splitSheet->link->Href;
       
        //build URI to download split sheets
        $strURI = 'http://api.saaspose.com/v1.0/storage/file/'. $AmazonS3Folder . '/' . $splitFileName . '?storage=' . $AmazonS3StorageName;
       
        //sign URI
        $signedURI = Utils::Sign($strURI);
        $responseStream = Utils::processCommand($signedURI, "GET", "", "");
        //save split PDF pages
        $outputFile = SaasposeApp::$OutPutLocation . $splitFileName;
        Utils::saveFile($responseStream, $outputFile);
}
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, February 5, 2013

Split Specific or All Pages of PDF File & Save Each Page as a New PDF

This technical tip allows developers to split all or specific pages of a PDF file and save each page as a new PDF or any supported format using Saaspose.Pdf REST API in your .NET applications. Input PDF file needs to be uploaded in root folder of Saaspose Storage before running this code. Saaspose.Pdf is a REST API to create, edit & manipulate PDF files. It also convert PDF file to DOC, DOCX, HTML, XPS, TIFF etc. It is platform independent REST API & working with web, desktop, mobile or cloud applications alike. Some important steps for performing this task are to build URI to split PDF pages, sign URI, further process JSON response, Parse the json string to JObject, build URI to download split pages and save split PDF pages as PDF.

Sample Code for Splitting all pages to new PDFs

SaasposeApp.AppSID  = "77***********************************";
SaasposeApp.AppKey = "9a*******************************";
string outputPath = "C:\\TempFiles\\";
//build URI to split PDF pages
string strURI = "http://api.saaspose.com/v1.0/pdf/4pages.pdf/split";
//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);
SplitPDFResponse responseStream = JsonConvert.DeserializeObject<SplitPDFResponse>(parsedJSON.ToString());
foreach (LinkResponse splitPage in responseStream.Result.Documents)
{
    string splitFileName = System.IO.Path.GetFileName(splitPage.Href);
    //build URI to download split pages
    strURI = "http://api.saaspose.com/v1.0/storage/file/" + splitFileName;
    //sign URI
    signedURI = Utils.Sign(strURI);
    //save split PDF pages as PDF
    using (Stream fileStream = System.IO.File.OpenWrite(outputPath + splitFileName))
    {
        Utils.CopyStream(Utils.ProcessCommand(signedURI, "GET"), fileStream);
    }
}
// class definitions
public class SplitPDFResponse : Saaspose.Common.BaseResponse
{
    public SplitPdfResult Result { get; set; }
}
public class SplitPdfResult
{
    public LinkResponse[] Documents { get; set; }
}
Split specific pages to new PDFs
SaasposeApp.AppSID  = "77***********************************";
SaasposeApp.AppKey = "9a*******************************";
string outputPath = "C:\\TempFiles\\";
//build URI to split PDF pages
string strURI = "http://api.saaspose.com/v1.0/pdf/4pages.pdf/split?from=2&to=3";
//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);
SplitPDFResponse responseStream = JsonConvert.DeserializeObject<SplitPDFResponse>(parsedJSON.ToString());
foreach (LinkResponse splitPage in responseStream.Result.Documents) 
{
    string splitFileName = System.IO.Path.GetFileName(splitPage.Href);
    //build URI to download split pages 
    strURI = "http://api.saaspose.com/v1.0/storage/file/" + splitFileName;
    //sign URI
    signedURI = Utils.Sign(strURI);
    //save split PDF pages as PDF
    using (Stream fileStream = System.IO.File.OpenWrite(outputPath + splitFileName))
    {
        Utils.CopyStream(Utils.ProcessCommand(signedURI, "GET"), fileStream);
    }
}

Split PDF pages to any supported format

SaasposeApp.AppSID  = "77***********************************";
SaasposeApp.AppKey = "9a*******************************";
string outputPath = "C:\\TempFiles\\";
//build URI to split PDF pages
string strURI = "http://api.saaspose.com/v1.0/pdf/4pages.pdf/split?from=2&to=3&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);
SplitPDFResponse responseStream = JsonConvert.DeserializeObject<SplitPDFResponse>(parsedJSON.ToString());
foreach (LinkResponse splitPage in responseStream.Result.Documents) 
{
    string splitFileName = System.IO.Path.GetFileName(splitPage.Href);
    //build URI to download split pages 
    strURI = "http://api.saaspose.com/v1.0/storage/file/" + splitFileName;
    //sign URI
    signedURI = Utils.Sign(strURI);
    //save split PDF pages as PDF
    using (Stream fileStream = System.IO.File.OpenWrite(outputPath + splitFileName))
    {
        Utils.CopyStream(Utils.ProcessCommand(signedURI, "GET"), fileStream);
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

Sunday, February 3, 2013

February 2013 Edition of Saaspose.Newsletter is Out Now

Saaspose Newsletter for February 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.Pdf & Saaspose.Cells have introduced new features for converting documents to different file formats in Ruby, create MS Word doc & convert to image or PDF file, create PDF from HTML templates, create workbook & convert to HTML, sort worksheet data, extract Text from Images & many more.
Tip of the Month: Saaspose SDK is Available for Android
We apperciate your feedback and suggestions that help us improve our services for a better experience of document manipulation. We have recently released Saaspose SDK for Android to facilitate the Android developers around the world. Now you can enjoy a variety of features for document manipulation in the cloud. For instance, using Saaspose APIs, 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 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. Stay tuned to our blog, and newsletter for latest updates on Android SDKs and the release announcements. Click here to view more about Saaspose SDK is Android.
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 January 2013, 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, Saaspose.OCR and Saaspose.Pdf. You can utilize these examples in Python, Ruby and PHP to incorporate features in your applications such as protect documents, extract text from images. sort worksheet data, create PDFs from HTML templates 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 January 2013, we have introduced new features in our SDKs for different programming languages like Ruby and Python. There is a list of features available for each API on Github and you can download the required SDK. There are few improvements made in Saaspose.Cells and new features have been added in Saaspose.Pdf. For more details, you may refer to the following announcement about Saaspose REST API Features Implemented in SDKs During the Month of January 2013.
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