<?xml version="1.0" encoding="utf-8"?>
<PRONOM-Report xmlns="http://pronom.nationalarchives.gov.uk">
  <report_format_detail>
    <FileFormat>
      <FormatID>532</FormatID>
      <FormatName>TeX/LaTeX Device Independent Document</FormatName>
      <FormatVersion>
      </FormatVersion>
      <FormatAliases>DVI</FormatAliases>
      <FormatFamilies>
      </FormatFamilies>
      <FormatTypes>Page Description</FormatTypes>
      <FormatDisclosure>Full</FormatDisclosure>
      <FormatDescription>The Device Independent File Format (DVI) is the output file format of the TeX typesetting program. DVI files comprise binary data describing the visual layout of a document in a device-independent manner. A DVI file consists of a preamble, a sequence of commands defining one or more pages of text, and a postamble. Each command comprises an eight-bit opcode, followed by zero or more bytes of parameters. DVI driver software is required to render or print DVI files, or to convert them to other formats, such as PostScript or PDF.</FormatDescription>
      <BinaryFileFormat>Binary</BinaryFileFormat>
      <ByteOrders>Big-endian (Motorola)</ByteOrders>
      <ReleaseDate>01 Jan 1979</ReleaseDate>
      <WithdrawnDate>
      </WithdrawnDate>
      <ProvenanceSourceID>1</ProvenanceSourceID>
      <ProvenanceName>Digital Preservation Department / The National Archives</ProvenanceName>
      <ProvenanceSourceDate>02 Aug 2005</ProvenanceSourceDate>
      <ProvenanceDescription>
      </ProvenanceDescription>
      <LastUpdatedDate>16 Mar 2012</LastUpdatedDate>
      <FormatNote>
      </FormatNote>
      <FormatRisk>
      </FormatRisk>
      <TechnicalEnvironment>
      </TechnicalEnvironment>
      <FileFormatIdentifier>
        <Identifier>application/x-dvi</Identifier>
        <IdentifierType>MIME</IdentifierType>
      </FileFormatIdentifier>
      <FileFormatIdentifier>
        <Identifier>fmt/160</Identifier>
        <IdentifierType>PUID</IdentifierType>
      </FileFormatIdentifier>
      <ExternalSignature>
        <ExternalSignatureID>519</ExternalSignatureID>
        <Signature>dvi</Signature>
        <SignatureType>File extension</SignatureType>
      </ExternalSignature>
      <InternalSignature>
        <SignatureID>605</SignatureID>
        <SignatureName>TeX/LaTeX Device-Independent Document</SignatureName>
        <SignatureNote>Opcode 0xF7, pre (the preamble) must be the first opcode in the DVI file. It takes at least fourteen bytes of parameters, plus an optional comment of up to 255 bytes. The first parameter is 1 byte that identifies DVI format; currently this byte is always set to 0x02.  Opcode 0xF9, post_postamble is the last opcode of the dvi file.  It is followed by a 4 byte pointer to the post command that started the postamble. An identification byte, comes next, which currently equals 0x02. 
The identification byte is followed by four or more bytes that are all equal to 0xDF. TeX puts out four to seven of these trailing bytes, until the total length of the file is a multiple of four bytes.</SignatureNote>
        <ByteSequence>
          <ByteSequenceID>749</ByteSequenceID>
          <PositionType>Absolute from BOF</PositionType>
          <Offset>0</Offset>
          <MaxOffset>
          </MaxOffset>
          <IndirectOffsetLocation>
          </IndirectOffsetLocation>
          <IndirectOffsetLength>
          </IndirectOffsetLength>
          <Endianness>
          </Endianness>
          <ByteSequenceValue>F702</ByteSequenceValue>
        </ByteSequence>
        <ByteSequence>
          <ByteSequenceID>750</ByteSequenceID>
          <PositionType>Absolute from EOF</PositionType>
          <Offset>0</Offset>
          <MaxOffset>
          </MaxOffset>
          <IndirectOffsetLocation>
          </IndirectOffsetLocation>
          <IndirectOffsetLength>
          </IndirectOffsetLength>
          <Endianness>
          </Endianness>
          <ByteSequenceValue>F9{4}02{0-3}DFDFDFDF</ByteSequenceValue>
        </ByteSequence>
      </InternalSignature>
    </FileFormat>
    <SearchCriteria>Criteria</SearchCriteria>
  </report_format_detail>
</PRONOM-Report>
