Skip to content

1.1 File structure and syntax

Felix Schütt edited this page Jul 5, 2017 · 3 revisions

PDF is a text-based format similar to PostScript. In theory you could write PDF documents using the text editor of your choice. However, I would not advise you to actually do this - PDF is made to be generated by programs / graphical editors. It is however possible to generate a PDF so that its contents are human-readable. This technique may bloat the file size, but is very useful during debugging.

PDF is also a clearly defined file format in a descriptive way. It mostly contains hierarchically structured values, which describe the document. This is different from PostScript, which is not structured and has an imperative style - in order to change something on the last page, you have to process the whole file, up to the last page (PostScript is stack-based, every operation depends on the previous ones). However PostScript is easier to generate, but PDF is easier to read and interpret - which has led to the massive success of PDF in our modern world.

Next up: Hello World PDF

Clone this wiki locally