Tuesday, July 22, 2014

Export WordPress Posts & Pages to PDF using Aspose PDF Exporter Plugin

Aspose PDF Exporter exports posts into a PDF document. Currently this plugin works as a bulk action of posts, pages, or any custom post type. The Aspose PDF Exporter plugin for WordPress allows administrators to export post contents to PDF documents. This module demonstrates Aspose.Pdf for Cloud’s powerful export feature. It adds a simple bulk action in the Aspose Export to PDF list. As soon as the bulk action is called, it exports all posts to a PDF document.
Using Aspose PDF Exporter Plugin
After you have installed the Aspose PDF Exporter plugin it is really simple to start using it on your website. Please follow these simple steps to get started.
  • Make sure you are logged-in to a WordPress site as Admin level account.
  • Make sure you have set up Aspose App Key & Id on the plugin configuration page. For further details on how to get app keys, click here .
  • Navigate to the page or posts which you want to export into PDF.
  • Select “Posts/Pages” you want to export and then select Aspose Export to PDF from Bulk Actions.
  • Click Apply.
  • All selected posts and pages are exported to a PDF document file and will give you link for downloading the PDF file.
About Aspose
Aspose offers a powerful set of file management components with which developers can create applications which can open, edit, create and save some of the most popular business file formats. Supported formats include Word documents, Excel spreadsheets, PowerPoint presentations, PDF documents, and Microsoft Project files. Tools allow developers to perform OCR, work with images, create and read barcodes and perform many other document conversion and management tasks. Aspose produce components for .NET, Java and SharePoint, as well as rendering extensions for SQL Server Reporting Services and JasperReports exporters.
More about Aspose products


Wednesday, July 16, 2014

Word Docs Conversion to PDF HTML TIFF EPUB in Cloud & Updated Pricing Plans

What's New in this Release?
We are pleased to announce the release of Aspose for Cloud 1.1.6.9. Aspose for Cloud’s pricing plans have been changed since this release and you can go for any pricing plan according to your requirement if you are a new customer. With this new release, the create, read, manipulate and export features are greatly improved. You can convert Word documents to DOC, DOCX, DOCM, DOT, DOTX, DOTM, OOXML, HTML, HTMLFixed, WordML, MHTML, ODT, PDF, XPS, TIFF, EPUB, image and several other formats and set a number of conversion options to control the conversion. You can change DML shape effects and down-sample options when converting to PDF as well as render DropDown fields as text when converting to HTML. You can also add, update or delete chart title in Microsoft Excel worksheets. Several UI and API issues have also been fixed in this release. Below, is a list of enhancements by API. Some important features included in this new release are listed below
  • Save Word documents as other formats – This feature allows you to save Microsoft Word documents as DOC, DOCX, DOCM, DOT, DOTX, DOTM, OOXML, HTML, HTMLFixed, WordML, MHTML, ODT, PDF, XPS, TIFF, EPUB, image and several other formats. You can use the saveAs resource and send a POST request (specifying save options in the request body) to convert to any supported format.
  • Set chart title – This feature allows you to set a new chart title in a worksheet. The title resource can be used and a PUT request can be sent (specifying options for chart title) to set a new chart title.
  • Update chart title – This feature allows you to update chart title in a worksheet. The title resource can be used and a POST request can be sent (specifying options for chart title) to update an existing chart title.
  • Delete chart title – This feature allows you to delete an existing chart title from a worksheet. The title resource can be used and a DELETE request can be sent to delete a specific chart title.
The following improvements have been made to the Aspose for Cloud platform:
  • In API limit email, the start and end dates are the same.
  • Can’t scan a single barcode using a trail account.
  • Invalid XML characters are causing XML serialization exception.
  • Update Google Analytics tracking for cloud.aspose.com.
  • Implement pricing plans 2014.
  • You have processed ’0′ OCR recognitions. Your pricing plan allows only ’0′ recognitions.
  • Your pricing plan allows only ’0′ barcodes.
  • [Aspose.Pdf for Cloud document API] Create PDF from JPEG, TIFF and SVG does not work with third party storages.
The following issues have been fixed in the Aspose for Cloud UI:
  • Password reset issue.
  • Update payment plans.
