POI 中PPT 文件格式

本文介绍了PPT文档的内部结构,包括记录、容器和原子的基本概念。详细解释了记录的格式,如何区分容器和原子记录,并探讨了文本样式设置的相关记录。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Records, Containers and Atoms

 

PPT document contrains a tree of Records.

Each Record contain either other records(Act as a contanier)

  or data(act as Atoms). Record cannot contain both.

 

PowerPoint documents don't have one overall container record

There are a number of different container records to be found at the top level.

 

 

Format of Record:

1/2 byte container flag 1.5 byte option field 2 byte record type 4 byte record length

 

If the first byte of the header, BINARY_AND with 0x0f, is 0x0f, then the record is a container. Otherwise, it's an atom.

The rest of the first two bytes are used to store the "options" for the record.

Most commonly, this is used to indicate the version of the record, but the exact useage is record specific.

 

The record type is a little endian number.

PowerPoint records have a type that's normally less than 6000 (decimal). Escher records normally have a type between 0xF000 and 0xF1FF.

 

 The record length is another little endian number

For an atom, it's the size of the data part of the record

For a container, it's the size of all the records that are children of this record

 

 

A small number of records contain byte level position offsets to other records.

So if you change the position of any records in the file, then there's a good chance that you will need to update some of these special records.

 

 

 

Paragraph and Text Styling

a number of records that affect the styling of text

a smaller number that are responsible for the styling of paragraphs

By default, a given set of text will inherit paragraph and text stylings from the appropriate master sheet

Normally, powerpoint will have one text record (TextBytesAtom or TextCharsAtom) for every paragraph, with a preceeding TextHeaderAtom to describe what sort of paragraph it is.

 

TextBytesAtom

TextCharsAtom

 

 

StyleTextPropAtom

FontCollection [live inside Document.Environment.FontCollection]

FontEntityAtom

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值