{
  "compression": {
    "object_streams": true
  },
  "items": [
    {
      "type": "text",
      "rect": {
        "llx": 60,
        "lly": 758.4,
        "urx": 535,
        "ury": 780
      },
      "content": [
        "What packing a document saves"
      ],
      "font": "DejaVuSans",
      "font_size": 18,
      "pages": [
        1
      ]
    },
    {
      "type": "text",
      "rect": {
        "llx": 60,
        "lly": 664,
        "urx": 535,
        "ury": 748
      },
      "content": [
        "A PDF is mostly dictionaries — the catalogue, the page tree, every page, every font, every annotation — and a dictionary is not a stream, so each one is written out in full and none of them is compressed.\nObject streams gather them into streams that are compressed together, and the table stating where every object lives becomes a stream too. The document a reader sees is the same one either way."
      ],
      "font": "DejaVuSans",
      "font_size": 10,
      "leading": 14,
      "pages": [
        1
      ]
    },
    {
      "type": "text",
      "rect": {
        "llx": 60,
        "lly": 622,
        "urx": 535,
        "ury": 636
      },
      "content": [
        "The document weighed here holds 24 pages of text, each with a heading of its own."
      ],
      "font": "DejaVuSans",
      "font_size": 10,
      "leading": 14,
      "pages": [
        1
      ]
    },
    {
      "type": "text",
      "rect": {
        "llx": 60,
        "lly": 586.8,
        "urx": 535,
        "ury": 600
      },
      "content": [
        "The same document, weighed twice"
      ],
      "font": "DejaVuSans",
      "font_size": 11,
      "pages": [
        1
      ]
    },
    {
      "type": "text",
      "rect": {
        "llx": 60,
        "lly": 562,
        "urx": 535,
        "ury": 574
      },
      "content": [
        "Spelled out"
      ],
      "font": "DejaVuSans",
      "font_size": 10,
      "pages": [
        1
      ]
    },
    {
      "type": "text",
      "rect": {
        "llx": 220,
        "lly": 562,
        "urx": 535,
        "ury": 574
      },
      "content": [
        "22 877 bytes"
      ],
      "font": "DejaVuSans",
      "font_size": 10,
      "pages": [
        1
      ]
    },
    {
      "type": "text",
      "rect": {
        "llx": 60,
        "lly": 542,
        "urx": 535,
        "ury": 554
      },
      "content": [
        "Packed"
      ],
      "font": "DejaVuSans",
      "font_size": 10,
      "pages": [
        1
      ]
    },
    {
      "type": "text",
      "rect": {
        "llx": 220,
        "lly": 542,
        "urx": 535,
        "ury": 554
      },
      "content": [
        "18 489 bytes"
      ],
      "font": "DejaVuSans",
      "font_size": 10,
      "pages": [
        1
      ]
    },
    {
      "type": "text",
      "rect": {
        "llx": 60,
        "lly": 522,
        "urx": 535,
        "ury": 534
      },
      "content": [
        "Saved"
      ],
      "font": "DejaVuSans",
      "font_size": 10,
      "pages": [
        1
      ]
    },
    {
      "type": "text",
      "rect": {
        "llx": 220,
        "lly": 522,
        "urx": 535,
        "ury": 534
      },
      "content": [
        "4 388 bytes"
      ],
      "font": "DejaVuSans",
      "font_size": 10,
      "pages": [
        1
      ]
    },
    {
      "type": "text",
      "rect": {
        "llx": 60,
        "lly": 444,
        "urx": 535,
        "ury": 486
      },
      "content": [
        "Packing this document saved 19 per cent of it. What it saves goes up with the number of pages, because a page costs a handful of dictionaries and dictionaries are what packing compresses."
      ],
      "font": "DejaVuSans",
      "font_size": 10,
      "leading": 14,
      "pages": [
        1
      ]
    },
    {
      "type": "text",
      "rect": {
        "llx": 60,
        "lly": 396,
        "urx": 535,
        "ury": 424
      },
      "content": [
        "This very file is packed, so a reader that opened it has read one of the two documents being weighed."
      ],
      "font": "DejaVuSans",
      "font_size": 10,
      "leading": 14,
      "pages": [
        1
      ]
    },
    {
      "type": "flow",
      "rect": {
        "llx": 60.0,
        "lly": 740.0,
        "urx": 535.0,
        "ury": 758.4
      },
      "content": "The same document, weighed other ways",
      "font": "DejaVuSans",
      "font_size": 18.0,
      "first_baseline": {
        "points": 0
      },
      "pages": [
        2
      ]
    },
    {
      "type": "flow",
      "rect": {
        "llx": 60.0,
        "lly": 716.0,
        "urx": 535.0,
        "ury": 748.0
      },
      "content": "With compression off it weighs 31 242 bytes; at level 1, 26 906; at level 6, the default, 22 877; at level 9, 22 866.",
      "font": "DejaVuSans",
      "font_size": 10.0,
      "leading": 14.0,
      "pages": [
        2
      ]
    },
    {
      "type": "flow",
      "rect": {
        "llx": 60.0,
        "lly": 678.0,
        "urx": 535.0,
        "ury": 710.0
      },
      "content": "Given a title, it weighs 22 971 bytes with its information dictionary and 25 418 without it, the title then said in its metadata alone; the dictionary is written: no.",
      "font": "DejaVuSans",
      "font_size": 10.0,
      "leading": 14.0,
      "pages": [
        2
      ]
    },
    {
      "type": "flow",
      "rect": {
        "llx": 60.0,
        "lly": 640.0,
        "urx": 535.0,
        "ury": 672.0
      },
      "content": "A dry run, which writes nothing, counts 24 pages and 56 objects, written as PDF 1.7 though PDF 1.4 would do, and 0 warnings.",
      "font": "DejaVuSans",
      "font_size": 10.0,
      "leading": 14.0,
      "pages": [
        2
      ]
    },
    {
      "type": "flow",
      "rect": {
        "llx": 60.0,
        "lly": 602.0,
        "urx": 535.0,
        "ury": 634.0
      },
      "content": "Written with its warnings reported it weighs 22 877 bytes, and 22 877 written to a stream the same way; warnings: 0.",
      "font": "DejaVuSans",
      "font_size": 10.0,
      "leading": 14.0,
      "pages": [
        2
      ]
    },
    {
      "type": "flow",
      "rect": {
        "llx": 60.0,
        "lly": 578.0,
        "urx": 535.0,
        "ury": 596.0
      },
      "content": "Packed into object streams: no; laid out first page first: no; the version it needs: PDF 1.4.",
      "font": "DejaVuSans",
      "font_size": 10.0,
      "leading": 14.0,
      "pages": [
        2
      ]
    },
    {
      "type": "flow",
      "rect": {
        "llx": 60.0,
        "lly": 540.0,
        "urx": 535.0,
        "ury": 572.0
      },
      "content": "With a cover put in front and a bookmark to it put first, it holds 25 pages, and its first bookmark reads “Cover”.",
      "font": "DejaVuSans",
      "font_size": 10.0,
      "leading": 14.0,
      "pages": [
        2
      ]
    },
    {
      "type": "flow",
      "rect": {
        "llx": 60.0,
        "lly": 488.0,
        "urx": 535.0,
        "ury": 534.0
      },
      "content": "A line of four hundred characters measured inside a measuring pass costs the file nothing: 7 602 bytes, and 7 602 with the pass held open by hand, against 24 979 when measured outside one.",
      "font": "DejaVuSans",
      "font_size": 10.0,
      "leading": 14.0,
      "pages": [
        2
      ]
    }
  ]
}
