Export WordPress posts to MS Word documents

Aspose DOC exporter plugin

WordPress is one of the most popular content management system solutions in use. It is a free and open-source content management system (CMS) written in PHP and paired with a MySQL or MariaDB database. It was originally created as a blog-publishing system but has evolved to support other types of web content including mailing lists, forums, media galleries, membership sites, learning management systems (LMS), and online stores. As of April 2019, WordPress is used by more than 60 million websites including 33.6% of the top 10 million websites. In simple words, a “WordPress is a factory that makes webpages” where it stores content and enables a user to create and publish webpages. The WordPress’ plugin architecture allows users to extend the features and functionality of a website or blog where each one offers custom functions and features enabling users to tailor their sites for their specific needs.

Aspose.Words Exporter Plugin

Once a blog post is created, one of the options to share the content is to share a webpage/post link or export WordPress pages into MS Word format such as DOC, DOCX, etc. In order to fulfill this requirement, we have developed a plugin named Aspose.Words Exporter. The Aspose.Words Exporter Plugin for WordPress allows administrators to export post contents to Microsoft Word (DOC/DOCX) document. This plugin works as a bulk action for Posts, Pages, or any custom post type. The plugin is developed using Aspose.Words Cloud and demonstrates the very powerful export feature provided by Aspose.Words for Cloud. It adds a simple bulk action in the drop-down “Export to DOCX” and as soon as the bulk action is called, it exports all posts to a Microsoft Word (DOC/DOCX) document.

Installation through Admin Panel

WordPress admin panel dislay.

Most plugins are available through WordPress themselves, either via downloading them and installing the files manually via FTP or through the WordPress dashboard. In order to install the Word document exporter from WordPress marketplace, login to the WordPress admin panel and click the Plugins menu option. Click Add New button and enter Aspose.Words Exporter in the search field. Hit the enter key and it will list the plugin. Click Install now button and then click Activate button (which appears on the same place)

Aspose.Words Exporter plugin listed as a search result.
Image 2:- Aspose.Words Exporter plugin listed as a search result

Once the plugin is activated, it will appear in the list of available plugins.

Aspose.Words Exporter plugin listed after activation
Image 3:- Aspose.Words Exporter plugin listed after activation

Click an option Open Aspose.Words Exporter Settings to enable FREE Unlimited Access. There you get a variety of options to configure the plugin. Among various options, you also get the privilege to specify the output format

Post export format
Image 4:- Specify an export format for the post.

Aspose.Cloud subscription

The Aspose.Words Exporter requires an active subscription at aspose.cloud so you need to click on Enable FREE and Unlimited Access button.

Enable free access privileges using aspose.cloud account.
Image 5:- Enable aspose.cloud subscription options.

Upon successful subscription, an App SID will be generated and displayed which will be helpful when contacting the technical support team for any queries in Product support forums.

Exporting the post

After the successful installation and activation, now in order to export the post in MS Word format, open All Posts section, select one or more posts which you need to export, and from Bulk Actions menu, select Export to DOCX (Aspose.Words Exporter) option. Click the Apply button and specify the location where you need to save the resultant file.

Aspose.Words Exporter option to export the post.
Image 6:- Aspose.Words Exporter option from the dropdown.

Installation through ZIP archive

Another approach to install and configure the plugin is to download the .zip archive from WordPress marketplace. Save aspose-doc-exporter.zip file on your system.

Now under WordPress Admin, click Plugins link from the left menu and press Add New button on the Plugins page.

Plugin upload option in the WordPress Admin.
Image 7:- Plugin upload option in the WordPress Admin.

Click the Upload Plugin button and specify the location where aspose-doc-exporter.zip is located. Then click the Install Now button.

Once the plugin has been installed, the next step is to Activate it. Click the Activate Plugin button.

Aspose.Words Exporter activation page
Image 8:- Aspose.Words Exporter activation page.

Now follow the same steps and open Aspose.Words Exporter Settings page. Click Enable FREE and Unlimited Access button and your App SID will be displayed. You are good to use the plugin for blog posts/pages export to MS Word formats. Please note that if you do not Activate the plugin, you may encounter issues while trying to export the pages.

The document export format which you will select under the settings page will appear as a default export format.

Document Export format settings
Image 9:- Document export format selection menu.
ODT appearing as Document export format.
Image 10:- ODT as a document export format.

Technical Support

Technical Support is one of the salient features of Aspose and in case you encounter any issue while using the products, we are always there to help you out. Similarly, if you face any issue while using the Aspose.Words Exporter plugin, please visit our Technical Support forum for quick and appropriate assistance.

Customize the Plugin

We do believe that sharing is caring. Therefore, apart from an out of the box solution, you can also custom tailor the plugin as per your needs. Aspose Doc Exporter Plugin for WordPress is open source and its source code is available on WordPress Plugin Directory. Developers are encouraged to download the source code and contribute by suggesting or adding new features or improving the existing ones so that others could also benefit from it.

Posted in Aspose.Words Cloud Product Family | Tagged , , , , | Leave a comment

Object recognition through images using Java Cloud SDK

Aspose.Imaging Cloud Logo

Object detection is a computer technology related to computer vision and image processing that deals with detecting instances of semantic objects of a certain class (such as humans, buildings, or cars) in digital images and videos. In case you need to programmatically perform the object detection using Cloud API, then Aspose.Imaging Cloud APIs are a perfect choice. We also have developed language-specific SDKs to facilitate our customers. So Aspose.Imaging Cloud Java SDK is a viable choice for Java prommers.

In recent release versions, we have incorporated the object detection feature in our SDKs and with the help of this feature, users are able to detect object boundaries on an input image, as long as their labels and probabilities. The API currently supports 3 raster image formats (bmp, jpeg, and jpeg2000) and Single Shot Detector (SSD) is the detection method to recognize objects. Nevertheless, we are planning to integrate several other methods and image formats in our subsequent releases. Once the operation is performed through API, we can get a JSON object with detected object bounds, labels, and scores or a result image with object bounds and labels on it. Currently, you can identify objects such as a person, bicycle, car, cat, dog, horse, etc. You may consider visiting the following link for further details on the List of Available labels.

Detect objects and highlight on the image

There are two options to detect objects inside image i.e. perform an operation over an image in storage or perform an operation on image passed in the request body.

Process Images from Cloud Storage

The first method expects you to first upload an image to Cloud Storage then pass its name in the API URL. After the object detection, the API returns the resulting image in the response.

We also understand that Cloud storages are a quick and easy way to store and access the files. The object detection procedure can easily be performed on images stored on cloud storage and the resultant file is returned in the response header. In following cURL command, the object detection operation is performed on an image containing multiple objects wherein arguments, it’s specified to use Single Shot Detector (SSD) as detection model, keep threshold value at 50, include labels of objects in the resultant image and also specify the object detection score. Furthermore, we have specified Zebra, giraffe, horse as a Comma-separated list of allowed labels against allowedLabels argument. Nevertheless, if you want to save the resultant file on the local system, you may try using -o and specify a location for the resultant file.

cURL command

curl -X GET "https://api.aspose.cloud/v3.0/imaging/ai/objectdetection/71ElMFUKIvL.jpg/visualbounds?method=ssd&threshold=50&includeLabel=true&includeScore=true&allowedLabels=zebra, giraffe, horse" -H "accept: application/json" -H "authorization: Bearer <JWT Token>" -o c:/pdftest/mydetected.jpeg

Java Code snippet

Source file for object detection
Image 1:- Source file for the object detection
Resultant image with detected objects
Image 2:- Resultant file with recognized objects

Process Images without Storage

The Image processing API offers a second method (POST) where you may directly pass the image from local storage into the request body. It also lets you save the resulting image on the Cloud Storage by specifying the outPath parameter value. However, if you do not specify the value, the response contains a streamed image.

cURL command

curl -X POST "https://api.aspose.cloud/v3.0/imaging/ai/objectdetection/visualbounds?method=ssd&threshold=50&includeLabel=true&includeScore=true&allowedLabels=bird, cat, dog, horse, sheep, cow, elephant, bear, zebra, giraffe&color=yellow" -H "accept: application/json" -H "authorization: Bearer <jwt token>" -H "Content-Type: multipart/form-data" -d {"imageData":{}}

Request URL

https://api.aspose.cloud/v3.0/imaging/ai/objectdetection/visualbounds?method=ssd&threshold=50&includeLabel=true&includeScore=true&allowedLabels=bird, cat, dog, horse, sheep, cow, elephant, bear, zebra, giraffe&color=yellow

Java Code Snippet

Input image with horse
Image 3:- Input image with running horse
Horse object detected in image
Image 4:- Horse detected with 98% score
Posted in Aspose.Imaging Cloud Product Family | Tagged , , , , | Leave a comment

Merge PDF files using PHP Cloud SDK

Concatenate PDF files

The concatenation or merging of PDF files is among the widely used operations where multiple PDF files are combined together to create one single document. There can be several business use cases where PDF concatenation operations can be useful. Given below are some of the real-life examples where this feature becomes quite beneficial.

Geographical distant teams on single Projects – a project that has more than one person or team involved will end up with documents being submitted from every angle, especially when team members are distantly apart. For example, a proposal for new housing development will include reports from engineers, architects, environmental agencies, and builders, not to mention the original proposal documents. If these are all sent in various file formats, they can all be saved as PDF documents and then merged, so the final artifact can then be made using only one big document with all team’s input and conclusions in one place.

