We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Problems with SVG Images with xlink:href=data:image/svg+xml

Hi Support,

I have an SVG that is generated by using an Javascript library containing <image xlink:href=“data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2 … XXXXXXXXXXXX”.

This content is missing when embedded into PDF.

Any pointers here is very much appreciated.

@raghavendralr

To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input document.
  • Please attach the output file that shows the undesired behavior.
  • Please attach the expected output file that shows the desired behavior.
  • Please create a sample application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.

Hi Thahir,

I do not see an option to attach the resources to this post.

@raghavendralr

Please use the upload button as shown in attached image to upload the documents. image.png (17.7 KB)

test_image.zip (103.8 KB)

Please find requested details

  • Your input document
    test_image.svg

  • Please attach the output file that shows the undesired behavior
    attached (its empty pdf)

  • Please attach the expected output file that shows the desired behavior
    Svg has to be converted to an image and embeded with right resolution

  • Please create a sample application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing.
    string fileDir = Environment.CurrentDirectory + Path.DirectorySeparatorChar;
    string fileName = “AddImageStamp.pdf”;
    Document pdfDocument = new Document();
    pdfDocument.Pages.Add();

          Aspose.Pdf.Image image1 = new Aspose.Pdf.Image();
          image1.File = fileDir + "test_image.svg";
          image1.FixHeight = 100;
          image1.FixWidth = 100;
          image1.FileType = Aspose.Pdf.ImageFileType.Svg;
    
          pdfDocument.Pages[1].Paragraphs.Add(image1);
    
          pdfDocument.Save(fileDir + fileName);

@raghavendralr

We have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as PDFNET-51113. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hi,

Do you have an update on this issue? any ETA when it could be fixed?

@raghavendralr

Currently, your issue is pending for analysis and is in the queue. Once we complete the analysis of your issue, we will then be able to provide you an estimate.

Do you have any updates for me here?

@raghavendralr

Unfortunately, there is no update available on your issue at the moment. We will be sure to inform you via this forum thread once there is an update available on it.