Prefix Area



The WPG file starts with a prefix made of both the extended 26-byte WPCORP prefix header and a variable-length prefix packet data section. The fixed 26-byte prefix header will have the following values:

<-1> <"W"> <"P"> <"C"> (WPCORP File ID)

{start of document (pointer to start_WPG record)}

<product type, always 1 for WPG files>

<file type, always 22 (0x16) for WPG files>

<major version #, always 2 for WPG 2.0 files>

<minor version #, always zero for WPG 2.0 files>

[encryption key (zero value if not encrypted)]

[start packet data]

<entry count (number of entries in extension)>

<resource complete (resource completeness indicator)>

[start encryption (encryption block offset)]

{file size}

[encryption version]

The Entry Count does not include the Resource Complete field as an entry.

Currently there are no packets defined, but there may be in the future. Indexes for such packets would begin immediately after the above information.

Variable length prefix packet data, if it exists, may contain packets such as Extended Document Summary, Filenames, Document Printer Information, Document Font List, PS Table, and/or other packets. These packets would be the same as those used by the WP6.0 document file format. For a complete list of possible prefix packets, a description of their format, and a complete description of the extended header and its fields, see Document File Format earlier in the File Format Software Developer's Kit.

When a reference is made to a packet ID remember that a packet ID is not the same as a packet type. "Packet ID"refers to the offset of the packet's index in the index block. "Packet Type" refers to the purpose and structure of the packet's data. Packet IDs are unique to each packet. You can have several packets with the same type value. See Document File Format earlier in the File Format Software Developer's Kit for more information.

An application that expects the 2.0 version of this file format should not fail unless the major number (not the minor number) of the file prefix is different than expected. A major revision to the file format should be rejected. The intent is that an application written for WPG2.0 should not be expected to read incompatible file formats such as WPG1.0.