Hello.
I have an ASP page that require printing.
The page is about showing some data from database.
I use the simple javascript printing :

javascript:window.print()

The page design use some css templates.
Well it does print. But it only prints the images and the texts.
The print out seems dont load the css.
Can anybody have the solution so i can print the page exactly as it is shown on the browser.

Many thanks for the help.

Member Avatar for Rhyan

Hello.
I have an ASP page that require printing.
The page is about showing some data from database.
I use the simple javascript printing :

javascript:window.print()

The page design use some css templates.
Well it does print. But it only prints the images and the texts.
The print out seems dont load the css.
Can anybody have the solution so i can print the page exactly as it is shown on the browser.

Many thanks for the help.

Hi , check how did you attached the style sheet.
e.g.
<link rel="stylesheet" type="text/css" href="mystyle.css" />

you should add media="all" definition in order styles not to be ignored.

Good luck

Hi , check how did you attached the style sheet.
e.g.
<link rel="stylesheet" type="text/css" href="mystyle.css" />

you should add media="all" definition in order styles not to be ignored.

Good luck

Hi..
Well well... my problem solved through a single word.
i did change the media="screen" into media="all", and it works.
The page printing is exactly the same as it shown.

Thanks Rhyan....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.