S
shapper
Hello,
I am converting a pdf file page to a Bitmap, using a commercial
library, and then to a Byte[].
MemoryStream stream = new MemoryStream();
stream.Write(file, 0, file.Length);
PDFFile pdf = PDFFile.Open(stream);
Bitmap image = pdf.GetPageImage(page, 72);
??? Clear Stream to have image now.
image.Save(stream, System.Drawing.Imaging.ImageFormat.Png);
Byte[] data = new Byte[stream.Length];
stream.Dispose();
First I load the pdf file into a stream, i get the page and now I need
to use a stream to convert it to byte?
Can i empty the stream and use it again instead of using another
stream?
How can I do that?
I was thinking in use stream.Flush(); but it says about Flush:
"overides flush so no action is performed"
I want to perform more actions so I am not sure if this is the correct
option.
Thanks,
Miguel
I am converting a pdf file page to a Bitmap, using a commercial
library, and then to a Byte[].
MemoryStream stream = new MemoryStream();
stream.Write(file, 0, file.Length);
PDFFile pdf = PDFFile.Open(stream);
Bitmap image = pdf.GetPageImage(page, 72);
??? Clear Stream to have image now.
image.Save(stream, System.Drawing.Imaging.ImageFormat.Png);
Byte[] data = new Byte[stream.Length];
stream.Dispose();
First I load the pdf file into a stream, i get the page and now I need
to use a stream to convert it to byte?
Can i empty the stream and use it again instead of using another
stream?
How can I do that?
I was thinking in use stream.Flush(); but it says about Flush:
"overides flush so no action is performed"
I want to perform more actions so I am not sure if this is the correct
option.
Thanks,
Miguel