Closed iggdrael closed 4 years ago
Please provide sample code or a sample SVG file so we can reproduce the error.
Please provide sample code or a sample SVG file so we can reproduce the error.
g4075 ---> style="fill:#ffffff;fill-opacity:0.99549549;stroke:#ff0000;stroke-width:1.00038028;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill:url(#tartan);"
I think the error comes from "fill:url(#tartan);" because it can't access to the pattern.
object id="vetement" type="image/svg+xml" data="vetement.svg"</object
function svgtopdf(){
var mySVG = document.getElementById("vetement");
const svgDoc = mySVG.contentDocument;
const svgElement = svgDoc.getElementById("g4075"); //The object i want to convert
var margin = 0;
var width = 300;//svgElement.width.baseVal.value + 2 * margin;
var height = 300;//svgElement.height.baseVal.value + 2 * margin;
const pdf = new jsPDF('l', 'mm', [width, height]);
svg2pdf(svgElement, pdf, {xOffset: 0,yOffset: 0,scale: 1});
pdf.save('test.pdf');
}
Other github repos have a label for "good issue reports". This one would require a label "worst issue report ever".
You really need to work on this if you don't want to get banned. Because even if there was someone who could help you with this, the way you reported it, I really don't see how anybody would want to help you.
Please edit the issue and your comments. Fill in the template, adjust the description. Everything.
Describe the bug A clear and concise description of what the bug is. What version are you using (exact version of svg2pdf.js and jspdf - the yWorks fork version, of course)?
To Reproduce Steps to reproduce the behavior:
Expected behavior I would have expected the PDF to look like so. This is in accordance to the following SVG spec
Screenshots If applicable, add screenshots, SVGs, and PDFs to explain the problem
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context Add any other context about the problem here.