5.1. lf.apps.msoffice.shared — Shared Microsoft Office artifacts

This module defines classes to work with functionality shared across several Microsoft Office products. The classes are designed to extend/override some of the classes in lf.win.ole.ps.

5.1.1. Inheritance Diagrams

5.1.1.1. Common data types

digraph mso_shared_common_data_types {
        fontname = "Courier New"
        fontsize = 10

        node [
                fontname = "Courier New"
                fontsize = 10
                shape = "record"
        ]

        edge [
                arrowhead = "none"
                arrowtail = "empty"
                fontsize = 8
        ]

        ClipboardData [
                label = "{ClibpoardData\l|format\ldata\l|}"
        ]

        CodePageString [
                label = "{CodePageString\l|\l|}"
        ]

        ValuePacket [
                label = "{ValuePacket\l|size\lvalue\l|}"
        ]

        Vector [
                label = "{Vector\l|\l|}"
        ]

        UnicodeString [
                label = "{UnicodeString\l|\l|}"
        ]

        Blob [
                label = "{Blob\l|\l|}"
        ]

        VtThumbnailValue [
                label = "{VtThumbnailValue\l|tag\lformat_id\l|}"
        ]

        Lpstr [
                label = "{Lpstr\l|\l|}"
        ]

        Lpwstr [
                label = "{Lpwstr\l\l}"
        ]

        UnalignedLpstr [
                label = "{UnalignedLpstr\l|\l|}"
        ]

        VtVecUnalignedLpstrValue [
                label = "{VtVecUnalignedLpstrValue\l|\l|}"
        ]

        VtHeadingPair [
                label = "{VtHeadingPair\l|heading_str\lheader_parts_count\l|}"
        ]

        VtVecHeadingPairValue [
                label = "{VtVecHeadingPairValue\l|\l|}"
        ]

        VtDigSigValue [
                label = "{VtDigSigValue\l|\l|}"
        ]

        VtHyperlink [
                label = "{VtHyperlink\l|" +
                                "hash\lapp\loffice_art\linfo\lhlink1\lhlink2\l|}"
        ]

        VecVtHyperlink [
                label = "{VecVtHyperlink\l|hyperlinks\l|}"
        ]

        VtHyperlinkValue [
                label = "{VtHyperlinkValue\l|vec_hyperlinks\l|}"
        ]

        DigSigBlob [
                label = "{DigSigBlob\l|sig_info\lsig_info_offset\l|}"
        ]

        DigSigInfoSerialized [
                label = "{DigSigInfoSerialized\l|" +
                                "sig\ltimestamp\lsigning_cert_store\lproject_name\l" +
                                "timestamp_buf\l|}"
        ]

        ValuePacket -> ClipboardData;
        ValuePacket -> CodePageString;
        ValuePacket -> Vector;
        ValuePacket -> UnicodeString;
        ValuePacket -> Blob;
        ValuePacket -> VtHeadingPair;
        ValuePacket -> VtDigSigValue;
        ValuePacket -> VtHyperlink;
        ValuePacket -> DigSigBlob;
        ValuePacket -> DigSigInfoSerialized;

        ClipboardData -> VtThumbnailValue;
        CodePageString -> Lpstr;
        CodePageString -> UnalignedLpstr;
        Vector -> VtVecUnalignedLpstrValue;
        UnicodeString -> Lpwstr;
        Vector -> VtVecLpwstrValue;
        Vector -> VtVecHeadingPairValue;
        Vector -> VecVtHyperlink;
        Blob -> VtHyperlinkValue;

}

5.1.1.2. Typed Property Value (TPV) classes

