I would like to create a .mvg file use shell_exec() and ImageMagick.
My php code produces an empty .mvg file. However if I use print() then copy/paste it through a command line, the correct .mvg file is created!
I realize that this is more of a php question than an ImageMagick question but I thought this was the best place for it.
Thanks!
Code: Select all
<?php
function make_button_mvg ($text, $fontSize, $fontColor, $bgcolor, $borderColor)
{
print ("convert -background transparent -fill transparent -pointsize " . escapeshellarg($fontSize + 2) . " label:" . escapeshellarg($text) . " -format " . escapeshellarg('viewbox 0 0 %[fx:w+7] %[fx:h+7] fill red roundRectangle 1,1 %[fx:w+5] %[fx:h+5] 5,5') . " info: > rounded_corner.mvg");
shell_exec ("convert -background transparent -fill transparent -pointsize " . escapeshellarg($fontSize + 2) . " label:" . escapeshellarg($text) . " -format " . escapeshellarg('viewbox 0 0 %[fx:w+7] %[fx:h+7] fill red roundRectangle 1,1 %[fx:w+5] %[fx:h+5] 5,5') . " info: > rounded_corner.mvg");
}
?>