Does Aspose.PDF support this?
Aspose.Pdf for .NET supports the feature to convert add SVG image to PDF file and it also provides the capabilities to Add SVG Object to Table Cell. But I am afraid currently it does not support the feature to use SVG as StampAnnotation. However as a workaround, you may consider Converting SVG To Raster Format using Aspose.Imaging for .NET and then Add Image Stamp in PDF File using Aspose.Pdf for .NET.
ok thank you for the info.
I also need this, 4 years later what is the status of this demand ?
im afraid this may not even be possible for them since they need to add more libraries for image processing.
what i did was use 3rd party libraries that output svg to inputstream, then you use that to pass to stamp annotation.
We thank you for your patience and would like to share with you that support of SVG image in StampAnnotation was added in the API. Please use following code snippet with Aspose.PDF for .NET 20.12 and let us know if you still face any issue:
Document doc = new Document(); doc.Pages.Add(); Aspose.Pdf.Annotations.StampAnnotation stamp = new Aspose.Pdf.Annotations.StampAnnotation(doc.Pages, new Aspose.Pdf.Rectangle(10,10,100,100)); stamp.Image = new FileStream("input.svg", FileMode.Open); doc.Pages.Annotations.Add(stamp); doc.Save("stampannotation.pdf");
The stream can be a svg file, but at the end, in the pdf, it will be transformed into a bitmap.
That’s not what I expected. I need to pass an svg and save it in the pdf as an svg to keep the quality.
We will surely investigate the feasibility of your requirements. However, could you please provide a sample SVG file along with expected output PDF. We will test the scenario in our environment and address it accordingly.