draw

Create and convert vector graphics and diagrams in ODG, SVG, and PDF formats with LibreOffice Draw.

Updated Sep 20, 2024
One-click install
npx skills add https://github.com/AnasIsmai1/dotfiles --skill draw-anasismai1
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: draw
Source: https://github.com/AnasIsmai1/dotfiles/tree/main/claude/.claude/skills/libreoffice/draw
Command: npx skills add https://github.com/AnasIsmai1/dotfiles --skill draw-anasismai1

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires ezodf, odfpy, svgwrite.

What problem does it solve? Creating and converting vector graphics, diagrams, and flowcharts manually is slow and hard to automate. This Skill provides command-line and Python UNO workflows for generating ODG drawings and converting between ODG, SVG, PDF, and PNG formats without opening a GUI. ## Core Features & Use Cases - Format Conversion: Convert drawings between ODG, SVG, PDF, PNG, JPG, and other formats using headless soffice commands, including batch conversion of multiple files. - Diagram Automation: Generate flowcharts, org charts, and technical drawings programmatically via the Python UNO API or from templates. - Graphics Manipulation: Create and edit shapes, bezier curves, layers, and text labels within ODG documents. - Use Case: You have 50 ODG diagram files that need to be published as PDFs for a report. Use this Skill to batch-convert them all with a single headless soffice loop. ## Quick Start Convert the file diagram.odg to SVG format using the headless soffice conversion command.

Frequently Asked Questions about draw

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert ODG files to PDF from the command line?▼

Run soffice --headless --convert-to pdf drawing.odg to convert an ODG file to PDF without opening the GUI. For multiple files, loop over them in a shell script and run the same command on each.

How to automate diagram creation with LibreOffice Draw in Python?▼

Use the Python UNO API to connect to a running soffice instance on port 8100, create a DrawingDocument, and manipulate its draw pages programmatically. Start soffice with the --accept socket flag before connecting.

What formats can LibreOffice Draw convert between?▼

LibreOffice Draw accepts ODG, SVG, and PDF as input formats. It can export to ODG, SVG, PDF, PNG, JPG, GIF, BMP, WMF, and EMF using the headless --convert-to flag.

Why does the UNO socket connection fail in LibreOffice?▼

The connection fails when a stale soffice process is running or the listener was never started. Kill existing processes with killall soffice.bin, then restart with soffice --headless --accept="socket,host=localhost,port=8100;urp;".

How do I control PNG export resolution in LibreOffice Draw?▼

Pass filter data with the conversion command, such as --filterData with Width and Height values in pixels, alongside the png:PNG_drawing_Export filter. This sets the output dimensions for the exported image.