All Questions
710
questions
0
votes
0
answers
35
views
SVG to PNG in Laravel makes jagged/crisped edges of product
if ($extension === 'svg') {
$svgIsWorking = env('SVG_ACTIVATED', true);
$fileNamePngSvg = 'shape_' . str_replace('_svg', '', $type) . '.png';
$command = 'rsvg-convert "' . $...
2
votes
0
answers
22
views
PHP + Imagick - how to convert Magick Vector Graphics (MVG) output to SVG?
I'm using the Imagick extension to draw line art illustrations and saw that the ImagickDraw::setVectorGraphics method can be used to output images as a vector artwork file rather than pixel data. ...
1
vote
2
answers
155
views
Save QR-Code as an Image on Server-Side with Javascript/PHP
I am working on a small project where I need to generate QR code and logo inside. I need to save generated QR code in PNG or JPEG format. Below code is working fine if I use svg format. But I want to ...
1
vote
0
answers
11
views
How to set image in axis text in SVGGraph?
I am trying to add the image in axis text. I am using RadarGraph from SVGGraph library.
I am not able to find a solution for that.
What I tried
I found an option axis_text_callback_x but I am not ...
1
vote
1
answer
78
views
WordPress Menu - SVG <path> Animation on Menu Items
I'm making a menu in WordPress and a question arose: is it possible to embed SVG code in the menu items so that when clicked on them, the <path> animation is triggered?
In the example below, the ...
0
votes
0
answers
20
views
How do I link an image in a svg file in wordpress? [duplicate]
I'm trying to use a svg file that contains a vector and an image, the problem however is that the linked image in the svg won't load. The vector part of the svg is loading however. I figure the ...
1
vote
1
answer
57
views
Include svg in another php generated svg
I am using php to return an svg image based on availability of devices in my network.
The generated svg initially included a background color and three lines of text. This all works well if I use the ...
0
votes
0
answers
22
views
How do I extract the height and width of an object from the matrix values in an SVG file?
How do I determine the width and height of this object? I would prefer to do it with PHP, but JavaScript is ok as well.
<g
id="g1538">
<path
id="path1529"
...
1
vote
1
answer
199
views
Scale SVG with path and pass to mPdf
Hello I've got problem with SVG.
First I put SVG into HTML and by input type radio, user can scale this SVG (add style attribute with width in % values). But when I send this to mpdf (SVGs in JSON) it ...
2
votes
0
answers
838
views
How to Convert SVG Images to PNG without Loosing Dimensions Using PHP
I tried to convert a SVG image to PNG using meyfa/php-svg PHP Library.
Here is the code
<?php
require __DIR__ . '/vendor/autoload.php';
use SVG\SVG;
$image = SVG::fromFile('new.svg');
$doc = $...
1
vote
3
answers
255
views
Wordpress shortcode function for generating svg icons
I have created a Wordpress function called svg_icon(), to print/echo inline svg icons.
I want to print an inline svg based on an array's key and attributes.
Here is my function code
function svg_icon($...
0
votes
1
answer
179
views
How to convert an SVG into PNG in PHP without losing written text
I am trying to convert an SVG to a PNG file in PHP. In my SVG, there is some text written that is lost during my convertion process. I use Imagick for that purpose and would rather stay on that ...
0
votes
1
answer
69
views
EasySVG library php addText function problems with locating the text
i have misunderstanding about locating the text in svg file via EasySVG.
I have an image in svg format 1200x1400px.
I need to put the text to place by setting coordinates.
require '../../lib/easysvg/...
0
votes
1
answer
67
views
svg Size Resizing dynamically with screen size
i like to make a svg and change size when the screen is change in php file .
I tried putting a php variable in the size of the svg which worked but I couldn't bind it to the screen size
2
votes
2
answers
1k
views
How to properly show generated SVG from PHP
I am generating svg qr codes via php and getting result in php file the following code:
generate-svg.php
<?
include("../qrcode/qrlib.php");
QRcode::svg('Example');
?>
And I see in ...