@ahashem,
There is an issue there. I run the following code in C#:
private void Logic()
{
Document doc = new Document();
var image = new Aspose.Pdf.Image();
image.File = $"{PartialPath}_input.svg";
image.FixWidth = 300;
image.FixHeight = 200;
image.Margin = new MarginInfo(30, 30, 30, 30);
FloatingBox coverHeaderBox = new FloatingBox(360, 260);
coverHeaderBox.Paragraphs.Add(image);
var page = doc.Pages.Add();
page.Paragraphs.Add(coverHeaderBox);
// Save PDF Document
doc.Save($"{PartialPath}_output.pdf");
}
And it works. Here is the output:
FloatingBoxWithSvgImage_output.pdf (26.9 KB)
Here is the code in java:
public void Logic() throws Exception
{
var doc = new com.aspose.pdf.Document();
var image = new com.aspose.pdf.Image();
//image.setFileType(ImageFileType.Svg);
image.setFile(PartialPath + "_input.svg");
image.setFixWidth(300);
image.setFixWidth(200);
image.setMargin(new MarginInfo(30, 30, 30, 30));
FloatingBox coverHeaderBox = new FloatingBox(330, 230);
coverHeaderBox.getParagraphs().add(image);
var page = doc.getPages().add();
page.getParagraphs().add(coverHeaderBox);
// Save PDF Document
doc.save(PartialPath + "_output.pdf");
}
Here is the output:
FloatingBoxWithSvgImage_output.pdf (1.3 KB)
So the java version has an issue. I tried the same code with a different picture and it works. So there is something about the image.
I will be creating a bug for the dev team now.