HACKER Q&A
📣 MustEatCheeze

How Are PDFs Protected?


I know you cant change PDF but there are tons of websites that can turn PDF to Word. So what Even makes PDF protected any more If I can turn it, edit it and turn back it to PDF?

This opens so many cans of worms + im super interested how the so called protection works.


  👤 db48x Accepted Answer ✓
There is no protection; PDF is simply a complex format derived from Postscript, which has much more in common with programming languages than with any mere description of where pixels should go on a page. This means that in principle you can write a PDF which no conversion tool or editor can allow you to edit (see also the halting problem). The most common example of this is probably the Postscript file that computes pi as it prints. The file doesn’t store the digits that it will print out, it computes them on the fly. Some of the more obvious forms of that complexity were removed from Postscript when the PDF format was designed, but then other forms of complexity were added back in (such as Javascript support!).

In practice, however, PDFs are usually created by readily available software which produces very regular PDFs that you can write converters for.


👤 gus_massa
The other answers are very good, but I want to add my not so good answer.

Ten years ago, there were no PDF editors available for normal people, so everyone treated PDF as read only files. Now PDF editors are common, but people still didn't notice the error.

Anecdote time: Las year during the pandemic I need to republish some old info, where the original doc files were lost or trapped inside the office while I was working from home. It was not necessary to have perfect formatting, so I just edited the PDF with an online editor. So, I realize last year how easy was to edit a PDF!