Skip to main content

Crate ppt_rs

Crate ppt_rs 

Source
Expand description

PowerPoint (.pptx) file manipulation library

A comprehensive Rust library for creating, reading, and updating PowerPoint 2007+ (.pptx) files.

§Quick Start

use ppt_rs::{create_pptx_with_content, SlideContent};

let slides = vec![
    SlideContent::new("Welcome")
        .add_bullet("First point")
        .add_bullet("Second point"),
];
let pptx_data = create_pptx_with_content("My Presentation", slides).unwrap();
std::fs::write("output.pptx", pptx_data).unwrap();

§Module Organization

  • core - Core traits (ToXml, Positioned, Styled) and utilities
  • elements - Unified element types (Color, Position, Size, Transform)
  • generator - PPTX file generation with ZIP packaging and XML creation
  • parts - Package parts (SlidePart, ImagePart, ChartPart)
  • integration - High-level builders for presentations
  • opc - Open Packaging Convention (ZIP) handling
  • oxml - Office XML parsing and manipulation
  • exc - Error types

Re-exports§

pub use api::Presentation;
pub use core::ToXml;
pub use core::escape_xml;
pub use elements::Color;
pub use elements::RgbColor;
pub use elements::SchemeColor;
pub use elements::Position;
pub use elements::Size;
pub use elements::Transform;
pub use exc::PptxError;
pub use exc::Result;
pub use generator::create_pptx;
pub use generator::create_pptx_with_content;
pub use generator::create_pptx_with_settings;
pub use generator::SlideContent;
pub use generator::SlideLayout;
pub use generator::TextFormat;
pub use generator::FormattedText;
pub use generator::Table;
pub use generator::TableRow;
pub use generator::TableCell;
pub use generator::TableBuilder;
pub use generator::Shape;
pub use generator::ShapeType;
pub use generator::ShapeFill;
pub use generator::ShapeLine;
pub use generator::Image;
pub use generator::ImageBuilder;
pub use generator::ImageSource;
pub use generator::Chart;
pub use generator::ChartType;
pub use generator::ChartSeries;
pub use generator::ChartBuilder;
pub use generator::BulletStyle;
pub use generator::BulletPoint;
pub use generator::TextDirection;
pub use generator::RtlLanguage;
pub use generator::RtlTextProps;
pub use generator::Comment;
pub use generator::CommentAuthor;
pub use generator::CommentAuthorList;
pub use generator::SlideComments;
pub use generator::SlideSection;
pub use generator::SectionManager;
pub use generator::DigitalSignature;
pub use generator::SignerInfo;
pub use generator::HashAlgorithm;
pub use generator::SignatureCommitment;
pub use generator::InkAnnotations;
pub use generator::InkStroke;
pub use generator::InkPen;
pub use generator::InkPoint;
pub use generator::PenTip;
pub use generator::SlideShowSettings;
pub use generator::ShowType;
pub use generator::PenColor;
pub use generator::SlideRange;
pub use generator::PrintSettings;
pub use generator::HandoutLayout;
pub use generator::PrintColorMode;
pub use generator::PrintWhat;
pub use generator::Orientation;
pub use generator::TableMergeMap;
pub use generator::MergeRegion;
pub use generator::CellMergeState;
pub use generator::EmbeddedFontList;
pub use generator::EmbeddedFont;
pub use generator::FontStyle;
pub use generator::FontCharset;
pub use generator::PresentationSettings;
pub use generator::Connector;
pub use generator::ConnectorType;
pub use generator::ConnectorLine;
pub use generator::ArrowType;
pub use generator::ArrowSize;
pub use generator::ConnectionSite;
pub use generator::LineDash;
pub use generator::HyperlinkAction;
pub use generator::GradientFill;
pub use generator::GradientType;
pub use generator::GradientDirection;
pub use generator::GradientStop;
pub use generator::PresetGradients;
pub use generator::Video;
pub use generator::Audio;
pub use generator::VideoFormat;
pub use generator::AudioFormat;
pub use generator::VideoOptions;
pub use generator::AudioOptions;
pub use integration::PresentationBuilder;
pub use integration::SlideBuilder;
pub use integration::PresentationMetadata;
pub use oxml::repair::PptxRepair;
pub use oxml::repair::RepairIssue;
pub use oxml::repair::RepairResult;
pub use parts::Part;
pub use parts::PartType;
pub use parts::ContentType;
pub use parts::PresentationPart;
pub use parts::SlidePart;
pub use parts::SlideLayoutPart;
pub use parts::LayoutType;
pub use parts::SlideMasterPart;
pub use parts::ThemePart;
pub use parts::NotesSlidePart;
pub use parts::ImagePart;
pub use parts::MediaPart;
pub use parts::MediaFormat;
pub use parts::ChartPart;
pub use parts::TablePart;
pub use parts::TableRowPart;
pub use parts::TableCellPart;
pub use parts::CorePropertiesPart;
pub use parts::AppPropertiesPart;
pub use parts::ContentTypesPart;
pub use parts::Relationships;
pub use web2ppt::Web2Ppt;
pub use web2ppt::WebFetcher;
pub use web2ppt::WebParser;
pub use web2ppt::WebContent;
pub use web2ppt::ContentBlock;
pub use web2ppt::ContentType as WebContentType;
pub use web2ppt::Web2PptConfig;
pub use web2ppt::ConversionOptions;
pub use web2ppt::Web2PptError;
pub use web2ppt::html_to_pptx;
pub use web2ppt::html_to_pptx_with_options;
pub use web2ppt::url_to_pptx;
pub use web2ppt::url_to_pptx_with_options;

Modules§

api
Public API module
cli
CLI module for PPTX tool
config
Configuration module - centralized settings
constants
Global constants - no hardcoding
core
Core traits and types for pptx-rs
elements
Unified PPTX element types
enums
Enumeration types for pptx library
exc
Exception types for pptx library
export
Export functionality
generator
PPTX file generator - creates proper ZIP-based PPTX files
import
integration
Integration module - connects all PPTX components
opc
OPC (Open Packaging Convention) package handling
oxml
OXML (Office XML) element handling
parts
Package parts module
prelude
Prelude module for easy imports
shared
Objects shared by pptx modules
templates
Template module for common presentation types
types
Abstract types and traits used by pptx library
util
Utility functions and types for length conversions
web2ppt
Web2PPT - Convert webpages to PowerPoint presentations

Macros§

pptx
Quick presentation builder macro
shape
Quick shape creation

Constants§

VERSION