Printing Html documents

193 Views Asked by At

i have a task to print html documents i m using window.print() along with some CSS the problem i m facing is printing of object tag in which a .djvu file is loaded i m using self created djvu viewer for viewing djvu file. problem is that object is streched when printing but on screen it is showing good view

thanks in advance

2

There are 2 best solutions below

0
On

Set media style sheet = print for the printing version

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

more :
CSS Media types and printer friendly pages

0
On

You can only guarantee print output if you use a file format such as PDF, you can generate these using the free library iTextSharp.

Also you can explore using a separate stylesheet for printing, with the media tag set to "print".