/    Sign up×
Community /Pin to ProfileBookmark

print web page in chrome

Hi!
I have a javascript function thath allow me to print a page of my site.
Everithiyng is ok whit firefox and IE. My proble is with chrome and print preview.
At first time print preview is white. If I do f5 (refresh of my page) preview is ok.

Can you help me to find a solution?
I use:
var WinPrint = window.open(”,”,’left=0,top=0,width=’ + width +’,height=’ + height + ‘,toolbar=no,scrollbars=yes,status=no,resizable=yes’);
WinPrint.document.write(contenuto);
WinPrint.focus();
WinPrint.print();

the problem does not change if i set timeout:
setTimeout(WinPrint.print(), 10000);

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @ojal__ spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.6,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...