1

I receive a pdf. This PDF was generated with Adobe Illustrator CC 22.0 (Windows) Adobe PDF library 15.00.

I use Inkscape to extract a particular page and I copy one particular object (a white dot) into a new SVG. I create two circles one red and one black and I paste this object on this inkscape file.

screenshot of inkscape with object added

I export the image to a png and I get the result I want:

png export works as described

But if I open the svg in image viewer (ubuntu) the white dot is missing. If I export to PDF the dot is also missing. If I save the file as a plain SVG and open it up with inkscape the white dot is still there.

Opening the svg file with a text editor shows:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
   xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:cc="http://creativecommons.org/ns#"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:xlink="http://www.w3.org/1999/xlink"
   id="svg3934"
   version="1.1"
   viewBox="0 0 210 297"
   height="297mm"
   width="210mm">
  <defs
     id="defs3928">
    <linearGradient
       gradientUnits="userSpaceOnUse"
       y2="406.28201"
       x2="912.17798"
       y1="406.28201"
       x1="896.59399"
       id="linearGradient3744"
       xlink:href="#linearGradient3742" />
    <linearGradient
       osb:paint="solid"
       id="linearGradient3742">
      <stop
         id="stop3740"
         offset="0"
         style="stop-color:#ffffff;stop-opacity:1;" />
    </linearGradient>
    <clipPath
       id="clipPath4748"
       clipPathUnits="userSpaceOnUse">
      <path
         id="path4746"
         d="m 896.594,401.404 12.671,-2.914 2.913,12.67 -12.669,2.914 z" />
    </clipPath>
    <mask
       id="mask4776"
       height="1"
       width="1"
       y="0"
       x="0"
       maskUnits="userSpaceOnUse">
      <g
         id="g4800">
        <g
           id="g4798"
           clip-path="url(#clipPath4756)">
          <path
             id="path4778"
             style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
             d="m 893.191,417.478 h 22.39 v -22.39 h -22.39 z" />
          <g
             id="g4796">
            <g
               id="g4780" />
            <g
               id="g4794">
              <g
                 id="g4792"
                 clip-path="url(#clipPath4760)">
                <g
                   id="g4790">
                  <g
                     id="g4788"
                     clip-path="url(#clipPath4764)">
                    <g
                       id="g4786">
                      <g
                         id="g4784">
                        <path
                           id="path4782"
                           style="fill:url(#radialGradient4774);stroke:none"
                           d="m 915.581,413.291 -18.203,4.187 -4.187,-18.205 18.205,-4.185 z" />
                      </g>
                    </g>
                  </g>
                </g>
              </g>
            </g>
          </g>
        </g>
      </g>
    </mask>
    <clipPath
       id="clipPath4756"
       clipPathUnits="userSpaceOnUse">
      <path
         id="path4754"
         d="m 893.191,417.477 h 22.39 v -22.389 h -22.39 z" />
    </clipPath>
    <clipPath
       id="clipPath4760"
       clipPathUnits="userSpaceOnUse">
      <path
         id="path4758"
         d="m 893.191,417.478 h 22.39 v -22.39 h -22.39 z" />
    </clipPath>
    <clipPath
       id="clipPath4764"
       clipPathUnits="userSpaceOnUse">
      <path
         id="path4762"
         d="m 915.581,413.291 -18.203,4.187 -4.187,-18.205 18.205,-4.185 z" />
    </clipPath>
    <radialGradient
       id="radialGradient4774"
       spreadMethod="pad"
       gradientTransform="matrix(-6.3318343,1.4561409,1.4561409,6.3318343,904.38672,406.28223)"
       gradientUnits="userSpaceOnUse"
       r="1"
       cy="0"
       cx="0"
       fy="0"
       fx="0">
      <stop
         id="stop4766"
         offset="0"
         style="stop-opacity:1;stop-color:#ffffff" />
      <stop
         id="stop4768"
         offset="0.522802"
         style="stop-opacity:1;stop-color:#ffffff" />
      <stop
         id="stop4770"
         offset="0.811692"
         style="stop-opacity:1;stop-color:#231f20" />
      <stop
         id="stop4772"
         offset="1"
         style="stop-opacity:1;stop-color:#231f20" />
    </radialGradient>
    <clipPath
       id="clipPath4808"
       clipPathUnits="userSpaceOnUse">
      <path
         id="path4806"
         d="m 893.191,417.477 h 22.39 v -22.389 h -22.39 z" />
    </clipPath>
    <clipPath
       id="clipPath4812"
       clipPathUnits="userSpaceOnUse">
      <path
         id="path4810"
         d="m 915.581,413.291 -18.203,4.187 -4.187,-18.205 18.205,-4.185 z" />
    </clipPath>
    <linearGradient
       y2="406.28201"
       x2="912.17798"
       y1="406.28201"
       x1="896.59399"
       gradientUnits="userSpaceOnUse"
       id="linearGradient4627"
       xlink:href="#linearGradient3742" />
    <linearGradient
       y2="406.28201"
       x2="912.17798"
       y1="406.28201"
       x1="896.59399"
       gradientUnits="userSpaceOnUse"
       id="linearGradient4629"
       xlink:href="#linearGradient3742" />
    <linearGradient
       y2="406.28201"
       x2="912.17798"
       y1="406.28201"
       x1="896.59399"
       gradientUnits="userSpaceOnUse"
       id="linearGradient4631"
       xlink:href="#linearGradient3742" />
    <linearGradient
       y2="406.28201"
       x2="912.17798"
       y1="406.28201"
       x1="896.59399"
       gradientUnits="userSpaceOnUse"
       id="linearGradient4633"
       xlink:href="#linearGradient3742" />
    <linearGradient
       y2="406.28201"
       x2="912.17798"
       y1="406.28201"
       x1="896.59399"
       gradientUnits="userSpaceOnUse"
       id="linearGradient4635"
       xlink:href="#linearGradient3742" />
    <linearGradient
       y2="406.28201"
       x2="912.17798"
       y1="406.28201"
       x1="896.59399"
       gradientUnits="userSpaceOnUse"
       id="linearGradient4637"
       xlink:href="#linearGradient3742" />
    <linearGradient
       y2="406.28201"
       x2="912.17798"
       y1="406.28201"
       x1="896.59399"
       gradientUnits="userSpaceOnUse"
       id="linearGradient4639"
       xlink:href="#linearGradient3742" />
    <linearGradient
       y2="406.28201"
       x2="912.17798"
       y1="406.28201"
       x1="896.59399"
       gradientUnits="userSpaceOnUse"
       id="linearGradient4641"
       xlink:href="#linearGradient3742" />
    <linearGradient
       y2="406.28201"
       x2="912.17798"
       y1="406.28201"
       x1="896.59399"
       gradientUnits="userSpaceOnUse"
       id="linearGradient4643"
       xlink:href="#linearGradient3742" />
    <linearGradient
       y2="406.28201"
       x2="912.17798"
       y1="406.28201"
       x1="896.59399"
       gradientUnits="userSpaceOnUse"
       id="linearGradient4645"
       xlink:href="#linearGradient3742" />
    <linearGradient
       y2="406.28201"
       x2="912.17798"
       y1="406.28201"
       x1="896.59399"
       gradientUnits="userSpaceOnUse"
       id="linearGradient4647"
       xlink:href="#linearGradient3742" />
    <linearGradient
       y2="406.28201"
       x2="912.17798"
       y1="406.28201"
       x1="896.59399"
       gradientUnits="userSpaceOnUse"
       id="linearGradient4649"
       xlink:href="#linearGradient3742" />
  </defs>
  <metadata
     id="metadata3931">
    <rdf:RDF>
      <cc:Work
         rdf:about="">
        <dc:format>image/svg+xml</dc:format>
        <dc:type
           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
        <dc:title></dc:title>
      </cc:Work>
    </rdf:RDF>
  </metadata>
  <g
     id="layer1">
    <g
       style="fill:url(#linearGradient3744);fill-opacity:1"
       transform="matrix(0.64499146,0,0,-0.64499146,-475.97601,383.66747)"
       id="g4742">
      <g
         style="fill:url(#linearGradient4649);fill-opacity:1"
         clip-path="url(#clipPath4748)"
         id="g4744">
        <g
           style="fill:url(#linearGradient4647);fill-opacity:1"
           id="g4750">
          <g
             style="fill:url(#linearGradient4627);fill-opacity:1"
             id="g4752" />
          <g
             style="fill:url(#linearGradient4645);fill-opacity:1"
             mask="url(#mask4776)"
             id="g4802">
            <g
               style="fill:url(#linearGradient4629);fill-opacity:1"
               id="g4804" />
            <g
               style="fill:url(#linearGradient4643);fill-opacity:1"
               id="g4836">
              <g
                 style="fill:url(#linearGradient4641);fill-opacity:1"
                 id="g4834"
                 clip-path="url(#clipPath4808)">
                <g
                   style="fill:url(#linearGradient4639);fill-opacity:1"
                   id="g4832">
                  <g
                     style="fill:url(#linearGradient4637);fill-opacity:1"
                     id="g4830"
                     clip-path="url(#clipPath4812)">
                    <g
                       style="fill:url(#linearGradient4635);fill-opacity:1"
                       id="g4828">
                      <g
                         style="fill:url(#linearGradient4633);fill-opacity:1"
                         id="g4826">
                        <path
                           id="path4824"
                           style="fill:url(#linearGradient4631);fill-opacity:1;stroke:none"
                           d="m 915.581,413.291 -18.203,4.187 -4.187,-18.205 18.205,-4.185 z" />
                      </g>
                    </g>
                  </g>
                </g>
              </g>
            </g>
          </g>
        </g>
      </g>
    </g>
  </g>