Document Archive System – places such as records libraries will have thousands of files saved electronically as separate documents rather than one big record. Merging these files as PDFs in groups will mean that searchers need to spend less time working through while trying to find a document.

Aspose provides a wide range of options to accomplish this requirement. If you need to fulfill the requirement using on-premise APIs, then Aspose.PDF is the right solution. Whereas if your preference is to perform the operations using a free and online cross-platform App, then try using Aspose.PDF merger APP. Nevertheless, if you prefer to programmatically accomplish the PDF concatenation functionality using Cloud API without any specific software installation, then Aspose.PDF Cloud API is a perfect choice.

cURL command for PDF merge

The cURL commands are the quickest way to accomplish the PDF merge feature through the command prompt. We need to use PostAppendDocument method to combine two PDF files. Two of the mandatory parameters include the name (the original PDF file) and, appendFile (name of PDF file to be appended). It also accepts two optional parameters startPage (start page of the file to be appended) and endPage (end page of the file to be appended). In case the startPage and endPage information are not specified, the whole file is appended. At the end of the operation, the source file is saved as a merged document.

curl -X POST "https://api.aspose.cloud/v3.0/pdf/Aspose_Words_Assembly.pdf/appendDocument?appendFile=sample.pdf&startPage=2&endPage=2" -H "accept: application/json" -H "authorization: Bearer <JWT token>"

PHP code snippet

Merge Multiple PDF files

Apart from PDF Append operation where one file is concatenated with other documents, the API also offers another method PutMergeDocuments where a list of documents is merged together. It accepts two mandatory arguments name (resultant PDF file) and mergeDocuments (JSON list of documents to be merged). The list is specified as given below

{<br>
  "List": [<br>
    "Aspose_Words_Assembly.pdf","sample.pdf","sample_assessment_test.pdf"<br>
  ]<br>
}

cURL command to Merge documents

curl -X PUT "https://api.aspose.cloud/v3.0/pdf/Resultant.pdf/merge" -H "accept: application/json" -H "authorization: Bearer <JWT Token>" -H "Content-Type: application/json" -d "{ \"List\": [ \"Aspose_Words_Assembly.pdf\",\"sample.pdf\",\"sample_assessment_test.pdf\" ]}"

PHP code snippet

Posted in Aspose.PDF Cloud Product Family | Tagged , , , , | Leave a comment

Optical Characters Recognition over Images using Java Cloud SDK

Aspose.OCR Cloud Family

Aspose.OCR Cloud provides features to perform Optical Characters Recognition and document scanning in the Cloud. No software download or installation required. It supports reading and recognition of text from most commonly used raster image formats (BMP, JPG, GIF, PNG, TIFF). The recognition operation can be performed with fewer code lines where you need to pass a specific image to the Aspose.OCR Cloud API, and it will return a response with recognized text. The API is capable of recognizing English, French, or Spanish text and response in XML or JSON formats.

During the recognition process, you can read characters as well as the associated font information. You can perform OCR on the whole image or provide X and Y coordinates to perform it on a specific portion of the raster image. It is also capable to perform an automatic skew correction, plus an automatic and manual document layout detection operations at a high speed, as it has no hardware resources dependency.

Platform Independent

The Cloud API is completely independent of your operating system, database system, or development language and you may use any language and platform that supports HTTP to interact with our API. However, manually writing client code can be difficult, error-prone, and time-consuming. Therefore, in order to facilitate our customers using Java language, a language-specific Aspose.OCR Cloud Java SDK is published. When using SDK, it takes care of a lot of low-level details while making requests and handling responses and enables you to focus on writing code specific to your particular project needs.

Recognize Text from URL Image

The Cloud OCR API provides an option to directly perform text recognition operation on image files available over web URL. You do not need to exclusively upload it to particular cloud storage.

Java Code snippet

Recognize Text from Image in Storage

Java Code snippet

cURL command

curl "https://api.aspose.cloud/v3.0/ocr/MyImage.png/recognize?language=1" -X GET -H  "accept: application/json" -H  "authorization: Bearer <jwt token>"

Request URL

https://api.aspose.cloud/v3.0/ocr/MyImage.png/recognize?language=1

Response Body

{
  "text": "MOORE STEPHENS",
  "code": 200
}

Useful Links

Posted in Aspose.OCR Cloud Product Family | Tagged , , , , | Leave a comment

How to Programmatically Manipulating Notes in PowerPoint Slides

Preview of Notes in Slides

