I have written the following Hello code for a pdf file.
%PDF-1.4
1 0 obj
<< /Type /Catalog /Pages 2 0 R >>
endobj
2 0 obj
<< /Kids [3 0 R] /Count 1 >>
endobj
3 0 obj
<< /Parent 2 0 R /Contents 4 0 R >>
endobj
4 0 obj
<< /Length 20 >>
stream
BT
/F1 40 Tf
100 600 Td
(Hello!) Tj
ET
endstream
endobj
trailer
<< /Root 1 0 R
/Size 3
>>
%%EOF
I want to know how the xref
table is calculated?\
UPDATE AFTER THIRD COMMENT:
Can I write a table as below?
xref
0 3
0000000000 65536 f
0000000001 00000 n
0000000002 00000 n
0000000003 00000 n
What is wrong with that (if any)?
The example in this page, shows that there are differences (greater than 1) between objects in xref. However, it is not clear why first object has offset 15 and second object has 87 offset. How these numbers are calculated?