像素,尺寸大小的转换

  • Post author:
  • Post category:其他


今日转换打印机页面大小时有些含糊,现做记录。

以A4纸为例:

XPS文件中print ticket 大小如下:

<psf:Feature name="psk:PageMediaSize">
<psf:Option name="psk:ISOA4">
<psf:ScoredProperty name="psk:MediaSizeWidth">
<psf:Value xsi:type="xsd:integer">210000</psf:Value>
</psf:ScoredProperty>
<psf:ScoredProperty name="psk:MediaSizeHeight">
<psf:Value xsi:type="xsd:integer">297000</psf:Value>
</psf:ScoredProperty>
</psf:Option>
</psf:Feature>

单位为微米。

即A4大小以毫米计算,为 210×297mm.

分辨率是96像素/英寸时,A4纸的尺寸的图像的像素是794×1123; 分辨率是150像素/英寸时,A4纸的尺寸的图像的像素是1240×1754; 分辨率是300像素/英寸时,A4纸的尺寸的图像的像素是2480×3508;

1英寸 = 25.4毫米

则在windows下96像素中右毫米转换为像素则有简单公式可得: a=210mm; (a/25.4)*96.

我同样找到了



版权声明:本文为sandro_zhang原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。