Notes are one of the integral components while you are creating a presentation. You add the speaker notes to refer to later while delivering the slide show in front of an audience. During the presentation, the speaker notes are visible on your monitor but aren’t visible to the audience. So the Notes pane is the place to store talking points that you want to mention when you give your presentation.

Aspose.Slides Cloud offers the capabilities to add, update, or remove notes from PowerPoint slides. You can perform the operation on PowerPoint slides available on the local system drive or stored in Cloud storage.

Add Notes to Slides

In order to add notes, you need to try using NotesSlide/PostAddNotesSlide. The following cURL command enables you to add Notes to PowerPoint slides.

curl -X POST "https://api.aspose.cloud/v3.0/slides/NotesPresentation.pptx/slides/1/notesSlide" -H  "accept: application/json" -H  "authorization: Bearer <jwt token>" -H  "Content-Type: application/json" -d "{  \"Text\": \"These are sample presenter notes added using Aspose.Slides Cloud\",}"

Request URL

https://api.aspose.cloud/v3.0/slides/NotesPresentation.pptx/slides/1/notesSlide

Response Body

{<strong>
  </strong>"text":<strong> </strong>"These are sample presenter notes added using Aspose.Slides Cloud",<strong>
  </strong>"shapes":<strong> </strong>{<strong>
    </strong>"uri":<strong> </strong>{<strong>
      </strong>"href":<strong> </strong>"https://api.aspose.cloud/v3.0/slides/NotesPresentation.pptx/slides/1/notesSlide/shapes",<strong>
      </strong>"relation":<strong> </strong>"self"<strong>
    </strong>}<strong>
  </strong>},<strong>
  </strong>"selfUri":<strong> </strong>{<strong>
    </strong>"href":<strong> </strong>"https://api.aspose.cloud/v3.0/slides/NotesPresentation.pptx/slides/1/notesSlide",<strong>
    </strong>"relation":<strong> </strong>"self"<strong>
  </strong>}<strong>
</strong>}

C#.NET code snippet

Sample Slides without notes
Image 1:- PowerPoint slide without notes
PowerPoint Slide with Notes
Image 2:- PowerPoint slide with added notes

Update Slide Notes

You may also use the API to update notes inside the PowerPoint presentation. In order to fulfill this requirement, the NotesSlide/PutUpdateNotesSlide is used.

cURL command

curl -X PUT "https://api.aspose.cloud/v3.0/slides/NotesPresentation.pptx/slides/1/notesSlide" -H  "accept: application/json" -H  "authorization: Bearer <jwt token>" -H  "Content-Type: application/json" -d "{  \"Text\": \"Notes updated using Aspose.Slides Cloud API\",  \"Shapes\": {    \"Uri\": {      \"Href\": \"https://products.aspose.cloud/slides/curl\",       \"Title\": \"Aspose.Slides Cloud for cURL\"    }  }}"

Request URL

https://api.aspose.cloud/v3.0/slides/NotesPresentation.pptx/slides/1/notesSlide

Response Body

{<strong>
  </strong>"text":<strong> </strong>"Notes updated using Aspose.Slides Cloud API",<strong>
  </strong>"shapes":<strong> </strong>{<strong>
    </strong>"uri":<strong> </strong>{<strong>
      </strong>"href":<strong> </strong>"https://api.aspose.cloud/v3.0/slides/NotesPresentation.pptx/slides/1/notesSlide/shapes",<strong>
      </strong>"relation":<strong> </strong>"self"<strong>
    </strong>}<strong>
  </strong>},<strong>
  </strong>"selfUri":<strong> </strong>{<strong>
    </strong>"href":<strong> </strong>"https://api.aspose.cloud/v3.0/slides/NotesPresentation.pptx/slides/1/notesSlide",<strong>
    </strong>"relation":<strong> </strong>"self"<strong>
  </strong>}<strong>
</strong>}

C#.NET Code snippet

PowerPoint Slide notes updated
Image 3:- Slide with updated Notes

Read Slide Notes

The PowerPoint processing Cloud API also offers the capabilities to read the notes from the existing slide. You simply need to provide the PowerPoint file name and index of a slide for which you need to read the details of the notes. The GetNotesSlide enables you to accomplish this requirement.

cURL command

curl -X GET "https://api.aspose.cloud/v3.0/slides/NotesPresentation.pptx/slides/2/notesSlide" -H  "accept: application/json" -H  "authorization: Bearer <jwt token>"

Response body

The response body shows the slides note parsed from a specific slide of PowerPoint presentation.

