Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image element printing problem. #41

Open
stevesum opened this issue Sep 18, 2012 · 2 comments
Open

Image element printing problem. #41

stevesum opened this issue Sep 18, 2012 · 2 comments

Comments

@stevesum
Copy link

When the element DOM is contain IMG elements, then the IE9 print the whole page, and not only the given div.
You can test here:
http://www.felleskatalogen.no/medisin/pasient/pil-aranesp-amgen-546421
The "Utskrift" link is the "Print" link.

In Chrome 21 the selected div is printed, but there are blank areas instead the images.

Do you know any solution on this problem?

BR,
Steve

@stevesum
Copy link
Author

The IE problem is limited only on iframe print mode. In the popup mode works correctly.

@hidekiyamamoto
Copy link

I had the same problem and it was reltive urls.

uno.print=function(jq,options){uno.norelativeurls();jq.printElement(options)};
uno.norelativeurls=function(){var aa=document.getElementsByTagName('img');
for(var a=0;a<aa.length;a++){
if(uno.startswith(aa[a].src,'http://')){continue;}
if(uno.startswith(aa[a].src,'https://')){continue;}
aa.src=uno.host+location.pathname+aa.src;}};

//Fixes on the fly the issue about images not having relative image src urls not showing correctly in chrome and other browsers
//Usage : uno.print(jQuery('#elmid'),{OPTIONS HERE})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants