I wrote a program that creates a pdf file from scratch. The output is this:
%PDF-1.3
1 0 obj
<< /Type /Catalog
/Pages 2 0 R
/Outlines 20 0 R
>>
endobj
3 0 obj
<< /Type /Font
/Subtype /Type1
/Name /Fn1
/BaseFont /Arial.BoldItalic
/Encoding /UTF8
>>
endobj
2 0 obj
<< /Type /Pages
/Count 2
/Kids [4 0 R 5 0 R ]>>
endobj
4 0 obj
<< /Type /Page
/Parent 2 0 R
/Resources << /ProcSet [/PDF /Text] /Font <</Fn1 3 0 R>> >>
/MediaBox [0 0 595.2 842]
/Contents 5 0
BT
/Fn1 24 Tf
100 400 Td
(Test) Tj
ET
>>
endobj
5 0 obj
<< /Type /Page
/Parent 2 0 R
/Resources << /ProcSet [/PDF /Text] /Font <</Fn1 3 0 R>> >>
/MediaBox [0 0 595.2 842]
/Contents 5 0
BT
/Fn1 24 Tf
100 400 Td
(Test2) Tj
ET
>>
endobjtrailer
<< /Size 5
/Root 1 0 R
/Info 2 0 R
>>
startxref
1000
%%EOF
Now my problem is that when i write texy in the 4th and 5th objects the the pdf reader see only two blank pages. Can anyone tell to me which are my mistakes and how to fix it in the pdf format structure?