Hi Support,
I am generating a PDF with a table of conference speakers. In this table I display the speaker's image and names. Most of the time it works great. However some times if an image is used more than once I get the error message below on the create file stream line.
The process cannot access the file 'C:\accountimages\no_person.jpg' because it is being used by another process.
My code is below. Should I be releasing, disposing, or setting img or img.imagestream to Nothing? How do I make it so a repeat file can occur. I have no way of knowing in advance which images may repeat.
Dim Row As Aspose.Pdf.Row = table.Rows.Add()
Dim img As Aspose.Pdf.Image = New Aspose.Pdf.Image
img.ImageStream = New FileStream(strPhysicalPath, FileMode.Open)
Row.Cells(0).Paragraphs.Add(img)
Dim t As Aspose.Pdf.HtmlFragment = New Aspose.Pdf.HtmlFragment("my html text"
Row.Cells(1).Paragraphs.Add(t)
Please help!
Thanks,
Mike