%PDF-1.0 % Copyright Paul Sladen 2004-07-30 % % xpdf ./minimal.pdf % acroread ./minimal.pdf % mupdf ./minimal.pdf % gv ./minimal.pdf % % Example, minimal PDF (Portable Document Format / COS) file. % % ./pdftrailer hand-edited.pdf > fully-formed.pdf % % If you change the offset of any items in this file by editing, % you'll need to regenerate the xref cross-reference table with % a suitable tool (see above). % % You may use this file under the terms of any DFSG (Debian Free % Software Guidelines) licence [eg. BSD, Artistic, GPL, LGPL]; % provided that the above Copyright notice is preserved. % First, start at the top of the tree with the Root Catalog object 1 0 obj << /Type /Catalog /Pages 2 0 R >> endobj % The specification says that this dictionary can't be inlined into the /Catalog 2 0 obj << /Type /Pages /Count 1 /Kids [3 0 R] >> endobj % In PDF, must always setup page dimensions (unlike in Postscript) 3 0 obj << /Type /Page % ISO-A4 210mm x 297mm portrait, 1mm == 2.835pt % 595.276 841.89 /MediaBox [0 0 595 842] /Resources << /ProcSet [/PDF ] % For some reason(?) Acroread wants at least *one* font... /Font << /F 4 0 R >> >> /Contents 5 0 R % Acroread needs this line, everything else reads the PDF fine without /Parent 2 0 R >> endobj % Setup a font (grab one of the 13 built-in ones for convenience) 4 0 obj << /Type /Font /Subtype /Type1 /BaseFont /Helvetica-Bold >> endobj % The content stream contains the actual (Postscript-like) % drawing instructions: % w: set-linewidth, re: rectangle, S: stroke % Tf: findfont & scalefont, Td: moveto, (string), Tj: text-fill 5 0 obj << /Type /Content /Length 87 >> stream 10 w 28 28 539 785 re S BT /F 48 Tf 42 420 Td (This is a minimal PDF!) Tj ET endstream % The number of bytes between the stream\n...\nendstream % must match the /Length above endobj % The following binary cross-reference table allows fast % locating of objects in the PDF document. Each entry is % exactly 20-bytes long. If you hand-edit the file above % you will normally have to recreate this using a program. % % Don't worry about removing this one; it's possible to % just append a new one of the end! xref 0 6 0000000000 65535 f 0000000701 00000 n 0000000835 00000 n 0000000966 00000 n 0000001411 00000 n 0000001685 00000 n trailer << /Size 6 /Root 1 0 R >> startxref 2255 %%EOF