Last post Jun 24, 2018 02:57 PM by KathyW
Jun 24, 2018 02:03 PM|elmousa68|LINK
I have a paper form used for the purposes of leaves (period an employee is away from work during the day). This form is filled by the employee by hand, signed and submitted to the supervisor.
I am almost finished with the design of the form as a web form in asp.net. Now I need to produce a printed output of this form so the employee can sign it and hand it to his supervisor. (We are still a bit off from automating this function)
Is there a way to produce a printable form of a web form in a manner to guarantee compatibility across different browsers and different configurations?
Some reporting engines produce a pdf document from a report specification. This pdf document can then be printed thereby guaranteeing compatibility.
Is there a similar method in asp.net?
Jun 24, 2018 02:57 PM|KathyW|LINK
You can produce a PDF in asp.net. There are some free ways to do it, or you could buy a library that would convert a whole page or a whole element within the page simply for you.
You could also use a print CSS file for that page, which might be a faster solution. A print CSS file applies only when the page is printed. It lets you alter the appearance of the page for printing, such as excluding headers and footers and menus (display:
none), and so on, and also lets you use units in terms understood by printers but not advised for screens, such as cm, in, or pt.
You can use media queries in your main CSS (@media print), or, since the print CSS file probably will only apply to that page, add a separate CSS link for it:
<link rel="stylesheet" type="text/css" media="print" href="yourprint.css">