We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

I'm asking if EJ2 can print webpages using ejPrint() like EJ1.

Thread ID:

Created:

Updated:

Platform:

Replies:

150856 Jan 22,2020 07:11 AM UTC Jan 28,2020 09:35 AM UTC JavaScript - EJ 2 5
loading
Tags: General
jeongkyu park
Asked On January 22, 2020 07:11 AM UTC

Hello.

I'm currently migrating from EJ1 to EJ2.
In the case of EJ1, the sub contents of a specific tag were printed out by using ejPrint(). In EJ2, I would like to ask you whether there is no such function.

----------------- Example of outputting a specific tag using EJ1 -----------------------
    var print = $("#DashboardDIV").clone();
    print.append("<script>document.body.style.backgroundColor = 'white'<\/script>");
    print.ejPrint();
-------------------------------------------------- -------------------------------------------------- --------------
Please ask if EJ2 can be used as above.
(The component is not a Dialog but I chose it as a required input.)

Thank you.

Jesus Arockia Sankaran S [Syncfusion]
Replied On January 23, 2020 04:29 PM UTC

Hi jeongkyu, 

Yes, EJ2 can print the webpages like ejPrint() in EJ1. It can be achieved by using print() method. By using the print method you specify the print content element and print window. We have prepared a sample for your reference. Please find the sample below. 


Regards, 
Jesus Arockia Sankaran S 


jeongkyu park
Replied On January 28, 2020 05:14 AM UTC

Thank you for the answer.

Is it possible to use javascript instead of typescript?
I am working with EJ2 javascript.

Jesus Arockia Sankaran S [Syncfusion]
Replied On January 28, 2020 07:05 AM UTC

Hi jeongkyu, 

Thanks for your update. 

We have created a sample in JavaScript for your reference that you can find from the link below. 


Regards, 
Jesus Arockia Sankaran S 


jeongkyu park
Replied On January 28, 2020 09:34 AM UTC

Just confirmed that it works!

Thank you. Jesus Arockia Sankaran S

Jesus Arockia Sankaran S [Syncfusion]
Replied On January 28, 2020 09:35 AM UTC

Hi jeongkyu, Thanks for the update.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon