XLSX printerSettings.bin文件格式的定义在哪里? [英] Where is the definition of the XLSX printerSettings.bin file format?

查看:110
本文介绍了XLSX printerSettings.bin文件格式的定义在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够解析Excel保存在XLSX zip存档内的xl \ printerSettings \ printerSettingsNN.bin中的打印机设置二进制文件.大量的搜索文档都收效甚微.

I want to be able to parse the printer settings binary files that Excel saves inside xl\printerSettings\printerSettingsNN.bin inside the XLSX zip archive. Much searching for documentation avails little.

这是我不认识的常见格式,还是特定于Excel?有人知道在哪里可以找到格式的详细信息吗?

Is this a common format that I just don't recognize, or is it specific to Excel? Is anyone aware of where to find details on the format?

推荐答案

它看起来像是Windows设备特定的结构,

It looks to be a Windows device-specific structure, DEVMODE.

通过

Tracked it down via http://blogs.msdn.com/b/chrisrae/archive/2010/10/06/where-is-the-documentation-for-office-s-docx-xlsx-pptx-formats-part-2-office-2010.aspx, which links to ECMA-376, Second Edition, Part 1 - Fundamentals And Markup Language reference from www.ecma-international.org.

第160页的相关§15.2.15除外:

Except from the relevant §15.2.15 on page 160:

此零件类型的实例包含有关以下零件的信息:打印机或显示设备的初始化和环境.这此信息的布局是由应用程序定义的.

An instance of this part type contains information about the initialization and environment of a printer or a display device. The layout of this information is application-defined.

[注意:建议打印机设置部分包含记录完整的XML内容,以提高互操作性;但是,对内容的格式没有要求包含在打印机设置部件中.尾注]

[Note: It is recommended that a Printer Settings Part contain well documented XML content for improved interoperability; however, there is no requirement on the format of the content contained in a Printer Settings Part. end note]

[示例:办公室Windows上的开放XML生产器可能存储定义的DEVMODE结构这里:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/prntspol_8nle.asp,而Mac OS上的应用程序可能会选择存储打印件记录已定义此处:http://developer.apple.com/documentation/Printing/index.html.结束例子]

[Example: An Office Open XML producer on Windows might store the DEVMODE structure defined here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/prntspol_8nle.asp, while an application on the Mac OS might choose to store the print record defined here:http://developer.apple.com/documentation/Printing/index.html. end example]

(即使5568页标准也遭受链接腐烂-请参见 DEVMODE结构.)

(Even 5,568 page standards suffer link rot- see DEVMODE structure.)

这意味着,例如,在C#中,您可以使用PrinterSettings的

That means, in C# for example, you can make use of the PrinterSettings' GetHdevmode and SetHdevmode methods to interop with the structure.

这篇关于XLSX printerSettings.bin文件格式的定义在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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