Page 1 of 1
png-Image
Posted: Wed May 09, 2018 12:21 pm
by Lars
Hello,
currently I have issues with pdf-rendering of reports using png-images in JS-Reports (Version: 2018.2.1).
The image boxes are empty (with static and dynamic loaded png-images).
Rendering of png in a HTML-view (preview) is working, but then aspect ratio with stretch isn't working there.
But: Pdf-rendering of jpg-images is ok (with static and dynamic loaded jpg-images, with aspect ratio and stretch, and in HTML-preview too).
Thank you
Re: png-Image
Posted: Fri May 11, 2018 3:10 pm
by HighAley
Hello.
Sorry, we can't reproduce your issue on our latest build.
Could you upgrade to our latest build?
If you still get the issue, please, send us a sample that will help us to reproduce the issue.
Thank you.
Re: png-Image
Posted: Thu May 24, 2018 7:35 am
by Lars
Hello,
I can see the issue with png in current version too (2018.2.2).
Additional info: If I use the javascript-lib "pdf-js" to show such a bad pdf, then I can see pdf without the png and with additional warnings in Chrome debugger:
Warning: Native JPEG decoding failed -- trying to recover: Error during JPEG image loading
util.js:278 Warning: Unable to decode image: JpegError: JPEG error: SOI not found
util.js:278 Warning: Dependent image isn't ready yet
Perhaps, the png isn't correct embedded in the pdf?
Notes:
- Pdf-build by html-view is working (report -> htmlView -> pdf in browser):
using Stimulsoft.Viewer.StiViewer.renderHtml() and StiReport.print()
- Direct export (report -> pdf) with javascript/typescript is working only with jpg, but NOT with png:
using:
Code: Select all
let settings = new Stimulsoft.Report.Export.StiPdfExportSettings();
let service = new Stimulsoft.Report.Export.StiPdfExportService();
let stream = new Stimulsoft.System.IO.MemoryStream();
service.exportTo(report, stream, settings);
let data = stream.toArray();
But we need direct export to avoid other issues with html-rendering.
Unfortunately our project is sophisticated and we have no easy sample.
Thank you
Re: png-Image
Posted: Fri May 25, 2018 1:56 pm
by Lech Kulikowski
Hello,
PDF is supported images in jpg format.
To convert images in the JS version, you should use async method:
service.exportToAsync()
Thank you.