Hi,
I'm trying to extract pages from a pdf into individual pages. The extraction works on most pdf's, however, on certain documents, it does not extract all the data.
I have attached the pdf I'm trying to extract.
Here is the code:
public List<byte[]> ExtractPagesAsImages(byte[] file)
{
var ldoc = new PdfLoadedDocument(file);
var result = new List<byte[]>();
var images = ldoc.ExportAsImage(0, ldoc.Pages.Count - 1);
foreach (var image in images)
{
using (var memory = new MemoryStream())
{
image.Save(memory, ImageFormat.Png);
result.Add(memory.ToArray());
}
}
return result;
}Attachment:
Doc_7c7ba6a2f0434bada17397bcf3935249_1430c4e1.zip