Overview: Aspose for Cloud
Aspose for Cloud is a cloud-based document generation, conversion and automation platform for developers that offer a unique suite of APIs to work with Word documents, Excel spreadsheets, PowerPoint presentations, PDFs, and email formats and protocols. It supports all features for file processing, document scanning, barcodes creation and recognition, and allows extracting text or images too. You can also work with SaaSpose APIs using REST SDKs that can be called from .NET, Java, PHP and Ruby etc.
More about Aspose for Cloud

Tuesday, July 8, 2014

ASP.NET Application for Creating & Editing PowerPoint Presentations Online

Microsoft PowerPoint presentations are considered to be a very useful and accessible way to create and present visual aids. However, in our daily life we come across a situation where we don’t have Microsoft Office installed on a machine to view and edit a presentation file. This sample application gives users the ability to view and edit the presentation files using Aspose.Slides for Cloud API in ASP.NET application without the need to install Microsoft Office. Some important features supported by this application includes, View presentation files online, add new slides in the presentation file, Change slide’s position in presentation file, Copy slides within the presentation file, replace text in presentation file, delete slides from presentation file, export presentation to PDF, PPTX, TIFF and JPEG formats and more. This sample application is developed in ASP.NET to edit PowerPoint Presentation files using Aspose.Slides for Cloud API. Download the complete source code and try it at your end to edit your Presentation files without the requirement of MS Office installation. Aspose for Cloud API is a REST API which is platform independent and you can utilize the API with any programming language and platform of your own choice. Aspose team has developed SDK wrappers in different programming languages;  using these SDKs makes the coding very simple. In this project, we have used Aspose for Cloud SDK for .NET SDK and developed the application using thefree trial account of Aspose for Cloud API. I have kept the UI pretty simple and you can use this project to manipulate the presentations files online in ASP.NET application.

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, July 2, 2014

Ruby Web Application for Converting Word Excel PowerPoint & PDF Documents

Document conversion has never been easier in a ruby application. It is just a matter of few lines now. Here an tutorial explaining the steps to creating a complete working web application that can convert Microsoft Word, Excel, PowerPoint and PDF documents online to a bunch of supported file formats in a Ruby web application. We will be using the following:
  • Ruby and Bundler
  • Sinatra
  • Aspose for Cloud
  • Heroku
Let’s assume that you already have installed and configured ruby and bundler on your system. Check http://rvm.io or http://rubyinstaller.org/ for a quick setup. Let’s start. First we need a directory to keep all of our good stuff together. Let’s call it doconv (short of document converter). All files that we create and all commands that we run are inside doconv directory.
Create a file named Gemfile. This is where we tell our application what else we need to run our application. It is basically a list of third-party tools and libraries that we need. We add sinatra (a web application framework) and thin (a web application server) gems. Put the following stuff in Gemfile.
Gemfile
source "https://rubygems.org"
gem "sinatra"
gem "thin"

Create another file called app.rb. This is where our actual application source code lives inside. Since it is too small, we don't have to write multi-file modular application. Create a directory called views and a file index.erb inside views directory. We want to load the file index.erb inside app.rb. Here come the contents of both files:
app.rb
require "sinatra"
get "/" do
  erb :index
end

views/index.erb
<h3>Hello World</h3>
You have created your first web application using Sinatra. Let’s run it. Open your console, terminal, command prompt or whatever you call it. Make sure you are in doconv directory. Run the following command:
bundle install
The command may take a while as it will be downloading stuff for your tiny application and will make your application ready. Now use the following command from the same directory to run your application.
bundle exec ruby app.rb
You will see Listening on localhost:4567, CTRL+C to stop. This is where you can launch your web browser and see "Hello World" at http://localhost:4567/ URL.
So simple! That was a hello world. Let us convert documents now. Add some HTML to our application first. For that we edit our views/index.erb. It should be a simple HTML form that allows us to upload HTML file along with a drop-down menu to select between various output formats for conversion.
views/index.erb
<html>
<head><title>doconv</title></head>
<body>
  <form action="convert" method="post" enctype="multipart/form-data">
    <label>Input file
      <input type="file" name="input_file"/>
    </label>
    <br/>
    <label>Output format
      <select name="format">
        <option value="pdf">PDF</option><option value="tiff">TIFF</option>
        <option value="xps">XPS</option><option value="svg">SVG</option>
        <option value="docx">DOCX</option><option value="doc">DOC</option>
        <option value="xlsx">XLSX</option><option value="xls">XLS</option>
        <option value="text">Text</option>
      </select>
    </label>
    <br/>
    <button type=submit>Upload</button>
  </form>