digraph mso_shared_tpv_classes {
        fontname = "Courier New"
        fontsize = 10

        node [
                fontname = "Courier New"
                fontsize = 10
                shape = "record"
        ]

        edge [
                arrowhead = "none"
                arrowtail = "empty"
                fontsize = 8
        ]

        TypedPropertyValue [
                label = "{TypedPropertyValue\l|size\lvalue\ltype\l_ctype\l|}"
        ]

        VtVecUnalignedLpstr [
                label = "{VtVecUnalignedLpstr\l|\l|}"
        ]

        VtVecLpwstr [
                label = "{VtVecLpwstr\l|\l|}"
        ]

        VtString [
                label = "{VtString\l|\l|}"
        ]

        VtUnalignedString [
                label = "{VtUnalignedString\l|\l|}"
        ]

        VtVecHeadingPair [
                label = "{VtVecHeadingPair\l|\l|}"
        ]

        VtDigSig [
                label = "{VtDigSig\l|\l|}"
        ]

        VtHyperlinks [
                label = "{VtHyperlinks\l|\l|}"
        ]

        TypedPropertyValue -> VtVecUnalignedLpstr;
        TypedPropertyValue -> VtVecLpwstr;
        TypedPropertyValue -> VtString;
        TypedPropertyValue -> VtUnalignedString;
        TypedPropertyValue -> VtVecHeadingPair;
        TypedPropertyValue -> VtDigSig;
        TypedPropertyValue -> VtHyperlinks;
}

5.1.1.3. Metadata

digraph mso_shared_metadata {
        fontname = "Courier New"
        fontsize = 10

        node [
                fontname = "Courier New"
                fontsize = 10
                shape = "record"
        ]

        edge [
                arrowhead = "none"
                arrowtail = "empty"
                fontsize = 8
        ]

        PropertiesMetadata [
                label = "{PropertiesMetadata\l|" +
                                "code_page\ldictionary\llocale\lbehavior\lattr_exists\l|}"
        ]

        SummaryInfo [
                label = "{SummaryInfo\l|" +
                                "title\lsubject\lauthor\lkeywords\lcomments\ltemplate\l" +
                                "last_author\lrev\ledit_time_tot\lprint_time\lbtime\l" +
                                "mtime\lpage_count\lword_count\lchar_count\lthumbnail\l" +
                                "app_name\lsecurity\l|}"
        ]

        DocSummaryInfo [
                label = "{DocSummaryInfo\l|" +
                                "category\lpres_format\lbyte_count\lpara_count\l" +
                                "slide_count\lnote_count\lhidden_count\lmm_clip_count\l" +
                                "scale\lheading_pair\ldoc_parts\lmanager\lcompany\l" +
                                "links_dirty\lchar_count_full\lshared_doc\llink_base\l" +
                                "hlinks\lhyperlinks_changed\lver_major\lver_minor\l" +
                                "dig_sig\lcontent_type\lcontent_status\llanguage\l" +
                                "doc_version\l|}"
                ]

        UserDefinedProperties [
                label = "{UserDefinedProperties\l|" +
                                "linked\lguid\llink_base\lhlinks\l|}"
        ]

        PropertiesMetadata -> SummaryInfo;
        PropertiesMetadata -> DocSummaryInfo;
        PropertiesMetadata -> UserDefinedProperties;
}

5.1.2. Headers

class lf.apps.msoffice.shared.PropertySetSystemIdentifier

Represents a PropertySetSystemIdentifier structure.

os_ver_major
The major version number of the operating system that wrote the property set.
os_ver_minor
The minor version number of the operating system that wrote the property set.
os_type
The os type field.
from_stream(stream, offset=None):

Creates a PropertySetSystemIdentifier object from a stream.

Parameters:
  • stream (IStream) – A stream that contains the structure.
  • offset (int) – The start of the structure in stream.
Return type:

PropertySetSystemIdentifier

Returns:

The corresponding PropertySetSystemIdentifier object.

from_ctype(ctype):

Creates a PropertySetSystemIdentifier from a ctype.

Parameter:ctype (property_set_system_identifier) – An instance of a property_set_system_identifier
class lf.apps.msoffice.shared.PropertySetStreamHeader

Subclasses lf.win.ole.ps.PropertySetStreamHeader, replacing the sys_id attribute with an instance of a PropertySetSystemIdentifier.

sys_id
The system identifier field.
from_stream(stream, offset=None):

Creates a PropertySetStreamHeader from a stream.

Parameters:
  • stream (IStream) – A stream that contains the structure.
  • offset (int) – The start of the structure in stream.
Return type:

PropertySetStreamHeader

