Monday, June 30, 2014

Convert Specific Pages of PDF File to JPG Image in PHP Using Aspose for Cloud

This tutorial demonstrates how to use Aspose for Cloud to convert specified page of a PDF document to JPG image using PHP. 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.  To run the application please edits index.php to fill the correct values of appSID and appKey. Signup at http://cloud.aspose.com for free to get these. Upload the files to a web server and it is ready to use. The server should support PHP, JSON and cURL.
Here is the code for converting specified page of a PDF document to JPG image
<?php
// Include the SDK files that we need here
require_once(dirname(__FILE__)."/Aspose_Cloud_SDK_For_PHP/src/Aspose/Cloud/Common/AsposeApp.php");
require_once(dirname(__FILE__)."/Aspose_Cloud_SDK_For_PHP/src/Aspose/Cloud/Common/Product.php");
require_once(dirname(__FILE__)."/Aspose_Cloud_SDK_For_PHP/src/Aspose/Cloud/Common/Utils.php");
require_once(dirname(__FILE__)."/Aspose_Cloud_SDK_For_PHP/src/Aspose/Cloud/Exception/AsposeCloudException.php");
require_once(dirname(__FILE__)."/Aspose_Cloud_SDK_For_PHP/src/Aspose/Cloud/Storage/Folder.php");
require_once(dirname(__FILE__)."/Aspose_Cloud_SDK_For_PHP/src/Aspose/Cloud/Pdf/Converter.php");
//The appSID and appKey are used for authentication
Aspose\Cloud\Common\AsposeApp::$appSID = "...";
Aspose\Cloud\Common\AsposeApp::$appKey = "...";
// The output location is the directory where we hold the converted images
// It should be have writable permissions. There should be a / at the end of this.
Aspose\Cloud\Common\AsposeApp::$outPutLocation = getcwd() . "/Output/";

$input = "Sample.pdf";
$format = "jpeg";
$page = 1;
// We shall use the Folder and Converter component of SDK
$folder = new Aspose\Cloud\Storage\Folder();
$converter = new Aspose\Cloud\Pdf\Converter($input);
try {
  // Upload the $input file to Aspose Cloud Storage
  $folder->UploadFile($input, "");
  // Convert $page into specified $format and save the result in $output file
  $output = $converter->ConvertToImage($page, $format);
  // Tell the web browser that the PHP script is about to send a JPG image
  header("image/jpeg");
  // Send the contents our $output file to the browser
  echo file_get_contents($output);
  // Delete the generated $output file. We don't need it anymore
  unlink($output);
  // Delete the uploaded PDF too. We are all done with it.
  // It is a good practice to keep the uploaded document until all operation
  // are complete and the file is no more needed. Uploading the file
  // again on each request will waste time :-)
  $folder->DeleteFile($input);
} catch (Exception $x) {
  // Ooops! let the user know what happened
  echo $x->getMessage();
}
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.

Wednesday, June 25, 2014

Create & Convert MS Project Files to Other Formats in PHP Application

What's New in this Release?
Aspose development team is pleased to announce the release of Aspose.Tasks as part of the Aspose Cloud SDK for PHP. Aspose Cloud SDK for PHP has been around for quite a while and now we’ve added features for working with Microsoft Project files. PHP developers can convert project files to other formats. Also, developers can work with project properties, tasks, task links, assignment, calendars, outline codes and extended attributes. Below are some important examples shows how to use Aspose.Tasks in PHP applications.
Start a free trial today – all you need is to sign up with Aspose for Cloud service. Once you have signed up, you are ready to try powerful file processing features offered by Aspose for Cloud.
Introduction: Aspose.Tasks for Cloud
aspose Tasks for CloudAPIs 1002 Use Aspose.Tasks to Process Microsoft Project® Files in PHP ApplicationsAspose.Tasks for Cloud is a project management API that enables developers to provide Microsoft Project® document manipulation capability in their applications – all without using Microsoft Project®. With this powerful cloud API, developers can control various stages of project management. API provides full control over a project’s tasks, task links, resources, resource assignments and extended attribute data. Tasks and resources can be added to a project and resources can be assigned to or remove from tasks. Aspose.Tasks supports rendering tasks, resources and resource assignment data to various output formats such as JPG, PNG, PDF, XML, XAML, HTML, BMP, XPS, TIFF and SVG.
Overview: Aspose for Cloud
Aspose for Cloud is a cloud-based document generation, conversion and automation platform for developers. Before Aspose for Cloud APIs document processing and manipulation tasks were not so easy. Aspose for Cloud APIs give developers full control over documents and file formats. Each API has been developed to offer you a wide range of features for file processing in cloud. Aspose for Cloud REST APIs are platform independent and can be utilized across any platform such as Node.js, Amazon, Salesforce etc. without any installation. Being language independent makes it a suitable choice for the developers having expertise in any programming language. We also provide SDKs in different programming languages such as .NET, Java, PHP, Ruby, Node.js and Now in ZF 2.0.
More about Aspose for Cloud & Laravel
Contact Information
Aspose Pty Ltd, Suite 163,
79 Longueville Road
Lane Cove, NSW, 2066
Australia
Aspose - Your File Format Experts 2.0
sales@aspose.com
Phone: 888.277.6734
Fax: 866.810.9465

Tuesday, June 17, 2014

Protect, Unprotect, Modify Protection of Word Documents in Cloud Using PHP

