Outputting PowerPoint Files (*.pptx) Using OpenXML SDK in C#

Introduction This article is a continuation of Parsing Markdown and Performing Custom Output in C# (Using markdig). The tool mentioned in the above article, which converts Markdown to PPTX, creates PPTX files using the OpenXML SDK. I initially struggled greatly with using this OpenXML SDK, so this article will focus on that part. The tool that converts Markdown to PPTX is available on GitHub. What is OpenXML? It’s a file format used since Office 2007, consisting of XML files bundled into a zip archive. Therefore, by changing the file extension to .zip and then unzipping it, you can view the XML files inside. Unlike the previous binary format, it allows creation even in environments where Office is not installed. ...

2018-08-08 · 6 min · 1154 words · ayumax

Parsing Markdown and Performing Custom Output in C# (Using markdig)

Introduction I recently created a tool to convert Markdown files into PowerPoint format (*.pptx). I’ll summarize the technical notes from that process here. This article focuses on Markdown parsing. The created tool is available on GitHub. https://github.com/ayumax/MDToPPTX Also, for the article about the pptx creation tool itself, please refer to this article. Development Environment Considering future integration into a tool using Xamarin, I created the project as a .NET Standard 2.0 C# library. ...

2018-08-07 · 5 min · 993 words · ayumax

MDToPPTX Image Handling

Long Time No Update It’s been quite a while since I last wrote an article about MDToPPTX. I’m scheduled to give a talk about creating this tool for my first-ever LT (Lightning Talk), so I’m reviewing the code again. Image Implementation At the time of the previous article, I had tentatively implemented images assuming 1px to 1mm, but… the implementation was strange and incorrect. With that, the width of a 1000px image was being converted to 1cm. (The physical width (cm) was set by dividing the pixel count by 1000). ...

2018-08-05 · 2 min · 255 words · ayumax

Created a Tool to Convert Markdown to PowerPoint Files

MDToPPTX The beta version of MDToPPTX, a tool I’ve been creating to convert Markdown files to PowerPoint files (*.pptx), is now ready. It’s written in C#, and the library part is built with .NET Standard 2.0. So, although I haven’t tested it, it should also work with .NET Core and Xamarin. Using this, you can create PowerPoint files from Markdown. markdig For Markdown parsing, I used markdig. Thanks to this, writing the code was very easy. ...

2018-06-06 · 3 min · 478 words · ayumax

PPTX Creation Feature: Image Insertion and Bullet Points

Issues from the Previous Version In the previous article (http://ayumax.hatenablog.com/entry/2018/05/06/231645), there were the following issues: Cannot freely change the position of text No image insertion feature All text becomes bullet points So, this time I addressed these issues. Text Position Setting Created a new PPTXTextArea class, allowing Position(x,y) and Size(width, height) to be set. In the PowerPoint world, settings seem to be in cm, so I made it possible to input values in cm (internal conversion is performed). ...

2018-05-13 · 2 min · 350 words · ayumax

PPTX Creation Feature - Tentative Version

Progress Regarding the development of the C# library that reads Markdown and creates PowerPoint files, I’ve managed to implement the minimum required features for now. The current features are as follows: Slide size is fixed at 4x3 (I want to support 16:9 as well) The first slide is always a title page Slides from the second one onwards can be added freely It's possible to specify the slide layout for added slides Only text can be added to slides; images and shapes are not supported Writing code like the following creates a *.pptx file. ...

2018-05-06 · 2 min · 271 words · ayumax

I Want to Create PowerPoint Files from Markdown

I Want to Create PPTX Files Lately, I have too many things I want to do and I’m working on various projects in parallel. Among them, for some reason, the desire to create PowerPoint documents from Markdown is strong, and I’m putting the most effort into it. First, I Looked for Existing Tools I haven’t searched for super niche tools, but it feels like there isn’t anything I want to use right away. There are many tools that can convert to PDF, but few for PowerPoint, right? ...

2018-05-05 · 2 min · 370 words · ayumax