Page 1 of 1

Loss of quality in images generating a pdf export

Posted: Thu Apr 05, 2018 10:21 am
by jcolan
Hi!!

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();
            }
}
Thanks

Re: Loss of quality in images generating a pdf export

Posted: Fri Apr 06, 2018 5:17 pm
by Lech Kulikowski
Hello,

Please try to check the last version.

If the issue still present, please send us a simple report with test data for analysis.

Thank you.