I'm trying to take a pdf file...using pdfconverter and take the resulting GetNextImages, and output them to the Response.outputstream.
However, I'm finding that I can only get the first page converted and displayed.
Is there some way of looping through all pages, and displaying all images on screen (without creating files)?
I was trying something like this but it did not work:
MemoryStream ms = new MemoryStream();
MemoryStream finalstream = new MemoryStream();
while (pdfConverter.HasNextImage())
{
pdfConverter.GetNextImage(ms, System.Drawing.Imaging.ImageFormat.Png);
ms.WriteTo(finalstream);
}
finalstream.WriteTo(Response.OutputStream);
ms.Close();
finalstream.Close();