Can the Printer Method work with Node.js?

Stimulsoft Reports.JS discussion
Post Reply
rongs
Posts: 4
Joined: Mon Nov 27, 2017 4:23 am

Can the Printer Method work with Node.js?

Post by rongs »

a.We are trying to implement something by node.js with Report.js
b.Our application is running well on desktop or server side(Windows, Linux, Mac os)
c.Now, we could use Report.js to generate files on above platforms
d.As i mentioned, we can`t use print() method of Report.js APIs correctly on Report.js+Node.js now ....

In the product introduction,we can see the following
Server-side
Despite the fact that Stimulsoft Reports.JS can operate only on the client side, it can be used on the server. For example, it can work together with Node.js.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Re: Can the Printer Method work with Node.js?

Post by Edward »

Hi Rongs,

Sorry, it looks like your post is missing some links to the examples / pages you would like to share.

In order to print from the Stimulsoft Reports.JS the browser's dialogue window will be shown, as per the following video https://www.youtube.com/watch?v=vo_Zw29A_5s

The same method of printing is not supported by the Node.js approach on the server side as you mentioned.

Thank you,
Edward
rongs
Posts: 4
Joined: Mon Nov 27, 2017 4:23 am

Re: Can the Printer Method work with Node.js?

Post by rongs »

Edward wrote:Hi Rongs,

Sorry, it looks like your post is missing some links to the examples / pages you would like to share.

In order to print from the Stimulsoft Reports.JS the browser's dialogue window will be shown, as per the following video https://www.youtube.com/watch?v=vo_Zw29A_5s
The same method of printing is not supported by the Node.js approach on the server side as you mentioned.

Thank you,
Edward
Hi,
It should cause the exception from print() method by the way with your sample in any node.js program.
Thank you
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Re: Can the Printer Method work with Node.js?

Post by Edward »

Hi Rongs,

You are absolutely correct, my answer missed the 'no' that I corrected now. In Node.js the standard Javascript approach to print will cause the exception.

The workaround here for Node.js is to use export to PDF.

https://github.com/stimulsoft/Samples-J ... 20PDF-file

But, strictly speaking, that is not a 'printing' activity, even if you call the program that opens the generated PDF somehow through the file associations.

Could you please explain the reasoning behind printing from the Node.js application? Will the application be used on the client as a console app?

Thank you,
Edward
rongs
Posts: 4
Joined: Mon Nov 27, 2017 4:23 am

Re: Can the Printer Method work with Node.js?

Post by rongs »

Edward wrote:Hi Rongs,

You are absolutely correct, my answer missed the 'no' that I corrected now. In Node.js the standard Javascript approach to print will cause the exception.

The workaround here for Node.js is to use export to PDF.

https://github.com/stimulsoft/Samples-J ... 20PDF-file

But, strictly speaking, that is not a 'printing' activity, even if you call the program that opens the generated PDF somehow through the file associations.

Could you please explain the reasoning behind printing from the Node.js application? Will the application be used on the client as a console app?

Thank you,
Edward
Hi,
We have two projects are going now ,
one is a client app made by Electron + Node.js + Stimulsoft so we need a way to generate reports and lables then have a way to output to local printer.
the other is printing service made by Node.js + Stimulsoft(the last version was made by C#+Stimulsoft ) on the server host connected with printers, this is for sharing and controlling our printering resource on our all factories.
Thank you
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Can the Printer Method work with Node.js?

Post by HighAley »

Hello.

The node.js has many restrictions. So the printing feature is not working at this moment.
We need some time for analysis of this issue and will keep in touch with any news.

Thank you.
rongs
Posts: 4
Joined: Mon Nov 27, 2017 4:23 am

Re: Can the Printer Method work with Node.js?

Post by rongs »

HighAley wrote:Hello.

The node.js has many restrictions. So the printing feature is not working at this moment.
We need some time for analysis of this issue and will keep in touch with any news.

Thank you.
Hello,
We are still going our project so please just let`s know your solution plan or suggestion about this topic as soon as you could, thanks ~
Thank you.
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Can the Printer Method work with Node.js?

Post by HighAley »

Hello.

Unfortunately, the printing is not available form node.js.
You could try to use JavaScript on the client side or .Net Framework on the server side.
At this moment the .Net Core is available for the cross-platform applications.

Thank you.
Post Reply