print page while inserting new html before print with print.css in rails
Printing page is normal requirement with specified css and layout or some html which is not the current page but the problem comes when you want both the application css and print css to work for that layout.
For that you need to do a trick you need to preload the html in DOM and made it hide then on click of a print button hide the content which you don't want to come on the print page and show your preloaded html then print page comes with both the application/css and print.css and then again hide the print html and show the current html.
For that you need to do a trick you need to preload the html in DOM and made it hide then on click of a print button hide the content which you don't want to come on the print page and show your preloaded html then print page comes with both the application/css and print.css and then again hide the print html and show the current html.
Comments
Post a Comment