Chrome / Firefox打印广泛的图像/画布以自动平铺和平铺 [英] Chrome/Firefox printing wide image/canvas to automatically tile across and down

查看:134
本文介绍了Chrome / Firefox打印广泛的图像/画布以自动平铺和平铺的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个CANVAS元素,可以相当宽,这取决于实际的内容。对于打印,我希望chrome / firefox自动将画布图像平铺在多个页面上(先水平,然后垂直)。

垂直平铺工作正常,打印预览

似乎没有任何横向平铺。



任何想法?

解决方案

默认打印将会在画布太宽时关闭画布。没有绕过那个。然而,...

用原始画布的小垂直切片替换原始画布可以让浏览器在大致正确的位置分页。


I have a CANVAS element that can be quite wide, depending on the actual content. For printing I'd like chrome/firefox to automatically tile the canvas image across multiple pages (horizontally first, then vertically).

The vertical tiling works fine, the print preview splits the canvas across two pages.

There doesn't seem to be any horizontal tiling at all.

Any ideas?

解决方案

The default printing will always cut the canvas off when it is too wide. No getting around that.

However...

Replacing the original canvas with small vertical slices of the original canvas allows the browser to page break at roughly the correct location.

这篇关于Chrome / Firefox打印广泛的图像/画布以自动平铺和平铺的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