Absolutely this. Never try to parse a native PDF document with any expectation of coherence or consistency.