Page 1 of 1
(Node.js) Pdf Export - Image not transparent
Posted: Tue Apr 10, 2018 3:47 am
by joe
Hello,
I've also tried to export pdf file on node.js, but image not transparent.
Hope you can help!
Re: (Node.js) Pdf Export - Image not transparent
Posted: Tue Apr 10, 2018 7:13 pm
by HighAley
Hello.
Unfortunately, there is no support of the transparency in the Reports.JS product.
Thank you.
Re: (Node.js) Pdf Export - Image not transparent
Posted: Wed Apr 11, 2018 4:05 am
by joe
thank you.
But i'm using Reports.JS in html+js, it's work.
As the result of "fs.writeFile" in node.js, the transparency doesn’t work. Right?
My html+js code
Code: Select all
<html>
<script src="./stimulsoft.reports.js"></script>
<script>
var settings = new Stimulsoft.Report.Export.StiPdfExportSettings();
var service = new Stimulsoft.Report.Export.StiPdfExportService();
var stream = new Stimulsoft.System.IO.MemoryStream();
// Creating new report
var report = new Stimulsoft.Report.StiReport();
console.log("New report created");
// Loading report template
report.loadFile("./Report.mrt");
console.log("Report template loaded");
// Renreding report
report.render();
console.log("Report rendered. Pages count: ", report.renderedPages.count);
service.exportToAsync(function () {
// Export to PDF (#1)
var pdfData = report.exportDocument(Stimulsoft.Report.StiExportFormat.Pdf);
Object.saveAs(pdfData, 'SimplePDF1.pdf', 'application/pdf');
console.log("Rendered report saved into PDF-file #1.");
/*
// Export to PDF (#2)
var data = stream.toArray();
Object.saveAs(data, 'SimplePDF2.pdf', 'application/pdf');
console.log("Rendered report saved into PDF-file #2.");
*/
}, report, stream, settings);
</script>
</html>
Re: (Node.js) Pdf Export - Image not transparent
Posted: Mon Apr 16, 2018 9:09 pm
by Lech Kulikowski
Hello,
We need some additional time to investigate the issue.
Thank you.
Re: (Node.js) Pdf Export - Image not transparent
Posted: Tue Apr 17, 2018 4:09 am
by joe
Thank you.
Re: (Node.js) Pdf Export - Image not transparent
Posted: Tue Apr 24, 2018 5:40 am
by Lech Kulikowski
Hello,
Transparentcy is not supported in the export to PDF.
In the JS version that feature is a limited and in NodeJS is not implemented. Sorry.
Thank you.