When the Government published its draft Investigatory Powers Bill, it provided a nearly useful PDF copy. "Nearly", because the formatting is chaotic (eg, sometimes you can select a section title with its number, and sometimes you can't).
So, I used the very good (nearly excellent PDF Outliner) to create a table of contents. Unfortunately, its automatic outliner didn't work (because of the aforementioned chaos in the PDF itself). So it was quite a tedious process. Tip: use Apple keyboard preferences to create a keyboard shortcut for "Number Sequentially...". It's probably also useful to remap several other keys for large docs like this, for ergonomic reasons.
Anyway, Javier Ruiz of the absolutely excellent Open Rights Group, asked if I was going to produce a copy of the now published Bill. So, here it is. Tip: hit the download button at the top of the page.