You are here:

Dreamweaver/printing in b and 2w only


i want to have a coupon on my page in color but i only want it to print b&W
people are complaining it uses too much color ink
thank u  do u know a javascript i can use to make it print only black and white

Hi Marv,
       Hope you are doing well.

If you are using images for showing coupons, i would suggest you to use the following GD Library code in PHP (if you have done your website using PHP), before printing it.

header("content-type: image/jpeg");
$img = imagecreatefromjpeg('yourimage.jpg');
imagefilter($img, IMG_FILTER_GRAYSCALE); //first, we are converting it to grayscale
imagefilter($img, IMG_FILTER_CONTRAST, -255); //then, we are applying a full contrast

The above code, converts your image to black and white, before printing.

If i am unclear (or) if i am not giving you the solution for what you have asked, feel free to ping me back, with a brief description about the issue (and possibly your website address, to take a look). I would be glad to assist you further.

Have a great day and all the very best, marv !


All Answers

Answers by Expert:

Ask Experts


Vimal Abraham


I have worked with HTML, PHP and MySQL from 2005. I can be able to solve HTML, PHP, and MySQL related issues.


I have worked under various domains of web development including file sharing, social community, wallpaper management, image hosting, web hosting automation, shopping cart and payment gateway integration. My portfolios include,

I have completed Bachelor of Engineering in Computer Science.

Awards and Honors
Have a Total of nine certificates in Inter and Intra College Competitions that includes technical quiz, program debugging and paper presentation (State Level).

©2017 All rights reserved.