Returns:

The corresponding PropertySetStreamHeader object.

5.1.3. Common data types

class lf.apps.msoffice.shared.VtThumbnailValue

Represents a VtThumbnailValue structure.

data
The data for the thumbnail image. If tag is 0, then this field will contain whatever data is between the tag field and the end of the packet.
tag
The value of the cftag field. This is the format field from the VT_CF type. If this value is 0, then the format_id attribute is None.
format_id
The format of the data in data.
value
An alias for the data attribute.
format
An alias for the tag attribute.
classmethod from_stream(stream, offset=None)

Creates a VtThumbnailValue from a stream.

Parameters:
  • stream (IStream) – A stream that contains the structure.
  • offset (int) – The start of the structure in stream.
Return type:

VtThumbnailValue

Returns:

The corresponding VtThumbnailValue object.

class lf.apps.msoffice.shared.Lpstr

Represents an Lpstr structure (packet).

Note

This is essentially a CodePageString that if properly decoded, is truncated at the first NULL character.

classmethod from_stream(stream, offset=None, decoder=None)

Creates an Lpstr from a stream.

Parameters:
  • stream (IStream) – A stream that contains the structure.
  • offset (int) – The start of the structure in stream.
  • decoder (codecs.codec) – An optional codec to decode the string.
Return type:

Lpstr

Returns:

The corresponding Lpstr object.

class lf.apps.msoffice.shared.UnalignedLpstr

Represents an UnalignedLpstr structure (packet).

Note

This is similar to a CodePageString, except that it is NULL terminated and does not have padding.

classmethod from_stream(stream, offset=None, decoder=None)

Creates an UnalignedLpstr from a stream.

Parameters:
  • stream (IStream) – A stream that contains the structure.
  • offset (int) – The start of the structure in stream.
  • decoder (codecs.codec) – An optional codec to decode the string.
Return type:

UnalignedLpstr

Returns:

The corresponding UnalignedLpstr object.

class lf.apps.msoffice.shared.VtVecUnalignedLpstrValue

Represents a VtVecUnalignedLpstrValue structure (packet).

Note

This is effectively a (VT_VECTOR | VT_LPSTR) with UnalignedLpstr strings.

scalar_count
The number of strings in the data.
value
A list of (unaligned) strings.
classmethod from_stream(stream, offset=None, decoder=None)

Creates a VtVecUnalignedLpstrValue from a stream.

Parameters:
  • stream (IStream) – A stream that contains the structure.
  • offset (int) – The start of the structure in stream.
  • decoder (codecs.codec) – An optional codec to decode the string.
Return type:

VtVecUnalignedLpstrValue

Returns:

The corresponding VtVecUnalignedLpstrValue object.

class lf.apps.msoffice.shared.Lpwstr

Represents a Lpwstr structure (packet).

Note

This class is essentially a UnicodeString class, but was included for purposes of completeness.

class lf.apps.msoffice.shared.VtVecLpwstrValue

Represents a VtVecLpwstrValue structure (packet).

Note

This class is essentially a Vector class that has a hard coded scalar type of Lpwstr.

classmethod from_stream(stream, offset=None, decoder=None)

Creates a VtVecLpwstrValue from a stream.

Parameters:
  • stream (IStream) – A stream that contains the structure.
  • offset (int) – The start of the structure in stream.
  • decoder (codecs.codec) – An optional codec to decode the string.
Return type:

VtVecLpwstrValue

Returns:

The corresponding VtVecLpwstrValue object.

class lf.apps.msoffice.shared.VtHeadingPair

Represents a VtHeadingPair structure (packet).

heading_str
The header string as a VtUnalignedString.
header_parts
A VT_I4 instance, where the value attribute is the number of document parts associated with the header.
value
An alias for the heading_str attribute.
classmethod from_stream(stream, offset=None, decoder=None)

Creates a VtHeadingPair from a stream.

Parameters:
  • stream (IStream) – A stream that contains the structure.
  • offset (int) – The start of the structure in stream.
  • decoder (codecs.codec) – An optional codec to decode the string.
Return type:

VtHeadingPair

Returns:

