• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 199
  • Last Modified:

Print a web page that uses IE colored light filters

I have a website that uses IE light filters similar to what is shown at http://www.w3schools.com/dhtml/tryit.asp?filename=trydhtml_filter_light

While it all displays perfectly on the screen when I print the page all images that have a filter effect are displayed as black.

The only way I have to print the page as shown on the screen is to printscreen, and paste into image editing software, removing window borders, then printing.  This is a pain for me, and not acceptable for the average web user.

Does anyone know any way in which images with IE filters can be printed in a webpage, with the output displaying as it is on screen.

Thanks

Jeremy
0
JeremyKells
Asked:
JeremyKells
2 Solutions
 
gnudiffCommented:

I am fairly certain this is an actual limitation of the IE, and you would have to do server-side image processing instead of client-side, for printing to work properly.
0
 
arantiusCommented:
Yes, IE's filters are just a code-bloat feature-cram get it in there then it's one more bit for us winning the browser wars thing.
Soon as Netscape died, IE stopped being worked on.  And as I said this feature was just added for "Ooo, aaa" factor.  It's not really that great for doing a lot with.

If you want to be able to print it, too, do your filters server side.  Or, just filter it in an image editor then save the image that way.
0
 
JeremyKellsAuthor Commented:
That fits with what I suspected - that it was a IE limitation

As I have come up with a useful page that uses the filters heavily (to see it goto http://www.spc.int/demog/Test/thematicmaps.html) I will ask one more thing

Is it possible as a workaround to do what I am doing by hand to print?  I know it is a long shot using javascript, but the steps would be

1) printscreen, just copying the window contents to the clipboard

2) print clipboard contents


Any other suggestions are welcome as well

Thanks

Jeremy


 
0
[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

 
andYetAnotherLoginNameCommented:
suggestions? use javascript to remove filters before print.
0
 
gnudiffCommented:
By a long shot, the cleanest and probably fastest way would be to do the image processing server-side.

The exact solution would depends on the server-side possibilities. If it is PHP, you can do something like:

from  http://www..php.net/manual/en/ref.image.php
"
<?php

header("Content-type: image/png");
$string = $_GET['text'];
$im    = imagecreatefrompng("images/button1.png");
$orange = imagecolorallocate($im, 220, 210, 60);
$px    = (imagesx($im) - 7.5 * strlen($string)) / 2;
imagestring($im, 3, $px, 9, $string, $orange);
imagepng($im);
imagedestroy($im);

?>
This example would be called from a page with a tag like: <img src="button.php?text=text">. The above button.php script then takes this "text" string and overlays it on top of a base image which in this case is "images/button1.png" and outputs the resulting image. This is a very convenient way to avoid having to draw new button images every time you want to change the text of a button. With this method they are dynamically generated.

"
In the above link you can also see what functionality is available -- if it fits what you need to do with the images.
0
 
JeremyKellsAuthor Commented:
The reason I wish to use client side image processing rather than server side processing is to avoid the extra roundtrip to the server each time a user selects imputs that change the colors on the images.  This is because many of the users of this website are located in Pacific Island countries that have internet connections that are slow at best, so the less network bandwidth needed the better.

So the PHP solution, while it looks interesting, is not what I want in this case.  Thanks for the link, I haven't used PHP before, but imay use it for other projects in the future.

Removing the filters before printing removes much of the value of printing the page, so is also not the answer here.  It does stop them appearing black in the printout though.

I think I will look at other client side options, starting with SVG and Flash.  Personally I like SVG but has the disadvangate of a large plugin download, a big disadvantage in with the target user group.  Flash also has the plugin requirement, but I think many PC now have this preinstalled, so may be a better option.

Comments are welcome, but short of anyone coming up with anything that completely changes my mind, I will split the points between the above replies.

Thanks
Jeremy

0
 
gnudiffCommented:
>> Removing the filters before printing removes much of the value of printing the page, so is also not the answer here.  It

I agree. I would further assert that this is probably simply a bug in IE, however, waiting for it to be fixed could take indefinite time. Furthermore, MS may altogether decide to throw out the filtering functionality in the future.

> I think I will look at other client side options, starting with SVG and Flash.  Personally I like SVG but has the disadvangate of a large plugin download, a big disadvantage in with the target user group.  Flash also has the plugin requirement, but I think many PC now have this preinstalled, so may be a better option.

I have not had much experience with either, so in fact I am surprised that Flash/SVG would have the neccessary filtering capabilities for _bitmap_ manipulation -- I was under impression that they both were more oriented towards vector graphics.

However, the obvious comment here is to check for their printing capabiities - whether Flash/SVG has some inbuilt printing possibilities, or whether IE prints Flash at all - it may well be the case it doesn't do that either, as Flash has been mostly used for movie-like dynamic stuff.
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now