I'm trying to generate a report just using a header and an image that i recieve in a POST request in .NET.
The image size that i send to the report is 56Kb
And the pdf generated size is 8676 Kb with a loss of quality in the image.
Is there any way to avoid the processing made by the report. I would like to know how to get a report that shows the same image with the same quality I send to it.
We use this code to create the byte[] returned as pdf file in a HttpResponse
Code: Select all
public static byte[] CreateArrBytes(this StiReport report, float imageResolution = 3000)
{
using (var memoryStream = new MemoryStream())
{
var pdfSettings = new StiPdfExportSettings { EmbeddedFonts = true, ImageResolution = imageResolution };
report.ExportDocument(StiExportFormat.Pdf, memoryStream, pdfSettings);
return memoryStream.ToArray();
}
}