</svg>
  • 1
    The code snippet only contains the mysterious white done. Not the mentioned black and red dot. – Andres Sep 28 '18 at 12:52
  • 1
    Hi. Welcome to GDSE. Which SVG image viewer and PDF viewer are you using? Try viewing the SVG in a web browser, and try viewing the PDF in Adobe Reader. – Billy Kerr Sep 28 '18 at 12:58
  • 1
    The current Inkscape version has some issues with exporting masked and clipped objects to pdf. For that object, which is just a rectangle with a radial gradient - I'd just draw it. Or I'd even improve it, by using a circle, which won't have that strange haze around it (if that's not intended). It's so simple, there's no need to go through any hoops. Or, if you have time, you could remove all clips and masks (there are at least 5 of them, totally useless) and all those groups, they aren't needed at all. Then change the color of the mask path with the gradient. – Moini Sep 28 '18 at 22:39
  • @BillyKerr I I using ubuntu. I opened the SVG on chrome, firefox and the gnome image viewer. None show the spot. The file converted to pdf was opened with evince. I do not have adobeReader installed (not easily available in gnu/linux platforms) so cannot view it. – Andres Sep 30 '18 at 15:54
  • @Moini thank you for the work around, but this is a simplified example so reproducing it might not be as easy in this case. Given that I get many of these I would like some easier process. But I would be happy if you want to post that as an answer at the moment (it would be the best option at the moment). – Andres Sep 30 '18 at 15:57

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.