Plans for extending SVG conversion?

Just wondering if you have plans to extend SVG conversion to support embedded image conversion?

Our one test shows you don’t handle that part of SVG at the moment.

meber:
Just wondering if you have plans to extend SVG conversion to support embedded image conversion?
Hi Michael,

Thanks for contacting support. Can you please share some further details regarding your requirement, as I am afraid I am unable to completely understand them.

PS, Currently Aspose.Pdf for .NET supports the feature to convert SVG files to PDF format.

We are currently using Aspose.pdf to convert SVG images.


We began implementing a new requirement placing a screenshot image as background from our architectural design program, then dropping SVG objects on top of it.

When we run through the conversion we get the SVG objects and no image.

Here is a test file that should convert but does not.

Hi Michael,


Thanks for sharing the resource files.

I have tested the scenario where I have used the following code snippet to convert SVG file to PDF format and I am able to see the background image in resultant PDF. For your reference, I have also attached the resultant PDF file generated over my end.

In case I am not able to understand your requirement, please share some further details.

[C#]

// Instantiate LoadOption object using
SVG load option
<o:p></o:p>

Aspose.Pdf.LoadOptions loadopt = new Aspose.Pdf.SvgLoadOptions();

// Create Document object

Aspose.Pdf.Document doc = new Aspose.Pdf.Document(@"C:\pdftest\test.svg", loadopt);

// Save the resultant PDF document

doc.Save(@“C:\pdftest\test-converted.pdf”);

Very interesting. Your attached file DOES NOT have the background image in it. In fact it has the same thing that we have in our file: just a gray box and nothing else. So how can you say you are seeing the background image??? And while my code is different it is basically the same as yours:


static void Main(string[] args)
{
LoadOptions options = new SvgLoadOptions();
string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, “test.svg”);
Document pdf = new Document(File.OpenRead(path), options);
using ( FileStream strm = File.Create(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, “test.pdf”)))
{
pdf.Save(strm);
}
}

Hi Michael,


Thanks for sharing the details.

In my earlier attempt, I did not open the source SVG file inside any viewer and thought that gray rectangle is the background image which you have placed inside SVG file and therefore I wanted to have your comments/feedback. However, for
the sake of correction, I have logged it in our issue tracking system as
PDFNEWNET-35614. We
will investigate this issue in details and will keep you updated on the status
of a correction.

We apologize for this confusion and inconvenience.

The attached image is what it SHOULD look like. :slight_smile:

Hi there,


Thank you for sharing additional information. We’ve noted and also shared desired output with development team, definitely it will help us to fix the issue. We’ll keep you updated about the issue progress via this forum thread.

Sorry for the inconvenience faced.

Best Regards,

The issues you have found earlier (filed as PDFNEWNET-35614) have been fixed in Aspose.Pdf for .NET 9.4.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Hi there,


Thanks for your patience. As stated above your reported issue (PDFNEWNET-35614) has been fixed in Aspose.Pdf for .NET 9.4.0. Please check following code snippet for the purpose.

SvgLoadOptions options = new SvgLoadOptions();<o:p></o:p>

options.ConversionEngine = SvgLoadOptions.ConversionEngines.NewEngine;<o:p></o:p>

string inFile = @“35614.svg”;<o:p></o:p>

string outFile = @“35614.pdf”;<o:p></o:p>

Document pdfDocument = new Document(inFile, options);<o:p></o:p>

pdfDocument.Save(outFile);

Please feel free to contact us for any further assistance.

Best Regards,