Skip to content

1.1.4 Implementation limits

Felix Schütt edited this page Jul 6, 2017 · 3 revisions

The following rules are not a part of the PDF specification, however you should respect them to achieve maximal compatibility with PDF viewers / editors:

  • Integers should be in the range between -2'147'483'648 and 2'147'483'647
  • Floating point numbers should be in the range between -32'767 and 32'767 and should not contain more than 5 decimal places
  • Arrays should not have more than 8191 entries
  • Dictionaries should not have more than 4095 entries
  • Strings should not be longer than 65'535 bytes
  • Names should be at most 127 bytes long
  • A PDF should at most contain 8'388'607 indirect objects

A bit more detailed:

  • Sub-arrays and sub-dictionaries only count as a single entry in the parent array / dictionary
  • In strings, only characters that are visible to the user count (backslashes do not count as characters). One character needs one byte for a simple character access, two bytes for a complete character access (see "Full character range" in the chapter "Advanced Typography").
  • In names, hex-coded characters are counted as one byte. All other characters, including the preliminary backslash, count as one byte.

Next up: Metadata and page parameters

Clone this wiki locally