It only works with text based files. Basically, the 'redacted' parts were highlighted in black (think highlight tool in Adobe Acrobat) instead of being replaced with blacked out sections. As it was only highlighted in black in the redaction tool/PDF app - you could highlight all the text in the document, then copy paste it into notepad or similar, revealing the 'redacted' parts.
Many PDF's and doc's are images and the technique will not work for those.