The corresponding VtHeadingPair object.

class lf.apps.msoffice.shared.VtVecHeadingPairValue

Represents a VtVecHeadingPairValue structure (packet).

Note

This class is a Vector class that has a hard coded scalar type of VtHeadingPair.

classmethod from_stream(stream, offset=None, decoder=None)

Creates a VtVecHeadingPairValue from a stream.

Parameters:
  • stream (IStream) – A stream that contains the structure.
  • offset (int) – The start of the structure in stream.
  • decoder (codecs.codec) – An optional codec to decode the string.
Return type:

VtVecHeadingPairValue

Returns:

The corresponding VtVecHeadingPairValue object.

class lf.apps.msoffice.shared.VtDigSigValue

Represents a VtDigSigValue structure (packet).

value
An instance of DigSigBlob.
classmethod from_stream(stream, offset=None, decoder=None)

Creates a VtDigSigValue from a stream.

Parameters:
  • stream (IStream) – A stream that contains the structure.
  • offset (int) – The start of the structure in stream.
  • decoder (codecs.codec) – An optional codec to decode the string.
Return type:

VtDigSigValue

Returns:

The corresponding VtDigSigValue object.

Represents a VtHyperlink structure (packet).

hash
The value of the dwHash field (hash of hlink1 and hlink2)
app
The value of the dwApp field.
office_art
The value of the dwOfficeArt field.
info
The value of the dwInfo field.
hlink1
The hyperlink target.
hlink2
The hyperlink location.
value
An alias for the hlink2 attribute.
classmethod from_stream(stream, offset=None, decoder=None)

Creates a VtHyperlink from a stream.

Parameters:
  • stream (IStream) – A stream that contains the structure.
  • offset (int) – The start of the structure in stream.
  • decoder (codecs.codec) – An optional codec to decode the string.
Return type:

VtHyperlink

Returns:

The corresponding VtHyperlink object.

Represents a VecVtHyperlink structure (packet).

Note

This class is a Vector class with a scalar type hardcoded to VtHyperlink.

A list of VtHyperlink objects.
value
An alias for the hyperlinks attribute.
classmethod from_stream(stream, offset=None, decoder=None)

Creates a VecVtHyperlink from a stream.

Parameters:
  • stream (IStream) – A stream that contains the structure.
  • offset (int) – The start of the structure in stream.
  • decoder (codecs.codec) – An optional codec to decode the string.
Return type:

VecVtHyperlink

Returns:

The corresponding VecVtHyperlink object.

class lf.apps.msoffice.shared.VtHyperlinkValue

Represents a VtHyperlinkValue structure (packet).

An instance of VecVtHyperlink.
value
An alias for the vec_hyperlinks attribute.
classmethod from_stream(stream, offset=None, decoder=None)

Creates a VtHyperlinkValue from a stream.

Parameters:
  • stream (IStream) – A stream that contains the structure.
  • offset (int) – The start of the structure in stream.
  • decoder (codecs.codec) – An optional codec to decode the string.
Return type:

VtHyperlinkValue

Returns:

The corresponding VtHyperlinkValue object.

class lf.apps.msoffice.shared.DigSigBlob

Represents a DigSigBlob structure (packet).

sig_info_offset
The offset of the sig_info attribute.
sig_info
An instance of DigSigInfoSeralized.
value
An alias for the sig_info attribute.
classmethod from_stream(stream, offset=None, decoder=None)

Creates a DigSigBlob from a stream.

Parameters:
  • stream (IStream) – A stream that contains the structure.
  • offset (int) – The start of the structure in stream.
  • decoder (codecs.codec) – An optional codec to decode the string.
Return type:

DigSigBlob

Returns:

The corresponding DigSigBlob object.

class lf.apps.msoffice.shared.DigSigInfoSerialized

Represents a DigSigInfoSerialized structure (packet).

