Hi all,
Is it possible to pull images out of table cells in Spire.PDF? It doesn't look like that's possible with the PdfTable, but I was curious if there was another way I didn't know about.
Thanks!
// Create a PDF document
PdfDocument doc = new PdfDocument();
// Load a file from disk
doc.LoadFromFile(@"ExtractImges.pdf");
// Get the first page of the document
PdfPageBase page = doc.Pages[0];
// Create an instance of PdfImageHelper to work with images
PdfImageHelper imageHelper = new PdfImageHelper();
// Get information about the images on the page
PdfImageInfo[] imageInfos = imageHelper.GetImagesInfo(page);
// Extract images from the page
int index = 0;
foreach (PdfImageInfo info in imageInfos)
{
// Save each image as a PNG file with a unique name
info.Image.Save(string.Format("Image-{0}.png", index));
index++;
}
// Dispose the PDF document to release resources
doc.Dispose();