打印时在 Chrome 和 Microsoft Edge 上转换缩放 css 的工作方式不同

问题描述

我正在使用 css 规则“transform: scale()”来缩放网站中的流程图。

打印结果出现问题

在不同的浏览器中一切正常,包括 Chrome,但 Microsoft Edge 将图表缩放为更大的尺寸,因此它不适合我需要的尺寸。我想对所有浏览器只使用一个声明。

-> A date will be given in the programme to enable the calculation (#P_DT_TRT#)
If the parameter is not supplied (value = 1900-00-00)
DT_TRT = the largest constitution date (DT_CTTT) in the target table (TARGET_TABLE TT)
Otherwise DT_TRT = date given in parameter
If DT_TRT month < 4
Quarter = 4
Year = Year of DT_TRT - 1
Otherwise Year = Year of DT_TRT
If DT_TRT month < 7
Quarter = 1
Otherwise
If DT_TRT < 10
Quarter = 2
Otherwise Quarter = 3

但在 Microsoft Edge 中,它的工作方式与 Chrome 相同,只是如果我使用较低的系数进行缩放,即 0.65 而不是 0.85。

我该如何解决这个问题来为 Microsoft Edge 设置不同的比例。

谢谢。

解决方法

以防万一发生在某人身上,问题是我没有设置@page 大小,所以我想每个浏览器默认情况下都会采用不同的。

我在css中添加了下一行

@page {size: portrait}

现在打印出来的结果完全一样。