sig_size
The size of the sig_buf attribute.
sig_offset
The relative offset (from the parent structure) of the sig_buf attribute. If the parent structure is a DigSigBlob then the offset is relative to the start of the parent structure. If the parent structure is a WordSigBlob Then the offset is relative to the cbSigInfo field of the parent structure.
cert_store_size
The size of the cert_store_buf attribute.
cert_store_offset
The relative offset (from the parent structure) of the cert_store_buf attribute. If the parent structure is a DigSigBlob then the offset is relative to the start of the parent structure. If the parent structure is a WordSigBlob Then the offset is relative to the cbSigInfo field of the parent structure.
proj_name_size
The size of the proj_name_buf attribute.
proj_name_offset
The relative offset (from the parent structure) of the proj_name_buf attribute. If the parent structure is a DigSigBlob then the offset is relative to the start of the parent structure. If the parent structure is a WordSigBlob Then the offset is relative to the cbSigInfo field of the parent structure.
timestamp
The value of the fTimestamp field.
timestamp_buf_size
The size of the timestamp_buf attribute.
timestamp_buf_offset
The relative offset (from the parent structure) of the timestamp_buf attribute. If the parent structure is a DigSigBlob then the offset is relative to the start of the parent structure. If the parent structure is a WordSigBlob Then the offset is relative to the cbSigInfo field of the parent structure.
sig_buf
The VBA digital signature.
cert_store_buf
The digital certificate information of the certificate used to create the digital signature.
proj_name_buf
The rchProjectNameBuffer field.
timestamp_buf
The rchTimestampBuffer field.
classmethod from_stream(stream, field_base, offset=None, decoder=None)

Creates a DigSigInfoSerialized from a stream.

Parameters:
  • stream (IStream) – A stream that contains the structure.
  • field_base (int) – A value to add to the various offset fields, to determine where the corresponding fields start. For DigSigBlob this is the start of the DigSigBlob structure. For WordSigBlob this is the start of the sig_info field.
  • offset (int) – The start of the structure in stream.
  • decoder (codecs.codec) – An optional codec to decode the string.
Return type:

VtVecHeadingPairValue

Returns:

The corresponding VtVecHeadingPairValue object.

5.1.4. Typed Property Value (TPV) classes

class lf.apps.msoffice.shared.VtThumbnail

Represents a VtThumbnail structure (packet).

value
An instance of VtThumbnailValue.
classmethod from_stream(stream, offset=None, decoder=None)

Creates a VtThumbnail from a stream.

Parameters:
  • stream (IStream) – A stream that contains the structure.
  • offset (int) – The start of the structure in stream.
  • decoder (None) – This parameter is not used.
Return type:

VtThumbnail

Returns:

The corresponding VtThumbnail object.

class lf.apps.msoffice.shared.VtVecUnalignedLpstr

Represents a VtVecUnalignedLpstr structure (packet).

value
An instance of VtVecUnalignedLpstrValue.
classmethod from_stream(stream, offset=None, decoder=None)

Creates a VtVecUnalignedLpstr from a stream.

Parameters:
  • stream (IStream) – A stream that contains the structure.
  • offset (int) – The start of the structure in stream.
  • decoder (codecs.codec) – An optional codec to decode the string.
Return type:

VtVecUnalignedLpstr

Returns:

The corresponding VtVecUnalignedLpstr object.

class lf.apps.msoffice.shared.VtVecLpwstr

Represents a VtVecLpwstr structure (packet).

Note

This is essentially a (VT_VECTOR | VT_LPWSTR) TPV type, except VtVecLpwstrValue objects are used instead.

value
A list of VtVecLpwstrValue objects.
classmethod from_stream(stream, offset=None, decoder=None)

Creates a VtVecLpwstr from a stream.

Parameters:
  • stream (IStream) – A stream that contains the structure.
  • offset (int) – The start of the structure in stream.
  • decoder (codecs.codec) – An optional codec to decode the string.
Return type:

VtVecLpwstr

Returns:

The corresponding VtVecLpwstr object.

class lf.apps.msoffice.shared.VtString

Represents a VtString structure (packet).

value
The value of either Lpstr or Lpwstr objects, depending on the type attribute.
classmethod from_stream(stream, offset=None, decoder=None)

Creates a VtString from a stream.

Parameters:
  • stream (IStream) – A stream that contains the structure.
  • offset (int) – The start of the structure in stream.
  • decoder (codecs.codec) – An optional codec to decode the string.
