(Node.js) Pdf Export - Image not transparent

Stimulsoft Reports.JS discussion
Post Reply
joe
Posts: 3
Joined: Tue Apr 10, 2018 3:14 am

(Node.js) Pdf Export - Image not transparent

Post by joe »

Hello,

I've also tried to export pdf file on node.js, but image not transparent.

Hope you can help!
Attachments
index.js
(1.27 KiB) Downloaded 172 times
Report.mrt
(62.28 KiB) Downloaded 164 times
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: (Node.js) Pdf Export - Image not transparent

Post by HighAley »

Hello.

Unfortunately, there is no support of the transparency in the Reports.JS product.

Thank you.
joe
Posts: 3
Joined: Tue Apr 10, 2018 3:14 am

Re: (Node.js) Pdf Export - Image not transparent

Post 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>
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: (Node.js) Pdf Export - Image not transparent

Post by Lech Kulikowski »

Hello,

We need some additional time to investigate the issue.

Thank you.
joe
Posts: 3
Joined: Tue Apr 10, 2018 3:14 am

Re: (Node.js) Pdf Export - Image not transparent

Post by joe »

Thank you.
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: (Node.js) Pdf Export - Image not transparent

Post 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.
Post Reply