在纸张上的特定位置打印
我有一些预先打印的 A4 纸,我想在纸上的特定位置打印一些数据(将其视为带有必须填写的方框的表格)。我尝试使用 html 和 css 来做到这一点,并且我已经成功地使用我的配置(特定边距、打印机等)在打印纸上正确显示数据。
我犹豫的是浏览器、打印机、打印机驱动程序(或其他一些参数)是否会影响数据的打印方式,从而导致我无法获得正确的结果。
使用html和css进行精确打印是否可行?如果答案是肯定的,你会怎么做? (我的方法是为每个页面使用相对定位的 div,为表单的每个框使用绝对定位的 div) 如果答案是否定的,会提出什么替代方案? (也许 html 和表标签的使用?其他完全不同的东西?)
I have some pre-printed A4 papers and I want to print some data on them on specific locations on the paper (think of it as a form with boxes which must be completed). I 've tried to do it with html and css and i 've managed to display the data correctly on the printed paper with my configuration (specific margins, printer, etc).
My hesitation is if the browser, the printer, the printer driver (or some other parameter) affect the way the data are printed in a way that I won't get the right result.
Is it feasible to use html and css for accurate printing? If the answer is yes how would you do it? (My approach is using relative positioned divs for each page with absolute positioned divs for every box of the form)
If the answer is no what would propose alternatively? (maybe html and use of table tags? something else completely different?)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我会用 PDF 或 Flash 来做。与您需要打印邮票时 www.stamps.com 的方式非常相似。
这两种技术的原因是它们确实是跨平台的,并且在所有系统上给出相同的结果。
I would do it in PDF or Flash. Very similar to the way www.stamps.com do when you need to print stamps.
Reason for those two technologies is they are really cross platform and give same results on all systems.