Hi,
the following code leads to exception. IMPORTANT: with less inserts work!
// Instantiate Document Object
var doc = new Pdf.Document();
// Add a page to pages collection of document
var page = doc.Pages.Add();
var table = new Pdf.Table();
table.ColumnWidths = Width + " " + Width;
// Set the table border color as LightGray
table.Border = new Pdf.BorderInfo(Pdf.BorderSide.All, .5f, Pdf.Color.FromRgb(System.Drawing.Color.LightGray));
// Set the border for table cells
table.DefaultCellBorder = new Pdf.BorderInfo(Pdf.BorderSide.All, .5f, Pdf.Color.FromRgb(System.Drawing.Color.LightGray));
page.Paragraphs.Add(table);
for (var index = 0; index<10; index++)
{
var row = table.Rows.Add();
var cell = row.Cells.Add();
// Create an image object
var image1 = new Aspose.Pdf.Image();
image1.File = "sample_car.svg";
image1.FileType = Aspose.Pdf.ImageFileType.Svg;
// Aspose.Pdf measuring unit is point, 1 inch= 72 point= 2.54 cm
image1.FixWidth = 283.4645669;
image1.FixHeight = 283.4645669;
// Add the image into paragraphs collection of the section
cell.Paragraphs.Add(image1);
}
// Set the image file stream
// Save resultant PDF file
doc.Save("DocumentWithCar.pdf");
I get the followinf exception: “Cannot open an image. The image file format may be not supported at the moment.”