Render a Paragraph to an Image

Introduction

Aspose.Slides Cloud API allows you to render a single paragraph of a shape to an image. This is useful when you need a picture of a specific piece of text from a slide, for example, to show a preview of it or to embed it into another document. The paragraph can be rendered to JPEG, PNG, GIF, BMP, or TIFF format. You can either get the image in the response or save it to a storage.

DownloadParagraph

API Information

API Type Description Resource
/slides/{name}/slides/{slideIndex}/shapes/{shapeIndex}/paragraphs/{paragraphIndex}/{format} POST Renders a paragraph from a presentation saved in a storage to the specified image format and returns the image in the response. DownloadParagraph

Request Parameters

Name Type Location Required Description
name string path true The name of a presentation file.
slideIndex integer path true The 1-based index of a slide.
shapeIndex integer path true The 1-based index of a shape.
paragraphIndex integer path true The 1-based index of a paragraph.
format string path true The format of the output image (Jpeg, Png, Gif, Bmp, or Tiff).
scaleX number query false The scale ratio along the X axis.
scaleY number query false The scale ratio along the Y axis.
quality integer query false The image quality from 1 to 100; applies to JPEG only. The default value is 100.
password string header false The password to open the presentation.
folder string query false The path to the folder containing the presentation.
storage string query false The name of the storage containing the folder.
fontsFolder string query false The path to the storage folder containing external fonts.
subShape string query false The path to a shape inside a group shape or a SmartArt object (e.g. “3”, “3/shapes/2”).

Examples

In the default storage, the document MyFolder/MyPresentation.pptx contains a text box (the first shape) on the first slide. Render the second paragraph of the text box to a PNG image scaled 2 times and save it to a local file.

cURL Solution

SDK Solutions

SaveParagraph

API Information

API Type Description Resource
/slides/{name}/slides/{slideIndex}/shapes/{shapeIndex}/paragraphs/{paragraphIndex}/{format} PUT Renders a paragraph from a presentation saved in a storage to the specified image format and saves the image to the storage. SaveParagraph

Request Parameters

Name Type Location Required Description
name string path true The name of a presentation file.
slideIndex integer path true The 1-based index of a slide.
shapeIndex integer path true The 1-based index of a shape.
paragraphIndex integer path true The 1-based index of a paragraph.
format string path true The format of the output image (Jpeg, Png, Gif, Bmp, or Tiff).
outPath string query true The path to the output image in the storage.
scaleX number query false The scale ratio along the X axis.
scaleY number query false The scale ratio along the Y axis.
quality integer query false The image quality from 1 to 100; applies to JPEG only. The default value is 100.
password string header false The password to open the presentation.
folder string query false The path to the folder containing the presentation.
storage string query false The name of the storage containing the folder.
fontsFolder string query false The path to the storage folder containing external fonts.
subShape string query false The path to a shape inside a group shape or a SmartArt object (e.g. “3”, “3/shapes/2”).

Examples

In the default storage, the document MyFolder/MyPresentation.pptx contains a text box (the first shape) on the first slide. Render the second paragraph of the text box to a JPEG image with quality 80 and save it to MyFolder/paragraph.jpg in the storage.

cURL Solution

SDK Solutions

SDKs

Check Available SDKs to learn how to add an SDK to your project.