Free Ruby Library to Create & Convert Presentation & Slides

Open Source Ruby API to Create, Edit, and Convert PowerPoint PPT and PPTX Presentations and Slides to to PDF, PowerPoint, or Slide Decks.

What is TTP Library?

Open-source libraries are essential for software developers aiming to build scalable, efficient applications, and the TPP Ruby Library is a standout choice for dynamic presentation generation. Hosted on GitHub, this free Ruby PowerPoint API empowers software developers, educators, and presenters to create interactive slide decks using Ruby’s clean and expressive syntax. Instead of relying on traditional design tools, TPP lets you create new presentations via Ruby by defining slide content, transitions, and structure programmatically. This enables reusable, maintainable code that can generate presentation slides from data and easily add text to presentations or integrate dynamic content.

Created by Christopher Browne, the TPP Ruby Presentation Library supports output in various formats like static HTML, terminal-based slides, PDF, and even presentations to PowerPoint PPTX through additional tools. With features like customizable themes, reusable slide components, and command-line integration, developers can customize slide layouts and enhance presentations with interactive elements. While it doesn’t directly handle PowerPoint to PDF via Ruby, it fits seamlessly into workflows that require automated presentation generation. TPP’s open-source nature makes it a powerful tool for developers seeking flexibility and efficiency in presentation creation.

Previous Next

Getting Started with 'TPP'

The recommend way to install TPP Ruby library is using Ruby gem. Please use the following command for a smooth installation.

Install 'TPP' via Ruby gem

gem install TPP 

Install TPP Ruby library via GitHub

git clone https://github.com/cbbrowne/tpp.git  

Slide Creation via Ruby Library

The open source TPP Ruby Presentation Library allows software developers to create slides programmatically, making it easy to generate presentations dynamically. You can define slide layouts, add text, images, and other elements, and customize the appearance of each slide. Here is a simple example that shows how software developers can create a simple slide using Ruby commands.

How to Create a Simple Slide via Ruby Library?

require 'tpp'

presentation = TPP::Presentation.new

# Add a title slide
presentation.add_slide do |slide|
  slide.title = "Welcome to the TPP Ruby Presentation Library"
  slide.subtitle = "Creating Presentations Programmatically"
  slide.background_color = "#f0f0f0"
end

# Add a content slide
presentation.add_slide do |slide|
  slide.title = "Key Features"
  slide.add_bullet_point("Programmatic slide creation")
  slide.add_bullet_point("Customizable layouts")
  slide.add_bullet_point("Export to multiple formats")
end

# Save the presentation
presentation.save("my_presentation.pdf")

Presentations Export to Other Formats via Ruby

The TPP (text presentation program) Ruby Presentation Library makes it easy for software developers to load and export their presentations to multiple formats, including PDF, PowerPoint, image and many more. This features is very useful and makes it easy to share your presentations with others or integrate them into other workflows. The following example demonstrates how to export your Presentations to PowerPoint PPTX file format inside Ruby applications.

How to Export Presentations to PowerPoint PPTX File via Ruby Library?

require 'tpp'

presentation = TPP::Presentation.new

# Add a title slide
presentation.add_slide do |slide|
  slide.title = "Exporting to PowerPoint"
  slide.subtitle = "Using the TPP Ruby Presentation Library"
end

# Export to PowerPoint format
presentation.save("presentation.pptx")

Dynamic Slides Content Generation

The open source library TPP library makes it easy for programmers to generate presentation’s slides dynamically based on data using Ruby code. This is particularly useful for creating reports or presentations that require up-to-date information. Here is a very useful example demonstrating how programmers can generate Slides from data using Ruby library.

How to Generate Presentation Slides from Data inside Ruby Apps?

require 'tpp'

data = [
  { title: "Quarter 1", revenue: 100000 },
  { title: "Quarter 2", revenue: 120000 },
  { title: "Quarter 3", revenue: 150000 }
]

presentation = TPP::Presentation.new

data.each do |quarter|
  presentation.add_slide do |slide|
    slide.title = quarter[:title]
    slide.add_content("Revenue: $#{quarter[:revenue]}")
  end
end

# Save the presentation
presentation.save("quarterly_report.pdf")

Customizable Slide Layouts

The TPP (text presentation program) Ruby Presentation Library provides flexibility in designing slide layouts inside Ruby applications. You can define custom layouts for different types of slides, such as title slides, content slides, or image-focused slides.