</body>
</html>

Now we have a file upload option in our application along with a submit button to start the upload. It’s time to add some code for document conversion. We will need Aspose for Cloud ruby SDK. Add the SDK to our Gemfile.
Gemfile
gem "rest-client"
gem "asposecloudsdk", :github => "asposeforcloud/Aspose_Cloud_SDK_For_Ruby"

Run bundle again in your doconv directory to let it download and install the SDK for you.
bundle install
Now comes the coding part. Add the following line to the top of app.rb to load Aspose for Cloud ruby SDK:
app.rb
require "asposecloudsdk"
We create another endpoint /covert to handle uploaded documents. We shall use the file extension to detect the type of file, and call the appropriate API for conversion to the requested format.
app.rb
post "/convert" do
  unless params[:input_file] && (tmpfile = params[:input_file][:tempfile]) && (name = params[:input_file][:filename])
    return "No file selected"
  end

  app_sid = "67xxxxxd-xxx2-7xx3-1xx7-2xxxxxxxxxxd"
  app_key = "xxxxxxxxxxxxxxxxxxxxxxxxxxx"
  Aspose::Cloud::Common::AsposeApp.new(app_sid, app_key)

  request_url = "http://api.aspose.com/v1.1/"
  if /^.+\.(docx|doc|rtf)$/ =~ params[:input_file][:filename]
    request_url += "words/convert"
  elsif /^.+\.(xlsx|xls)$/ =~ params[:input_file][:filename]
    request_url += "cells/convert"
  elsif /^.+\.(pptx|ppt)$/ =~ params[:input_file][:filename]
    request_url += "slides/convert"
  elsif /^.+\.(pdf)$/ =~ params[:input_file][:filename]
    request_url += "pdf/convert"
  else
    return "Error: wrong file selected"
  end
  request_url += "?format=" + params[:format]
  signed_request_url = Aspose::Cloud::Common::Utils.sign(request_url)

  converted_file_stream = RestClient.put(signed_request_url, params[:input_file][:tempfile])
  response.headers["Content-Type"] = "application/octect-stream"
  response.headers["Content-Disposition"] = "attachment; filename=" + params[:input_file][:filename] + "." + params[:format]
  return converted_file_stream

end
We actually have made our document converter application. Lets explain the above rocket science.
app.rb
app_sid = "67xxxxxd-xxx2-7xx3-1xx7-2xxxxxxxxxxd"
app_key = "xxxxxxxxxxxxxxxxxxxxxxxxxxx"
Aspose::Cloud::Common::AsposeApp.new(app_sid, app_key)

You will need to use App SID and App Key. Just visit http://cloud.aspose.com and signup for free. All API request URLs must be signed to protect your account. The SDK already provide this feature. All you have to do is to sign each URL before sending the request. You do not need to sign it again if same request is sent multiple times.
app.rb
signed_request_url = Aspose::Cloud::Common::Utils.sign(request_url)
After we have a signed URL it’s just a simple HTTP request. We have used RestClient here, which makes it a one-line statement for us to send input document as a request body and retrieve converted document as response stream. The response stream returned from Aspose for Cloud API request is send back to web browser. Thanks to Aspose for Cloud, it supports many document formats.
Run your document converter and enjoy. You might want to do some crazy things with it. Yes, we know that a PDF cannot be converted into an Excel sheet. Don't try that - your application might crash or throw strange exception. Be smart and don't allow user errors in your application. Why not run our document converter on Heroku. Heroku is a platform that makes it possible for you to deploy your application in just a few minutes. You just need to create Procfile in your doconv directory with following contents in it:
Procfile
web: bundle exec ruby app.rb -p $PORT
Assuming that you already have Heroku Toolbelt installed and configured. Save all files in a Git repository and push to Heroku.
git init .
git add .
git commit -m "Initial import"
heroku create
git push heroku master

Your document converter is available on the internet and ready to use. Document conversion is the most basic feature provided by Aspose for Cloud APIs. You might be interested to learn about other features now. If you are using a paid plan, the documents processed by users of your applications will be counted against your account and billed accordingly.

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.