Microsoft Word password protection is a security feature used to protect documents with a user provided password. Most people use Microsoft Word but sometimes you don’t want everyone to be able to read or modify your documents. There are two options for securing your Word files: either set a password to open the document, or set a password to stop anyone from modifying the document. When a document is protected, the user can make only limited changes, such as adding annotations, making revisions, or completing a form. Even if a document is protected with a password, Aspose.Words does not require the password to open, modify or remove protection from the document. When you use Aspose.Words to protect a document, you have the option of keeping the existing password or specifying a new password. If you need to make sure the document is really protected from changes, consider digitally signing the document. Aspose.Words supports detecting digital signatures for DOC, OOXML and ODT documents. Start a free trial today – all you need is to sign up with Aspose for Cloud service. Once you have signed up, you are ready to try powerful file processing features offered by Aspose for Cloud.
Below are some examples shows how to use protection feature in PHP applications

Protect a Word Document

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

/**** Section 1 ****/
Product::$baseProductUri = 'http://api.aspose.com/v1.1';
AsposeApp::$appSID = "xxxxxxxxxxxxxxxxxxxxxxxx";
AsposeApp::$appKey = "xxxxxxxxxxxxxxxxxxxxxxxx";
AsposeApp::$outPutLocation = getcwd() . "/output/";
/**** End Section 1 ****/

/**** Section 2 ****/
$fileName = "Test.docx";
$password = "123456";
$protectionType = "AllowOnlyComments";

$doc = new Document($fileName);
$result = $doc->protectDocument($password, $protectionType);
/**** End Section 2 ****/


Unprotect a Word Document

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

/**** Section 1 ****/
Product::$baseProductUri = 'http://api.aspose.com/v1.1';
AsposeApp::$appSID = "xxxxxxxxxxxxxxxxxxxxxxxx";
AsposeApp::$appKey = "xxxxxxxxxxxxxxxxxxxxxxxx";
AsposeApp::$outPutLocation = getcwd() . "/output/";
/**** End Section 1 ****/

/**** Section 2 ****/
$fileName = "Test.docx";
$password = "123456";
$protectionType = "NoProtection";

$doc = new Document($fileName);
$result = $doc->unprotectDocument($password, $protectionType);
/**** End Section 2 ****/


Modify Protection of the Word Document 

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

/**** Section 1 ****/
Product::$baseProductUri = 'http://api.aspose.com/v1.1';
AsposeApp::$appSID = "xxxxxxxxxxxxxxxxxxxxxxxx";
AsposeApp::$appKey = "xxxxxxxxxxxxxxxxxxxxxxxx";
AsposeApp::$outPutLocation = getcwd() . "/output/";
/**** End Section 1 ****/

/**** Section 2 ****/
$fileName = "Test.docx";
$oldPassword = "123456";
$newPassword = "123456789";
$protectionType = "AllowOnlyFormFields";

$doc = new Document($fileName);
$result = $doc->updateProtection($oldPassword, $newPassword, $protectionType);
/**** End Section 2 ****/


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.

Wednesday, June 11, 2014

Process Emails, Spreadsheets, PDFs & Barcodes in Cloud Using Aspose for Salesforce

What's New in this Release?
Aspose for Salesforce allows APEX and Force.com developers to work with Apose’s REST API. Integrating Aspose for Salesforce into your Salesforce app is simple and effective. It’s a cloud solution, so you don’t have to install anything, and it integrates with other cloud services too. Aspose for Salesforce provides you the ability to use all the document processing features right inside the Salesforce platform painlessly. Document processing wasn’t that easy before Aspose for Cloud. As we’ve already 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. The project has been hosted on Github. Now we’ve included more example to this project specially Aspose.Email. 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.
Start a free trial today – all you need is to sign up with Aspose for Cloud service. Once you have signed up, you are ready to try powerful file processing features offered by Aspose for Cloud.
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, June 4, 2014

Convert Word, Spreadsheet & Presentation Files in Laravel using Aspose Cloud SDK

What's New in this Release?

Aspose development team is pleased to announce that Aspose Cloud SDK for PHP can be used inside Laravel. Aspose Cloud SDK for PHP can be downloaded using “Composer” from any of the provided places in the links section. Once you have installed the Aspose Cloud SDK for PHP in Laravel, you can use the powerful conversion features offered by Aspose for Cloud such as convert Microsoft and OpenOffice SpreadSheets documents, MS Word and OpenOffice Word documents as well as Microsoft PowerPoint and OpenOffice presentations documents to PDF and working with emails in Laravel.  Please read the articles below to learn how to use conversion features:
Introduction to Laravel
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as authentication, routing, sessions, and caching. Read more about Laravel.
Overview: Aspose for Cloud
Aspose for Cloud is a cloud-based document generation, conversion and automation platform for developers. Before Aspose for Cloud APIs document processing and manipulation tasks were not so easy. Aspose for Cloud APIs give developers full control over documents and file formats. Each API has been developed to offer you a wide range of features for file processing in cloud. Aspose for Cloud REST APIs are platform independent and can be utilized across any platform such as Node.js, Amazon, Salesforce etc. without any installation. Being language independent makes it a suitable choice for the developers having expertise in any programming language. We also provide SDKs in different programming languages such as .NET, Java, PHP, Ruby, Node.js and Now in ZF 2.0.