{<strong>
  </strong>"text":<strong> </strong>"This is second slide of PowerPoint presentation",<strong>
  </strong>"shapes":<strong> </strong>{<strong>
    </strong>"uri":<strong> </strong>{<strong>
      </strong>"href":<strong> </strong>"https://api.aspose.cloud/v3.0/slides/NotesPresentation.pptx/slides/2/notesSlide/shapes",<strong>
      </strong>"relation":<strong> </strong>"self"<strong>
    </strong>}<strong>
  </strong>},<strong>
  </strong>"selfUri":<strong> </strong>{<strong>
    </strong>"href":<strong> </strong>"https://api.aspose.cloud/v3.0/slides/NotesPresentation.pptx/slides/2/notesSlide",<strong>
    </strong>"relation":<strong> </strong>"self"<strong>
  </strong>}<strong>
</strong>}

In case you need to read notes slide information for a document provided in the request body, please try using PostGetNotesSlide.

Delete Slide Notes

The API offers DeleteNotesSlide method to remove/delete the notes from the PowerPoint slide.

cURL command

curl -X DELETE "https://api.aspose.cloud/v3.0/slides/NotesPresentation.pptx/slides/1/notesSlide" -H  "accept: application/json" -H  "authorization: Bearer <jwt token>"
Notes deleted from Slide
Image 4:- PowerPoint slide with deleted notes

Convert Notes Slide to specific Image Format

You may stumble upon a requirement to render PowerPoint slides containing notes to specific image formats. In order to fulfill this requirement, you need to use GetNotesSlideWithFormat method of API.

cURL command

curl -X GET "https://api.aspose.cloud/v3.0/slides/NotesPresentation.pptx/slides/2/notesSlide/Jpeg" -H  "accept: multipart/form-data" -H  "authorization: Bearer "

Request URL

https://api.aspose.cloud/v3.0/slides/NotesPresentation.pptx/slides/2/notesSlide/Jpeg

As a result, the response body contains a converted image as shown below.

Second Slide with Notes
Image 5:- Preview of 2nd slide containing Notes
Notes Slide exported image
Image 6:- PowerPoint Note slide converted to JPEG image format
Posted in Aspose.Slides Cloud Product Family | Tagged , , , , | Leave a comment

Object detection from Image using Single Shot Detector method

With the release of Aspose.Imaging Cloud 20.5, we are pleased to announce the object detection feature which enables the users to detect object boundaries on an input image based on their labels and probabilities. The current implementation supports only Single Shot Detector method to recognize objects where the model is trained using COCO 2017 dataset. The SSD approach discretizes the output space of bounding boxes into a set of default boxes over different aspect ratios and scales per feature map location. 

Aspose.Imaging Cloud performs Object detection based on the following 4 methods:

  1. Detect objects on an existing image and return results as a JSON object
  2. Detect objects on an existing image and return results as an image
  3. Upload an image, detect objects on it, and return results as a JSON object
  4. Upload an image, detect objects on it, and return results as an image

1. Detects objects’ bounds

This approach detects objects on an existing image and returns the result as a JSON object.

Request query parameters:

  • name (string, required): image name. Currently, 3 image formats are supported: BMP, JPEG, and JPEG 2000
  • method (string, optional, default “ssd”): object detection method
  • threshold (number, optional, [0 – 100], default 50): minimum detected objects probability in percentage that will be included in the result
  • includeLabel (boolean, optional, default false): whether to include detected object labels in the response
  • includeScore (boolean, optional, default false): whether to include detected object probabilities in the response
  • folder (string, optional): folder
  • storage (string, optional): storage

Using cURL command

Aspose.Imaging Cloud can also be accessed using cURL command to perform the required operation. The following command shows how a cURL command can be used to detect and object and get a response as JSON object.

The following sample image is being used to detect the object.

Sample cat image
Image 1:- Source image
curl "https://api.aspose.cloud/v3.0/imaging/ai/objectdetection/cat-pet-animal-domestic-104827.jpeg/bounds?method=ssd&threshold=50&includeLabel=true&includeScore=true" \
-X GET \
-H "accept: application/json" \
-H "authorization: Bearer <jwt token>"

Request URL

https://api.aspose.cloud/v3.0/imaging/ai/objectdetection/cat-pet-animal-domestic-104827.jpeg/bounds?method=ssd&threshold=50&includeLabel=true&includeScore=true

Response Body

{
  "detectedObjects": [
    {
      "label": "cat",
      "score": 0.9450986,
      "bounds": {
        "x": 43,
        "y": 4,
        "width": 401,
        "height": 323
      }
    }
  ]
}

Response Schema