Return type:

VtString

Returns:

The corresponding VtString object.

class lf.apps.msoffice.shared.VtUnalignedString

Represents a VtUnalignedString structure (packet).

value
The value of either UnalignedLpstr or Lpwstr objects, depending on the type attribute.
str_type
An alias for the type field.
str_value
An alias for the value field.
classmethod from_stream(stream, offset=None, decoder=None)

Creates a VtUnalignedString from a stream.

Parameters:
  • stream (IStream) – A stream that contains the structure.
  • offset (int) – The start of the structure in stream.
  • decoder (codecs.codec) – An optional codec to decode the string.
Return type:

VtUnalignedString

Returns:

The corresponding VtUnalignedString object.

class lf.apps.msoffice.shared.VtVecHeadingPair

Represents a VtVecHeadingPair structure (packet).

value
An instance of a VtVecHeadingPairValue.
classmethod from_stream(stream, offset=None, decoder=None)

Creates a VtVecHeadingPair from a stream.

Parameters:
  • stream (IStream) – A stream that contains the structure.
  • offset (int) – The start of the structure in stream.
  • decoder (codecs.codec) – An optional codec to decode the string.
Return type:

VtVecHeadingPair

Returns:

The corresponding VtVecHeadingPair object.

class lf.apps.msoffice.shared.VtDigSig

Represents a VtDigSig structure (packet).

value
An instance of VtDigSigValue.
classmethod from_stream(stream, offset=None, decoder=_uft16_le_decoder)

Creates a VtDigSig from a stream.

Parameters:
  • stream (IStream) – A stream that contains the structure.
  • offset (int) – The start of the structure in stream.
  • decoder (codecs.codec) – An optional codec to decode the string.
Return type:

VtDigSig

Returns:

The corresponding VtDigSig object.

Represents a VtHyperlinks structure (packet).

value
An instance of VtHyperlinkValue.
classmethod from_stream(stream, offset=None, decoder=None)

Creates a VtHyperlinks from a stream.

Parameters:
  • stream (IStream) – A stream that contains the structure.
  • offset (int) – The start of the structure in stream.
  • decoder (codecs.codec) – An optional codec to decode the string.
Return type:

VtHyperlinks

Returns:

The corresponding VtHyperlinks object.

5.1.5. Building properties

class lf.apps.msoffice.shared.PropertyFactory

Makes various property objects, using the classes from this module where appropriate.

classmethod make(stream, offset=None, decoder=None)

Makes a Packet object.

Parameters:
  • stream (IStream) – A stream that contains the structure.
  • offset (int) – The start of the structure in stream.
  • decoder (codecs.codec) – An optional codec to decode the string.
Return type:

Packet

Returns:

The corresponding Packet (or subclass) object.

class lf.apps.msoffice.shared.Builder

Builds property set streams, property sets, and properties.

classmethod build_property_set_stream_header(stream, offset=None)

Builds a PropertySetStreamHeader from a stream.

Parameters:
  • stream (IStream) – A stream that contains the structure.
  • offset (int) – The start of the structure in stream.
Return type:

PropertySetStreamHeader

Returns:

The corresponding PropertySetStreamHeader object.

classmethod build_properties(stream, property_set, offset=None, fmtid=None, decoder=None)

Builds a dictionary of PropertyPacket objects.

Parameters:
  • stream (IStream) – A stream that contains the property structures.
  • fmtid (UUID) – The FMTID of the property set.
  • property_set (PropertySetHeader) – A PropertySetHeader object that describes the properties in the property set.
  • offset (int) – The start of the structures in stream.
  • decoder (codecs.codec) – A codec to decode string properties.
Return type:

dict

Returns:

A dictionary of property identifiers (keys) and the corresponding PropertyPacket objects (values).

classmethod build_summary_info_properties(stream, property_set, offset=None, fmtid=None, decoder=None)

Builds a dictionary of PropertyPacket objects.

