

Please do the same on your end and see if the image that results from saving the byte array (ms) to file is valid. Ms = _rasterizer.DrawToMultiPageTiff(tiffImageFormat, ImageSize.Dpi96) įile.WriteAllBytes("test.tiff", ms) //writing the byte array to file. TiffImageFormat tiffImageFormat = new TiffImageFormat(TiffColorFormat.Rgb) _rasterizer = new PdfRasterizer(sourceFilePath, PageNo, 1) įixedImageSize fixedImageSize = new FixedImageSize(595, 841)


String nameOfTheFile = Path.GetFileName(sourceFilePath) If ((!String.IsNullOrEmpty(sourceFilePath) & sourceFilePath.Trim().Length != 0) & (PageNo > 0)) We tested your code by saving the byte array (ms) to a file and that produced a valid TIFF file. You would need to create a byte array (similar to what you are doing in your code) and then convert that byte array to a base64 string by some other method. Our product does not have any methods or properties that you can use to generate a base64 string of the resulting image. imageData = page.DrawToBitmap(BitmapColorFormat.RgbA, ImageSize.Dpi72, false) PdfRasterizer rastObj = new PdfRasterizer(pdf)
USE MEMORY STREAM WITH PDFWRITER PDF
The simplest configuration of the PDF viewer needs a URL that will return.Rendering from RAM would be much the preferred option. Rasterizer cannot directly output the PDF as object, but it can output a object which is actually derived from object. (C / iText on the server) and was wondering if I could use a MemoryStream as a datasource for the PDF viewer without having to write the document to file first.
