tags:

views:

311

answers:

2

In the webbrowser control, I want to set the media type = print. So it will display the contents in print preview mode. Is this possible and how to do it?

A: 

Simulate a print preview with CSS by setting the media property to print -

<link rel="stylesheet" type="text/css" href="path/to/print.css" media="print" />

Creating print preview page dynamically in ASP.NET

Creating print preview page dynamically in ASP.NET

http://www.eggheadcafe.com/community/aspnet/2/10083542/open-the-print-preview-di.aspx

abmv
Is it possible to split the data pagewise like in MS word
rahul
I said how to do that in the C# Webbrowser control for any website.
Priyank Bolia
A: 

The only solution it seems is redirect the request to some other server, which will fetch the original page and modify the css attributes to show print layout on the screen. This can be done by removing the screen css files and setting the attribute media="print" to media="screen".

Priyank Bolia