You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SLIDESDOC-627 Update article text to improve time to read (#786)
* SLIDESDOC-627 Update article text to improve time to read
Updated the text in the article "Format PowerPoint Text in Python".
* SLIDESDOC-627 Update article text to improve time to read
Updated text and code examples in two articles.
* SLIDESDOC-627 Update article text to improve time to read
Updated the article "Convert PowerPoint Presentations to Markdown in Python".
* SLIDESDOC-627 Update article text to improve time to read
Updated the article "Convert PowerPoint Slides to PNG in Python".
* SLIDESDOC-627 Update article text to improve time to read
Updated the article "Enhance PowerPoint Presentations with Animations in Python".
* SLIDESDOC-627 Update article text to improve time to read
Updated the article "Manage Shapes in Presentations Using Python".
* SLIDESDOC-627 Update article text to improve time to read
Updated the article "Enhance Your Presentations with AutoFit in Python".
* SLIDESDOC-627 Update article text to improve time to read
Updated the article "Manage SmartArt Graphics in Presentations Using Python".
* SLIDESDOC-627 Update article text to improve time to read
Updated the article "Licensing".
* SLIDESDOC-627 Update article text to improve time to read
Updated the article "Advanced Text Extraction from PowerPoint Presentations in Python".
Copy file name to clipboardExpand all lines: en/python-net/developer-guide/manage-presentation/convert-presentation/convert-powerpoint/convert-powerpoint-to-markdown/_index.md
+41-53Lines changed: 41 additions & 53 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,92 +28,80 @@ keywords:
28
28
description: "Convert PowerPoint and OpenDocument slides—PPT, PPTX, ODP—to clean Markdown with Aspose.Slides for Python via .NET, automate documentation and keep formatting."
29
29
---
30
30
31
-
{{% alert color="info" %}}
31
+
## **Convert Presentations to Markdown**
32
32
33
-
Support for PowerPoint to markdown conversion was implemented in [Aspose.Slides 23.7](https://docs.aspose.com/slides/python-net/aspose-slides-for-python-net-23-7-release-notes/).
33
+
The example below shows the simplest way to convert a PowerPoint presentation to Markdown using Aspose.Slides for Python via .NET with default settings.
34
34
35
-
{{% /alert %}}
35
+
1. Instantiate a [Presentation](https://reference.aspose.com/slides/python-net/aspose.slides/presentation/) to load the presentation.
36
+
1. Call `save` to export it as a Markdown file.
36
37
37
-
{{% alert color="warning" %}}
38
-
39
-
PowerPoint to markdown export is **without images** by default. If you want to export a PowerPoint document containing images, you need to set `saveOptions.export_type = MarkdownExportType.VISUAL` also set the `base_path` where the images referenced in the markdown document will be saved.
40
-
41
-
{{% /alert %}}
42
-
43
-
## **Convert PowerPoint to Markdown**
44
-
45
-
1. Create an instance of the [Presentation](https://reference.aspose.com/slides/python-net/aspose.slides/presentation/) class to represent a presentation object.
46
-
2. Use the [Save](https://reference.aspose.com/slides/python-net/aspose.slides/presentation/#methods) method to save the object as a markdown file.
47
-
48
-
This Python code shows you how to convert PowerPoint to markdown:
38
+
Use the Python snippet below to perform the conversion:
49
39
50
40
```python
51
41
import aspose.slides as slides
52
42
53
-
with slides.Presentation("pres.pptx") aspres:
54
-
pres.save("pres.md", slides.export.SaveFormat.MD)
43
+
with slides.Presentation("presentation.pptx") aspresentation:
Aspose.Slides allows you to convert PowerPoint to markdown (containing basic syntax), CommonMark, GitHubflavored markdown, Trello, XWiki, GitLab, and 17 other markdown flavors.
49
+
Aspose.Slides allows you to convert presentations to Markdown formats, including basic Markdown, CommonMark, GitHub-flavored Markdown, Trello, XWiki, GitLab, and 17 other Markdown flavors.
60
50
61
-
This Python code shows you how to convert PowerPoint to CommonMark:
51
+
The following Python example shows how to convert a PowerPoint presentation to CommonMark:
62
52
63
53
```python
64
-
from aspose.slides import Presentation
65
-
from aspose.slides.dom.export.markdown.saveoptions import MarkdownSaveOptions, Flavor
The 23 supported markdown flavors are [listed under the Flavor enumeration](https://reference.aspose.com/slides/python-net/aspose.slides.dom.export.markdown.saveoptions/flavor/)from the [MarkdownSaveOptions](https://reference.aspose.com/slides/python-net/aspose.slides.dom.export.markdown.saveoptions/markdownsaveoptions/) class.
63
+
The 23 supported Markdown flavors are listed in the [Flavor](https://reference.aspose.com/slides/python-net/aspose.slides.dom.export.markdown.saveoptions/flavor/)enumeration of the [MarkdownSaveOptions](https://reference.aspose.com/slides/python-net/aspose.slides.dom.export.markdown.saveoptions/markdownsaveoptions/) class.
76
64
77
-
## **Convert Presentation Containing Images to Markdown**
65
+
## **Convert Presentations Containing Images to Markdown**
78
66
79
-
The [MarkdownSaveOptions](https://reference.aspose.com/slides/python-net/aspose.slides.dom.export.markdown.saveoptions/markdownsaveoptions/) class provides properties and enumerations that allow you to use certain options or settings for the resulting markdown file. The [MarkdownExportType](https://reference.aspose.com/slides/python-net/aspose.slides.dom.export.markdown.saveoptions/markdownexporttype/) enum, for example, can be set to values that determine how images are rendered or handled: `Sequential`, `TextOnly`, `Visual`.
67
+
The [MarkdownSaveOptions](https://reference.aspose.com/slides/python-net/aspose.slides.dom.export.markdown.saveoptions/markdownsaveoptions/) class provides properties and enumerations that let you configure the resulting Markdown file. For example, the [MarkdownExportType](https://reference.aspose.com/slides/python-net/aspose.slides.dom.export.markdown.saveoptions/markdownexporttype/) enum controls how images are handled: `SEQUENTIAL`, `TEXT_ONLY`, or `VISUAL`.
80
68
81
69
### **Convert Images Sequentially**
82
70
83
-
If you want the images to appear individuallyone after the other in the resulting markdown, you have to choose the sequential option. This Python code shows you how to convert a presentation containing images to markdown:
71
+
If you want images to appear individually—one after another—in the generated Markdown, choose the `SEQUENTIAL` option. The Python example below shows how to convert a presentation with images to Markdown.
If you want the images to appear together in the resulting markdown, you have to choose the visual option. In this case, images will be saved to the current directory of the application (and a relative path will be built for them in the markdown document), or you can specify your preferred path and folder name.
91
+
If you want the images to appear together in the resulting Markdown, choose the `VISUAL` option. In this mode, images are saved to the application’s current directory (and the Markdown document uses relative paths), or you can specify a custom output path and folder name.
102
92
103
-
This Python code demonstrates the operation:
93
+
The Python example below demonstrates this operation:
104
94
105
95
```python
106
-
from aspose.slides import Presentation
107
-
from aspose.slides.dom.export.markdown.saveoptions import MarkdownSaveOptions, MarkdownExportType
Copy file name to clipboardExpand all lines: en/python-net/developer-guide/manage-presentation/convert-presentation/convert-powerpoint/convert-powerpoint-to-png/_index.md
+32-36Lines changed: 32 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,72 +22,68 @@ keywords:
22
22
description: "Convert PowerPoint and OpenDocument presentations to high-quality PNG images quickly with Aspose.Slides for Python via .NET, ensuring precise, automated results."
23
23
---
24
24
25
-
## **About PowerPoint to PNG Conversion**
25
+
## **Overview**
26
26
27
-
The PNG (Portable Network Graphics) format is not as popular as JPEG (Joint Photographic Experts Group), but it still very popular.
27
+
Aspose.Slides for Python via .NET makes it straightforward to convert PowerPoint presentations to PNG. You load a presentation, iterate through its slides, render each one to a raster image, and save the result as PNG files. This is ideal for generating slide previews, embedding slides in web pages, or producing static assets for downstream processing.
28
28
29
-
**Use case:** When you have a complex image and size is not an issue, PNG is a better image format than JPEG.
29
+
## **Convert Slides to PNG**
30
30
31
-
{{% alert title="Tip" color="primary" %}} You may want to check out Aspose free **PowerPoint to PNG Converters**: [PPTX to PNG](https://products.aspose.app/slides/conversion/pptx-to-png) and [PPT to PNG](https://products.aspose.app/slides/conversion/ppt-to-png). They are a live implementation of the process described on this page. {{% /alert %}}
32
-
33
-
## **Convert PowerPoint to PNG**
31
+
This section shows the simplest possible example of converting a PowerPoint presentation to PNG images using Aspose.Slides for Python via .NET.
34
32
35
33
Go through these steps:
36
34
37
35
1. Instantiate the [Presentation](https://reference.aspose.com/slides/python-net/aspose.slides/presentation/) class.
38
-
2. Get the slide object from the [Presentation.Slides](https://reference.aspose.com/slides/python-net/aspose.slides/presentation/) collection under the [ISlide](https://reference.aspose.com/slides/python-net/aspose.slides/islide/)interface.
39
-
3. Use a [ISlide.GetImage](https://reference.aspose.com/slides/python-net/aspose.slides/islide/) method to get the thumbnail for each slide.
40
-
4. Use the [IPresentation.SaveMethod(String, SaveFormat, ISaveOptions](https://reference.aspose.com/slides/python-net/aspose.slides/ipresentation/)method to save the slide thumbnail to the PNG format.
36
+
1. Get a slide from the `Presentation.slides` collection (see the [Slide](https://reference.aspose.com/slides/python-net/aspose.slides/slide/)class).
37
+
1. Use the `Slide.get_image` method to generate a thumbnail of the slide.
38
+
1. Use the `Presentation.save`method to save the slide thumbnail in PNG format.
41
39
42
-
This Python code shows you how to convert a PowerPoint presentation to PNG:
40
+
This Python code shows how to convert a PowerPoint presentation to PNG:
## **Convert PowerPoint to PNG With Custom Dimensions**
51
+
## **Convert Slides to PNG with Custom Dimensions**
56
52
57
-
If you want to obtain PNG files around a certain scale, you can set the values for `desiredX`and `desiredY`, which determine the dimensions of the resulting thumbnail.
53
+
To export slides to PNG at a custom scale, call `Slide.get_image` with horizontal and vertical scale factors. These multipliers resize the output relative to the slide’s original dimensions—for example, `2.0` doubles both width and height. Use equal values for `scale_x` and `scale_y` to preserve the aspect ratio.
58
54
59
-
This code in Python demonstrates the described operation:
55
+
This Python code demonstrates the described operation:
If you want to obtain PNG files around a certain size, you can pass your preferred `width` and `height` arguments for `ImageSize`.
69
+
## **Convert Slides to PNG with Custom Size**
77
70
78
-
This code shows you how to convert a PowerPoint to PNG while specifying the size for the images:
71
+
If you want to generate PNG files at a specific size, pass your desired `width` and `height` values. The code below shows how to convert a PowerPoint to PNG while specifying the image size:
You may want to try Aspose’s free **PowerPoint-to-PNG converters**—[PPTX to PNG](https://products.aspose.app/slides/conversion/pptx-to-png) and [PPT to PNG](https://products.aspose.app/slides/conversion/ppt-to-png). They provide a live implementation of the process described on this page.
0 commit comments