Page 1 of 1

Export vector graphics v05

Posted: Mon Sep 11, 2017 12:01 am
by capellan
Hi All,

This download is an update to a stack posted 10 years ago in the mail list.

This stack exports all vector graphics pasted in the first card as PDF, Adobe Ilustrator (v7) or SVG.
Please test first if you could open every type of file produced by this stack.

Before pasting your graphics, export all included graphics as PDF, Adobe Ilustrator and SVG and open these files using programs installed in your computer or tablet.

After you verify that files exported by this stack open correctly, you are ready to delete all included graphics and paste your own graphics on the first card. Report any errors, read the source code and include your own improvements. I hope that one of you become motivated enough and helps in the creation of code that exports gradients in each format (or just for svg format)

By the way, only latest Inkscape versions (0.92 and later) could edit correctly these exported svg. Previous Inkscape versions do not understand how to handle polylines and polygons...

Compressed stack
(58.98 KiB) Downloaded 71 times

Re: Export vector graphics v05

Posted: Fri Sep 22, 2017 3:25 pm
by MaxV
quait all mi programs get this bugged image from the SVG, also firefox:

Re: Export vector graphics v05

Posted: Sat Sep 23, 2017 6:36 pm
by capellan
Hi Max,

I think that you found a bug! :oops:
Compare your own svg file with the svg attached to this post.
Please include the zipped svg file in a post in this forum thread
to compare with files exported correctly.

Does exporting as pdf and adobe ilustrator produce the same problem?

By the way, Which OS and Livecode version are you using?
I used LC 8.1.3 and LC 6.7.1 in Windows to create all 3 zipped
svg, pdf and ai. Svg file exported from LiveCode is editable
using Inkscape v 0.92

vector2export svg output.PNG
Vector2export svg output in Firefox
Compressed folder with sample svg, pdf and ai files exported from LiveCode
(70.21 KiB) Downloaded 58 times

Re: Export vector graphics v05

Posted: Mon Sep 25, 2017 10:17 am
by MaxV
I added the SVG I obtainied with livecode 9.

Re: Export vector graphics v05

Posted: Tue Sep 26, 2017 3:15 am
by capellan
I tested the stack in LC9 under Windows and produces an strange error. Looks like the script could not find the same group that is referenced at the beginning of the handler... :shock:

Until LC find the cause of this error, try this new version that allows to copy the converted graphics to the clipboard and/or save them as a file.

Just notice the following: If you need to copy your graphics as PDF into the clipboard, select the option "PDF" and one
of the following options: "No encoding" or "Ascii85Encode" or "AsciiHexEncode". Do not select "FlateEncode".

Only then you could copy the PDF into the clipboard and paste it into a text or hex editor. From this other program, you could save this new file as pdf.

SVG and Adobe Ilustrator are already plain text file formats, unlike PDFs that could contain binary data.

Please test this new version 06 and report back any new error that you find.

Compressed stack
(83.35 KiB) Downloaded 68 times