This is my actual code to convert a PDF to an image.
- Code: Select all
PdfDocument doc = new PdfDocument();
doc.LoadFromBytes(plottingMapLevel.ImgData);
doc.CompressionLevel = PdfCompressionLevel.None;
Stream image = doc.SaveAsImage(0);
MemoryStream ms = (MemoryStream)image;
imgData = ms.ToArray();
Inside of my PDF there are big images but somehow when converting to an image the Height and width are smaller on the pdf converted image. How can I delete this compression?