{
    "type": "object",
    "properties": {
        "detectedObjects": {
            "type": "array",
            "items": [
                {
                    "type": "object",
                    "properties": {
                        "score": {
                            "type": "number"
                        },
                        "label": {
                            "type": "string"
                        },
                        "bounds": {
                            "type": "object",
                            "properties": {
                                "x": {
                                    "type": "number"
                                },
                                "y": {
                                    "type": "number"
                                },
                                "width": {
                                    "type": "number"
                                },
                                "height": {
                                    "type": "number"
                                }
                            },
                            "required": [
                                "x",
                                "y",
                                "width",
                                "height"
                            ]
                        }
                    },
                    "required": [
                        "score",
                        "label",
                        "bounds"
                    ]
                }
            ]
        }
    },
    "required": [
        "detectedObjects"
    ]
}

C# .NET code snippet

2. Detect Objects bounds and return an image

Upload an image, detect objects, draw bounds around them and, return results as an image.

Request query parameters:

  • name (string, required): image name. Currently, 3 image formats are supported: bmp, jpeg, and jpeg2000
  • method (string, optional, [“ssd”], default “ssd”): object detection method
  • threshold (number, optional, [0 – 100], default 50): minimum objects’ probability in percents that will be included in the result
  • includeLabel (boolean, optional, default false): whether to include detected object labels in the response
  • includeScore (boolean, optional, default false): whether to include detected object probabilities in the response
  • color (string, optional): the custom color of the detected object bounds and info. If equals to null, objects of different labels have bounds of different colors
  • folder (string, optional): folder
  • storage (string, optional): storage

Using cURL command to determine objects

curl -X GET "https://api.aspose.cloud/v3.0/imaging/ai/objectdetection/dog-and-cat-cover.jpg/visualbounds?method=ssd&threshold=50&includeLabel=false&includeScore=false&color=Red" -H "accept: application/json" -H "authorization: Bearer <jwt token>"

Request URL

https://api.aspose.cloud/v3.0/imaging/ai/objectdetection/dog-and-cat-cover.jpg/visualbounds?method=ssd&threshold=50&includeLabel=false&includeScore=false&color=Red

In the above request, notice Red is specified as a highlight color.

C#.NET code snippet

The following code snippet shows steps to load an image file containing two objects (Dog and Cat). Both of these objects are identified using Aspose.Imaging Cloud API and resultant image with highlighted objects are saved on the system drive.

Cat and Dog cover image
Image 2:- Input image with Cat and Dog
Processed image highlighting identified objects
Image 3:- Processed image highlighting identified objects

For more information on Image search, please visit Reverse Image Search.

Posted in Aspose.Imaging Cloud Product Family | Tagged , , , , | Leave a comment

Split PowerPoint Presentation Slides using Cloud API

Split Presentation slides icon

A PPT file contains several different types of information such as text, bulleted points, images, multimedia, and other embedded OLE objects. From the year 2007 onwards, Microsoft came up with a newer file format for PowerPoint, known as PPTX that is based on Office OpenXML and is different from this binary file format. Usually, a PowerPoint Presentation is comprised of multiple slides that may and may not have similar formatting.

While using Aspose.Slides Cloud API, you get a wide range of options to perform PowerPoint slides split operations i.e. use Swagger interface to accomplish your requirements, use cURL commands or use application programming language-specific SDK such as C#, Java, PHP, Ruby, Python, etc

Swagger interface to Split slides

The API Reference for Aspose.Slides Cloud is published online in swagger format. As per the Document Object Model of Aspose.Slides, a PowerPoint presentation is represented with the Document object which contains a collection of Slides. The PowerPoint processing Cloud API provides a myriad of options when splitting the PowerPoint slides and enables you to save the output in a variety of output formats. The image on the right side shows the list of supported output formats by the split operation.

Now as a first step, authenticate your user by providing App SID and App Key and once you have provided the valid credentials, a JWT token is generated. So in order to accomplish our requirement to split the PowerPoint presentation slides, we need to use PostSlidesSplit method. Now click the Try it out button next to the Split POST method. At a bare minimum, you need to provide the name of an input Presentation file to start the operation.

Presentation1.pptx preview on Cloud storage
Image 1:- Presentation1.pptx preview on Cloud storage
PPTX format selection from dropdown.
Image 2:- PPTX format selected from dropdown

In this scenario, we are going to use Presentation1.pptx as shown in the image above to perform the split operation. Under format dropdown, we need to select the desired output format after the split operation. Let’s use PPTX for this scenario. The next step is to specify the From and To slide value. If From value is not specified, splitting starts from the first slide of the presentation and if we do not provide To value, splitting ends at the last slide of the document. Since our input Presentation file has only two slides, so we are going to skip this step and it will split both slides as separate presentation files. Now click the Execute button and the operation will be started.

If the user account is properly authenticated and desired input parameters are correct, you will notice a server response code 200 is displayed and the response body will list source and resultant PPTX files links. Please take a look over the following image file.

Server response body preview
Image 3:- Preview of the server response body.

