LibreOffice Impress
Overview
LibreOffice Impress skill for creating, editing, converting, and automating presentation workflows using the native ODP (OpenDocument Presentation) format.
When to Use This Skill
Use this skill when:
- Creating new presentations in ODP format
- Converting between ODP, PPTX, PDF formats
- Automating slide generation from templates
- Batch processing presentation operations
- Creating presentation templates
Core Capabilities
1. Presentation Creation
- Create new ODP presentations from scratch
- Generate presentations from templates
- Create slide masters and layouts
- Build interactive presentations
2. Format Conversion
- ODP to other formats: PPTX, PDF, HTML, SWF
- Other formats to ODP: PPTX, PPT, PDF
- Batch conversion of multiple files
3. Slide Automation
- Template-based slide generation
- Batch slide creation from data
- Automated content insertion
- Dynamic chart generation
4. Content Manipulation
- Text and image insertion
- Shape and diagram creation
- Animation and transition control
- Speaker notes management
5. Integration
- Command-line automation via soffice
- Python scripting with UNO
- Integration with workflow tools
Workflows
Creating a New Presentation
Method 1: Command-Line
soffice --impress template.odp
Method 2: Python with UNO
import uno
def create_presentation():
local_ctx = uno.getComponentContext()
resolver = local_ctx.ServiceManager.createInstanceWithContext(
"com.sun.star.bridge.UnoUrlResolver", local_ctx
)
ctx = resolver.resolve(
"uno:socket,host=localhost,port=8100;urp;StarOffice.ComponentContext"
)
smgr = ctx.ServiceManager
doc = smgr.createInstanceWithContext("com.sun.star.presentation.PresentationDocument", ctx)
slides = doc.getDrawPages()
slide = slides.getByIndex(0)
doc.storeToURL("file:///path/to/presentation.odp", ())
doc.close(True)
Converting Presentations
# ODP to PPTX
soffice --headless --convert-to pptx presentation.odp
# ODP to PDF
soffice --headless --convert-to pdf presentation.odp
# PPTX to ODP
soffice --headless --convert-to odp presentation.pptx
# Batch convert
for file in *.odp; do
soffice --headless --convert-to pdf "$file"
done
Template-Based Generation
import subprocess
import tempfile
from pathlib import Path
def generate_from_template(template_path, content, output_path):
with tempfile.TemporaryDirectory() as tmpdir:
subprocess.run(['unzip', '-q', template_path, '-d', tmpdir])
content_file = Path(tmpdir) / 'content.xml'
content_xml = content_file.read_text()
for key, value in content.items():
content_xml = content_xml.replace(f'${{{key}}}', str(value))
content_file.write_text(content_xml)
subprocess.run(['zip', '-rq', output_path, '.'], cwd=tmpdir)
return output_path
Format Conversion Reference
Supported Input Formats
- ODP (native), PPTX, PPT, PDF
Supported Output Formats
- ODP, PPTX, PDF, HTML, SWF
Command-Line Reference
soffice --headless
soffice --headless --convert-to <format> <file>
soffice --impress # Impress
Python Libraries
pip install ezodf # ODF handling
pip install odfpy # ODF manipulation
Best Practices
- Use slide masters for consistency
- Create templates for recurring presentations
- Embed fonts for PDF distribution
- Use vector graphics when possible
- Store ODP source files in version control
- Test conversions thoroughly
- Keep file sizes manageable
Troubleshooting
Cannot open socket
killall soffice.bin
soffice --headless --accept="socket,host=localhost,port=8100;urp;"
Resources
Related Skills
- writer
- calc
- draw
- base
- pptx-official
- workflow-automation
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
1---2name: impress3description: Presentation creation, format conversion (ODP/PPTX/PDF), slide automation with LibreOffice Impress. 4category: Document Processing5source: antigravity6tags: [python, pdf, pptx, api, automation, workflow, template, document, presentation, image]7url: https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/libreoffice/impress8metadata:9 source: https://skillmd.com/skills/sickn33/impress10---111213# LibreOffice Impress1415## Overview1617LibreOffice Impress skill for creating, editing, converting, and automating presentation workflows using the native ODP (OpenDocument Presentation) format.1819## When to Use This Skill2021Use this skill when:22- Creating new presentations in ODP format23- Converting between ODP, PPTX, PDF formats24- Automating slide generation from templates25- Batch processing presentation operations26- Creating presentation templates2728## Core Capabilities2930### 1. Presentation Creation31- Create new ODP presentations from scratch32- Generate presentations from templates33- Create slide masters and layouts34- Build interactive presentations3536### 2. Format Conversion37- ODP to other formats: PPTX, PDF, HTML, SWF38- Other formats to ODP: PPTX, PPT, PDF39- Batch conversion of multiple files4041### 3. Slide Automation42- Template-based slide generation43- Batch slide creation from data44- Automated content insertion45- Dynamic chart generation4647### 4. Content Manipulation48- Text and image insertion49- Shape and diagram creation50- Animation and transition control51- Speaker notes management5253### 5. Integration54- Command-line automation via soffice55- Python scripting with UNO56- Integration with workflow tools5758## Workflows5960### Creating a New Presentation6162#### Method 1: Command-Line63```bash64soffice --impress template.odp65```6667#### Method 2: Python with UNO68```python69import uno7071def create_presentation():72 local_ctx = uno.getComponentContext()73 resolver = local_ctx.ServiceManager.createInstanceWithContext(74 "com.sun.star.bridge.UnoUrlResolver", local_ctx75 )76 ctx = resolver.resolve(77 "uno:socket,host=localhost,port=8100;urp;StarOffice.ComponentContext"78 )79 smgr = ctx.ServiceManager80 doc = smgr.createInstanceWithContext("com.sun.star.presentation.PresentationDocument", ctx)81 slides = doc.getDrawPages()82 slide = slides.getByIndex(0)83 doc.storeToURL("file:///path/to/presentation.odp", ())84 doc.close(True)85```8687### Converting Presentations8889```bash90# ODP to PPTX91soffice --headless --convert-to pptx presentation.odp9293# ODP to PDF94soffice --headless --convert-to pdf presentation.odp9596# PPTX to ODP97soffice --headless --convert-to odp presentation.pptx9899# Batch convert100for file in *.odp; do101 soffice --headless --convert-to pdf "$file"102done103```104105### Template-Based Generation106```python107import subprocess108import tempfile109from pathlib import Path110111def generate_from_template(template_path, content, output_path):112 with tempfile.TemporaryDirectory() as tmpdir:113 subprocess.run(['unzip', '-q', template_path, '-d', tmpdir])114 content_file = Path(tmpdir) / 'content.xml'115 content_xml = content_file.read_text()116 for key, value in content.items():117 content_xml = content_xml.replace(f'${{{key}}}', str(value))118 content_file.write_text(content_xml)119 subprocess.run(['zip', '-rq', output_path, '.'], cwd=tmpdir)120 return output_path121```122123## Format Conversion Reference124125### Supported Input Formats126- ODP (native), PPTX, PPT, PDF127128### Supported Output Formats129- ODP, PPTX, PDF, HTML, SWF130131## Command-Line Reference132133```bash134soffice --headless135soffice --headless --convert-to <format> <file>136soffice --impress # Impress137```138139## Python Libraries140141```bash142pip install ezodf # ODF handling143pip install odfpy # ODF manipulation144```145146## Best Practices1471481. Use slide masters for consistency1492. Create templates for recurring presentations1503. Embed fonts for PDF distribution1514. Use vector graphics when possible1525. Store ODP source files in version control1536. Test conversions thoroughly1547. Keep file sizes manageable155156## Troubleshooting157158### Cannot open socket159```bash160killall soffice.bin161soffice --headless --accept="socket,host=localhost,port=8100;urp;"162```163164## Resources165166- [LibreOffice Impress Guide](https://documentation.libreoffice.org/)167- [UNO API Reference](https://api.libreoffice.org/)168169## Related Skills170171- writer172- calc173- draw174- base175- pptx-official176- workflow-automation177178## Limitations179- Use this skill only when the task clearly matches the scope described above.180- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.181- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.