wyswyg html form printing

≯℡__Kan透↙ 提交于 2019-12-11 19:09:13

问题


I am starting this web app project (asp.net mvc)

It's a document-based system, such that nearly each web page is a model of an official printed form (and users sometimes should be able to produce prints).

I am wondering how much cost and time saving it will be if the form could be a wyswyg page that will serve both electronic and paper audiences.

I know that Adobe Acrobat forms has something like that. Would've have been perfect for my purposes but it's not pluggable -- meaning I don't have a choice as to backend system.

Does anyone know anything out there that renders pdf/like pdf to the printer but has html form submit capabilities?


回答1:


Why not css print media? For example,

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

You can define both the things in the same page. Something like this,

<link rel="stylesheet" href="css/mainstylesheet.css" media="screen" /> 
<link rel="stylesheet" href="css/printstylesheet.css" media="print" /> 

I hope this is you are looking for, not sure though.

An excerpt from the book Pro CSS Technique.

Edited:

CSS print media browser conformance.




回答2:


Check out wkhtmltopdf... FOSS and uses webkit rendering engine (safari, google chrome) to convert from html to pdf... I tried compiling it on windows and I got it to work. Much better than anything else I can find. Supports all the css I can throw at it.



来源:https://stackoverflow.com/questions/580424/wyswyg-html-form-printing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!