LibreOffice Draw
Overview
LibreOffice Draw skill for creating, editing, converting, and automating vector graphics and diagram workflows using the native ODG (OpenDocument Drawing) format.
When to Use This Skill
Use this skill when:
- Creating vector graphics and diagrams in ODG format
- Converting between ODG, SVG, PDF, PNG formats
- Automating diagram and flowchart generation
- Creating technical drawings and schematics
- Batch processing graphics operations
Core Capabilities
1. Graphics Creation
- Create new ODG drawings from scratch
- Generate diagrams from templates
- Create flowcharts and org charts
- Design technical drawings
2. Format Conversion
- ODG to other formats: SVG, PDF, PNG, JPG
- Other formats to ODG: SVG, PDF
- Batch conversion of multiple files
3. Diagram Automation
- Template-based diagram generation
- Automated flowchart creation
- Dynamic shape generation
- Batch diagram production
4. Graphics Manipulation
- Shape creation and manipulation
- Path and bezier curve editing
- Layer management
- Text and label insertion
5. Integration
- Command-line automation via soffice
- Python scripting with UNO
- Integration with workflow tools
Workflows
Creating a New Drawing
Method 1: Command-Line
soffice --draw template.odg
Method 2: Python with UNO
import uno
def create_drawing():
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.drawing.DrawingDocument", ctx)
page = doc.getDrawPages().getByIndex(0)
doc.storeToURL("file:///path/to/drawing.odg", ())
doc.close(True)
Converting Drawings
# ODG to SVG
soffice --headless --convert-to svg drawing.odg
# ODG to PDF
soffice --headless --convert-to pdf drawing.odg
# ODG to PNG
soffice --headless --convert-to png:PNG_drawing drawing.odg
# SVG to ODG
soffice --headless --convert-to odg drawing.svg
# Batch convert
for file in *.odg; do
soffice --headless --convert-to pdf "$file"
done
Format Conversion Reference
Supported Input Formats
Supported Output Formats
- ODG, SVG, PDF, PNG, JPG, GIF, BMP, WMF, EMF
Command-Line Reference
soffice --headless
soffice --headless --convert-to <format> <file>
soffice --draw # Draw
Python Libraries
pip install ezodf # ODF handling
pip install odfpy # ODF manipulation
pip install svgwrite # SVG generation
Best Practices
- Use layers for organization
- Create templates for recurring diagrams
- Use vector formats for scalability
- Name objects for easy reference
- Store ODG source files in version control
- Test conversions thoroughly
- Export to SVG for web use
Troubleshooting
Cannot open socket
killall soffice.bin
soffice --headless --accept="socket,host=localhost,port=8100;urp;"
Quality Issues in PNG Export
soffice --headless --convert-to png:PNG_drawing_Export \
--filterData='{"Width":2048,"Height":2048}' drawing.odg
Resources
Related Skills
- writer
- calc
- impress
- base
- 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: draw3description: "Vector graphics and diagram creation, format conversion (ODG/SVG/PDF) with LibreOffice Draw."4category: graphics-processing5risk: safe6source: personal7date_added: "2026-02-27"8metadata:9 source: https://skillmd.com/skills/mhassan0000/draw10---1112# LibreOffice Draw1314## Overview1516LibreOffice Draw skill for creating, editing, converting, and automating vector graphics and diagram workflows using the native ODG (OpenDocument Drawing) format.1718## When to Use This Skill1920Use this skill when:21- Creating vector graphics and diagrams in ODG format22- Converting between ODG, SVG, PDF, PNG formats23- Automating diagram and flowchart generation24- Creating technical drawings and schematics25- Batch processing graphics operations2627## Core Capabilities2829### 1. Graphics Creation30- Create new ODG drawings from scratch31- Generate diagrams from templates32- Create flowcharts and org charts33- Design technical drawings3435### 2. Format Conversion36- ODG to other formats: SVG, PDF, PNG, JPG37- Other formats to ODG: SVG, PDF38- Batch conversion of multiple files3940### 3. Diagram Automation41- Template-based diagram generation42- Automated flowchart creation43- Dynamic shape generation44- Batch diagram production4546### 4. Graphics Manipulation47- Shape creation and manipulation48- Path and bezier curve editing49- Layer management50- Text and label insertion5152### 5. Integration53- Command-line automation via soffice54- Python scripting with UNO55- Integration with workflow tools5657## Workflows5859### Creating a New Drawing6061#### Method 1: Command-Line62```bash63soffice --draw template.odg64```6566#### Method 2: Python with UNO67```python68import uno6970def create_drawing():71 local_ctx = uno.getComponentContext()72 resolver = local_ctx.ServiceManager.createInstanceWithContext(73 "com.sun.star.bridge.UnoUrlResolver", local_ctx74 )75 ctx = resolver.resolve(76 "uno:socket,host=localhost,port=8100;urp;StarOffice.ComponentContext"77 )78 smgr = ctx.ServiceManager79 doc = smgr.createInstanceWithContext("com.sun.star.drawing.DrawingDocument", ctx)80 page = doc.getDrawPages().getByIndex(0)81 doc.storeToURL("file:///path/to/drawing.odg", ())82 doc.close(True)83```8485### Converting Drawings8687```bash88# ODG to SVG89soffice --headless --convert-to svg drawing.odg9091# ODG to PDF92soffice --headless --convert-to pdf drawing.odg9394# ODG to PNG95soffice --headless --convert-to png:PNG_drawing drawing.odg9697# SVG to ODG98soffice --headless --convert-to odg drawing.svg99100# Batch convert101for file in *.odg; do102 soffice --headless --convert-to pdf "$file"103done104```105106## Format Conversion Reference107108### Supported Input Formats109- ODG (native), SVG, PDF110111### Supported Output Formats112- ODG, SVG, PDF, PNG, JPG, GIF, BMP, WMF, EMF113114## Command-Line Reference115116```bash117soffice --headless118soffice --headless --convert-to <format> <file>119soffice --draw # Draw120```121122## Python Libraries123124```bash125pip install ezodf # ODF handling126pip install odfpy # ODF manipulation127pip install svgwrite # SVG generation128```129130## Best Practices1311321. Use layers for organization1332. Create templates for recurring diagrams1343. Use vector formats for scalability1354. Name objects for easy reference1365. Store ODG source files in version control1376. Test conversions thoroughly1387. Export to SVG for web use139140## Troubleshooting141142### Cannot open socket143```bash144killall soffice.bin145soffice --headless --accept="socket,host=localhost,port=8100;urp;"146```147148### Quality Issues in PNG Export149```bash150soffice --headless --convert-to png:PNG_drawing_Export \151 --filterData='{"Width":2048,"Height":2048}' drawing.odg152```153154## Resources155156- [LibreOffice Draw Guide](https://documentation.libreoffice.org/)157- [UNO API Reference](https://api.libreoffice.org/)158- [SVG Specification](https://www.w3.org/TR/SVG/)159160## Related Skills161162- writer163- calc164- impress165- base166- workflow-automation167168## Limitations169- Use this skill only when the task clearly matches the scope described above.170- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.171- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.