Comments (7)
Could the desktop version command line not be used, instead?
from draw-image-export2.
Could the desktop version command line not be used, instead?
I'm trying to display a SVG image within a webpage, so wouldn't be possible without another service running somewhere.
from draw-image-export2.
Could the desktop version command line not be used, instead?
Is this possible ? Is the CLI described somewhere ? I'm looking to programmatically convert .drawio files to .svg (or even .png) ones. However I have found little to no document about how to do this.
from draw-image-export2.
draw.io --help
Usage: draw [options] [input file/folder]
Options:
-V, --version output the version number
-c, --create creates a new empty file if no file is
passed
-k, --check does not overwrite existing files
-x, --export export the input file/folder based on the
given options
-r, --recursive for a folder input, recursively convert
all files in sub-folders also
-o, --output <output file/folder> specify the output file/folder. If
omitted, the input file name is used for
output with the specified format as
extension
-f, --format if output file name extension is
specified, this option is ignored (file
type is determined from output extension,
possible export formats are pdf, png, jpg,
svg, vsdx) (default: "pdf")
-q, --quality output image quality for JPEG (default:
90)
-t, --transparent set transparent background for PNG
-e, --embed-diagram includes a copy of the diagram (for PNG
format only)
-b, --border sets the border width around the diagram
(default: 0)
-s, --scale scales the diagram size
--width fits the generated image/pdf into the
specified width, preserves aspect ratio.
--height fits the generated image/pdf into the
specified height, preserves aspect ratio.
--crop crops PDF to diagram size
-a, --all-pages export all pages (for PDF format only)
-p, --page-index selects a specific page, if not specified
and the format is an image, the first page
is selected
-g, --page-range .. selects a page range (for PDF format only)
-h, --help display help for command
from draw-image-export2.
Thank you. Is there a way do it using node only instead of the full electron build ?
from draw-image-export2.
FYI - I have built a docker container that exposes drawio Desktop (including the SVG export capability) as a RESTful API:
https://hub.docker.com/r/tomkludy/drawio-renderer
Hopefully this can be of help to others; it is already functioning in my own build pipeline.
from draw-image-export2.
Thanks for the suggestion. Unfortunately, we're not going to implement this. The problem we've been seeing with feature that we implement but don't actively use is the code just rots and breaks. @tomkludy 's solution looks like a good workaround.
from draw-image-export2.
Related Issues (13)
- How to use draw-image-export2 to convert a diagram to png or pdf? HOT 4
- PDF Generation issue HOT 1
- CPU count detection works wrong HOT 1
- npm install fails in node_modules/puppeteer HOT 7
- Render background grid
- Export as PDF with overall shadows (View > Shadow) HOT 1
- Unable to export a specified page when a preceeding page contains brackets in its name HOT 8
- Time stamp placeholder uses server date
- Match desktop command line interface HOT 1
- Error 500 - testing HOT 1
- documentation unclear HOT 3
- On how to use itοΌ
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from draw-image-export2.