Hi there
I'm trying to change the image size of a report when saving it as PNG file. I'm using this code to render the report and save it as PNG file:
private static void RenderReport(){ ReportProcessor reportProcessor = new ReportProcessor(); Hashtable info = new Hashtable(); info["OutputFormat"] = "PNG"; InstanceReportSource reportSource = new InstanceReportSource(); reportSource.ReportDocument = new BucherLabel(nSalDocInternalNo, nSalDocItemInternalNo, nSalDocItemNo); reportProcessor.RenderReport("IMAGE", reportSource, info, CreateStream, out string docName); CloseStreams();}private static Stream CreateStream(string sFileName, string sExtension, Encoding encoding, string sMimeType){ string sPath = $@"K:\Daten\SRM\FileOrder\{nSupplNo}\Labels\"; sFileName = $"{nSalDocInternalNo},{nSalDocItemInternalNo}"; if (!Directory.Exists(sPath)) Directory.CreateDirectory(sPath); string sFilePath = Path.Combine(sPath, $"{sFileName}.{sExtension}"); FileStream fs = new FileStream(sFilePath, FileMode.Create); lStreams.Add(fs); return fs;}private static void CloseStreams(){ foreach (Stream s in lStreams) s.Close(); lStreams.Clear();}It works pretty fine. But I don't know how to set the filesize. Is this even possible?
Regards,
Roman
