if (type != null && type.ToString().Equals(PdfName.IMAGE.ToString())) { if (flag == 0)//restrtict to take only one image { pio = new PdfImageObject(pst); //get the image CustomerImage = ExtractedImagePath + DateTime.Now.ToString("ddMMyyyyHHmmss") + "image" + ".jpg"; fs = new FileStream(CustomerImage, FileMode.Create); //read bytes of image in to an array byte[] imgdata = pio.GetImageAsBytes(); //write the bytes array to file fs.Write(imgdata, 0, imgdata.Length); fs.Flush(); fs.Close(); CustomerImage = Path.GetFileName(CustomerImage); flag = 1; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)