You may also observe a cURL command is displayed which can also be used to perform further PowerPoint slides split operation (after updating the required arguments).

Now let’s have a look at cloud storage after this operation. Notice that two new PowerPoint presentation files are listed on cloud storage.

PowerPoint files as a result of Split operation.
Image 4:- Resultant PowerPoint files after split operation.

Now let’s have a look over the individual presentation files.

Preview of two slides in PowerPoint Presentation
Image 5:- Preview of two slides in source PowerPoint Presentation
First slide exported as individual PTX file.
Image 6:- First slide exported as individual PTX file.
Second slide exported as individual PTX file.
Image 7:- Second slide exported as individual PTX file.

Split PowerPoint slides using C# .NET

The same requirements as specified above can be accomplished using C#.NET code snippet using Aspose.Slides Cloud SDK for .NET. In the following code snippet, first, the Presentation1.pptx file is uploaded to cloud storage, and then Slides split operation is performed.

In the above code snippet, we can generate the output in various other supported formats including PDF, JPEG, PNG, JPEG, HTML, XPS, SVG, etc. Simply change the value of SlideExportFormat enumeration in PostSlidesSplitRequest() method.

Posted in Aspose.Slides Cloud Product Family | Tagged , , , , | Leave a comment

PowerPoint Slides Manipulation using Cloud APIs

Why PowerPoint Presentations?

PowerPoint templates preview

PowerPoint presentations are one of the popular and most widely used formats of data and information presentations during board and general meetings. Also, in the eLearning world, PowerPoint is among the popular knowledge-sharing formats. The presentation format has changed the way people present ideas and information to an audience. The Presentation files store collection of records to accommodate presentation data such as slides, shapes, text, animations, video, audio, and embedded objects.

As per your requirements, you use the Presentation software such as Microsoft PowerPoint, Apache OpenOffice Impress, Apple Keynote, etc, to create fliers, envelopes, business cards, invitations, certificates, forms, calendars, and even books. The common Presentation file extensions and their associated file formats include PPTXPPT, and ODP.

Features offered by Aspose.Slides Cloud

In order to compile a compelling presentation, you must first understand all that your presentation processing API has to offer. Aspose.Slides Cloud enables you to create well-designed, impactful slides within Presentations. The concept of slides is quite phenomenal where related information is grouped on a particular slide. You may add beautiful timelines and charts to your presentation using API.

At slide level, the API offers the features to Add, Remove, Copy, Move, get slides count, dimensions, and information regarding other objects in a slide. Please consider visiting the following link for information regarding features offered by Aspose.Slides Cloud API.

Add, Move, Delete, Copy Slides

While manipulating PowerPoint presentations, one of the most popular operations performed by users includes the addition of new empty slides, the movement of slide to a new location in presentation, Copy existing slide to a new location or delete an existing slide from the presentations file. When dealing with files, we get an option to perform operations on files stored on a local file system or a file stored in cloud storage.

In the following examples, we will be dealing with the attached sample presentation which initially contains one single master slide.

Preview of input Presentation file
Image 1:- Preview of the source Presentation file

Add an empty slide

As shown in the code snippet below, a single method PostSlidesAddRequest(..) is used to add a new slide to the presentation file. The first parameters accept the Presentation file name, the second argument takes the index where the slide needs to be added. In case the index parameter is not specified, then the slide is added at the end of already present slides in the presentation. The third one is password information for the file, and so on. All the parameters except the input file name are optional.

Preview after adding new blank slide
Image 2:- Preview after adding a blank slide on 2nd index

Move Slide

The API provides a simple method to rearrange the position of the slide within the presentation file. You simply need to provide the location/name of an input file, index of the slide which you need to move, and a third argument pointing to the index where you need to move the file. As per the code snippet below, the slide from the 2nd index is moved to 1st.

Preview after reordering 2nd slide to new position
Image 2:- Preview after reOrdering 2nd slide to 1st index

Delete Slide

Among the CRUD operations, Delete also possesses its importance because we sometimes stumble upon a requirement to remove unnecessary or outdated information. So in order to cater to this requirement. the API is fully capable of handling such requests. You get the option to delete all slides in a presentation using DeleteSlidesCleanSlidesList(..) method or remove a slide at a specific index using DeleteSlideByIndex(..) method which accepts two arguments i.e. input presentation file name and index of the slide to be removed.

Preview after deleting slide at index 2
Image 4:- Preview after removing slide on the 2nd index.
Posted in Aspose.Slides Cloud Product Family | Tagged , , , , | Leave a comment

Conditional Formatting in Microsoft Excel Spreadsheet using C#