Parameters:
  • stream (IStream) – A stream that contains the property structures.
  • property_set (PropertySetHeader) – A PropertySetHeader object that describes the properties in the property set.
  • offset (int) – The start of the structures in stream.
  • fmtid (UUID) – The FMTID of the property set.
  • decoder (codecs.codec) – A codec to decode string properties.
Return type:

dict

Returns:

A dictionary of property identifiers (keys) and the corresponding PropertyPacket objects (values).

classmethod build_doc_summary_info_properties(stream, property_set, offset=None, fmtid=None, decoder=None)

Builds a dictionary of PropertyPacket objects.

Parameters:
  • stream (IStream) – A stream that contains the property structures.
  • fmtid (UUID) – The FMTID of the property set.
  • property_set (PropertySetHeader) – A PropertySetHeader object that describes the properties in the property set.
  • offset (int) – The start of the structures in stream.
  • decoder (codecs.codec) – A codec to decode string properties.
Return type:

dict

Returns:

A dictionary of property identifiers (keys) and the corresponding PropertyPacket objects (values).

5.1.6. Metadata

class lf.apps.msoffice.shared.SummaryInfo

Parsed properties from a Summary Information stream.

title
The title of the document.
subject
The subject of the document.
author
The document’s author.
keywords
Keywords for the document.
comments
The document’s comments.
template
The template used for the document.
last_author
The last author who modified the document.
rev
The revision number.
edit_time_tot
The total time spent modifying (editing) the document.
print_time
The time the document was last printed.
btime
The creation time of the document.
mtime
The time the document was last saved.
page_count
The number of pages in the document.
word_count
The number of words in the document.
char_count
The number of characters in the document.
thumbnail
An image used as a thumbnail of the document.
app_name
The name of the application that created the document.
security
The document’s security
classmethod from_properties(properties)

Creates a SummaryInfo from properties.

Parameter:properties (dict) – A dictionary of property identifiers (keys) and the corresponding PropertyPacket objects.
Return type:SummaryInfo
Returns:The corresponding SummaryInfo object.
class lf.apps.msoffice.shared.DocSummaryInfo

Parsed properties from a Document Summary Information stream.

category
The document category.
pres_format
The presentation format.
byte_count
The size of the document in bytes.
para_count
The number of paragraphs in the document.
slide_count
The number of slides in the document.
note_count
The number of notes in the document.
hidden_count
The number of hidden slides.
mm_clip_count
The number of multimedia clips in the document.
scale
The value of GKPIDDSI_SCALE.
heading_pair
A list of (heading string, document part count) tuples.
doc_parts
A list of strings of the document parts, in the same order as the elements of heading_pair.
manager
The manager associated with the document.
company
The company associated with the document.
True if any linked properties in a User Defined Property Set have changed outside of the application.
char_count_full
The number of characters in the document, including whitespace.
shared_doc
The value of GKPIDDSI_SHAREDDOC.
The base URL for converting relative links.
A list of hyperlinks.
True if the “_PID_HLINKS” property in a User Defined Property set has changed outside of the application.
ver_major
The major version of the application that wrote the document.
ver_minor
The minor version of the application that wrote the document.
dig_sig
A VBA digital signature.
content_type
The document’s content type.
content_status
The document’s content status.
language
The language associated with the document.
doc_version
The version of the document.
classmethod from_properties(properties)

Creates a DocSummaryInfo from properties.

Parameter:properties (dict) – A dictionary of property identifiers (keys) and the corresponding PropertyPacket objects.
Return type:DocSummaryInfo
Returns:The corresponding DocSummaryInfo object.
class lf.apps.msoffice.shared.UserDefinedProperties

Parsed properties from a User Defined Properties property set.

linked
A list of linked properties, in the form of (name, pid) tuples.
guid
The _PID_GUID property (decoded if possible).
The _PID_LINKBASE property (decoded if possible).
The _PID_HLINKS property. This is a list of tuples in the form of: (hash, app, office_art, info, hlink1, hlink2)
classmethod from_properties(properties)

Creates a UserDefinedProperties from properties.

Parameter:properties (dict) – A dictionary of property identifiers (keys) and the corresponding PropertyPacket objects.
Return type:UserDefinedProperties
Returns:The corresponding UserDefinedProperties object.