c# - Printing a page without displaying it? -
I have a page in which the user will be able to print . However, the page that is printed is not visible to the user but rather a new one which I want to generate on the background and (possibly) only show a print dialogue for it.
Just to clarify things:
- The user is on " View.aspx " and my Print Clicks on the button (not the browser).
- The Print button loads the contents of " Printable.aspx " and displays a print dialog for it, while the user still " Strong> See I
Use a combination in the CSS to show / hide objects to print Media tags.
& gt; STYLE type = "text / css" & gt; @ media print {print} only (font size: 10pt; line-height: 120%; background: White;}} @ media scan You can control what style display: any
media screen. The user will only see it when printing. & lt; DIV class = "printOnly" & gt; This control will only appear during printing & lt; / DIV & Gt;
Any of your controls can be classified as "PrintOnly", so that you can print only when they are printed Can not see you only need to define a CSS class to the "@ media screen" and "@ print media", so that they can be sure that they behave differently.
You can also bring the entire stylesheet for print-only.
& lt; LINK rel = "stylesheet" type "text / css" href = "screen.css" media = "screen" & gt; & Lt; LINK rel = "stylesheet" type "text / css" href = "print.css" media = "print" & gt;
Comments
Post a Comment