While learning about visualizing data in Excel spreadsheets, we have already learned about Working with Charts in Excel Workbook. Now, let us explore another feature of Conditional Formatting in Excel files. It is a useful and effective way of presenting the information.

In this article, we will be learning the following features related to Conditional Formatting:

  • Add Conditional Formatting in Excel Spreadsheet
  • Delete Conditional Formatting in Excel Spreadsheet
  • Update Conditional Formatting in Excel Spreadsheet

Add Conditional Formatting in Excel Spreadsheet

You can specify different parameters of the condition including the Type, Operator, Style, Cell Area, etc and then call the API. Following C# code demonstrates how you can add conditional formatting in Excel worksheet:

This code snippet will add the conditional formatting to the specified cell area. You can notice changed background color of cells that contain the value under a specific range.

Conditional Formatting Excel

Moreover, Microsoft Excel offers three presets for Conditional Formatting, Data Bars, Color Scales, and Icon Sets. The following screenshot shows these presets. Fortunately, all of these presets are supported by Aspose.Cells Cloud API. Such features elevate the API to be the best fit for processing Excel spreadsheet files.

Conditional Formatting in Excel

Delete Conditional Formatting in Excel Spreadsheet

You can delete any conditional formatting from an Excel workbook. Simply set the index of formatting and call the API. However, the index is zero-based so zero should be passed to delete first formatting and so on. Following C# code snippet deletes first conditional formatting from specified worksheet of the specific workbook:

Furthermore, you can also delete all conditional formattings from a worksheet in a single API call. Simply omit or comment out the index variable and the API will delete all of the formattings from the specified worksheet.

Update Conditional Formatting in Excel Spreadsheet

You can update existing conditional formattings in an Excel file. For instance, let us update the Condition Area in the formatting we had added in the very first example of this article. You can notice in that screenshot as well that the area is set as A1:C10. Let us continue that example and further include E6:G8 cells. Following code snippet can be used to update the condition area:

The below screenshot highlights how the same condition is extended to another area specified in the code snippet.

Update Conditional Formatting Excel

The highlighted area on this screenshot is the example of how the updating of the Condition Area works. The cells in range E6:G8 are now appended to the condition area.

To sum up, we have explored a few of the possibilities that you can utilize in your applications. You can further refer to API references, API documentation, and different SDKs of Aspose.Cells for Cloud API. We look forward to your feedback or suggestions at Free Support Forums. Cheers!

Related Post

Create, Edit or Convert Excel Files without using MS Excel

Posted in Aspose.Cells Cloud Product Family | Tagged , | Leave a comment

Add, Delete and Manipulate Charts in Excel file using C#

Charts are used to reflect information in easy to understand manner. Spreadsheets are used by almost all offices to manage data but they are not so easy to read. This is why a Chart, often known as a graph in Excel, is helpful to present an overview of the data. Aspose.Cells for Cloud API is rich with Chart manipulation APIs. In this article, we will be learning the following features:

  • Add Chart in Excel Spreadsheet
  • Delete Chart in Excel Spreadsheet
  • Update Existing Chart in Excel Spreadsheet

The API can be called from any platform using any programming language. Different SDKs are available including Python, PHP, Ruby, Perl, Go, Swift, and many more. You can choose and use it among any of those as per your convenience. Here we will be using C# code for these examples.

Add Chart in Excel Spreadsheet

You can insert a chart or graph in an Excel workbook with Aspose.Cells Cloud API. Simply specify the necessary properties of the chart, like Chart Type, Chart Area, and then make the API call. Below is a sample code which adds a Pie Chart to a worksheet:

This code snippet will create a chart as displayed in the following screenshot:

Add Chart in Excel

Delete Chart from Excel Spreadsheet

You can delete or remove an existing chart from an XLSX or XLS file with Aspose.Cells Cloud API. Simply specify the file name, worksheet name, and chart index. Subsequently, call the API and respective chart will be deleted from the worksheet. However, the data will remain unaffected in the cells as it is, only the chart will be deleted. Following code snippet can be used for the same purpose:

The below screenshot shows output worksheet where data stays the same and the chart is deleted.

Update a Chart in Excel Spreadsheet

Since we have already considered two of the chart manipulation features above, let us check out another feature of updating an existing chart. Here we will be updating the title of the chart by specifying the name of Excel file, name of the worksheet, and index of the chart as in following C# code snippet:

The output of this code snippet can be observed in the screenshot below. The chart title is the same as specified by us.

These are a few of the many chart manipulation features offered by the API. You can sign up for free and test the APIs in their full capacity. In case of any query, please write to us at Free Support Forums.

Related Post

Create, Edit or Convert Excel Files

Posted in Aspose.Cells Cloud Product Family | Tagged , , , , , , , , , , | Leave a comment