alafr / SVG-to-PDFKit

Insert SVG into a PDF document created with PDFKit
MIT License
404 stars 115 forks source link

Elements not grouped properly when opening PDF file with Adobe illustrator #132

Closed naeem-brikl closed 3 years ago

naeem-brikl commented 3 years ago

SVG SVG

PDF Screen Shot 2020-11-18 at 11 32 17

SVG text for testing

<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
     viewBox="0 0 803 515" style="enable-background:new 0 0 803 515;" xml:space="preserve">
<style type="text/css">
    .st0{font-family:'ArialMT';}
    .st1{font-size:52.72px;}
</style>
<title>CMYK BOX</title>
<g id="GROUP2">
    <rect x="41" y="285" width="223" height="194" fill="cmyk(90, 55, 0, 0)"/>
    <text transform="matrix(1 0 0 1 291.32 329.53)" class="st0 st1" fill="cmyk(90, 55, 0, 0)">THIS SHOULD BE BLUE</text>
</g>
<g id="GROUP1">
    <rect x="41" y="37" width="223" height="194"  fill="cmyk(0, 85, 65, 0)"/>
    <text transform="matrix(1 0 0 1 291.32 80.53)" class="st0 st1"  fill="cmyk(0, 85, 65, 0)">THIS SHOULD BE RED</text>
</g>
</svg>