PDFファイルをゼロから作成するプログラムを作成しました。出力は次のとおりです。
%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
今私の問題は、4 番目と 5 番目のオブジェクトに texy を書き込むと、pdf リーダーに 2 つの空白ページしか表示されないことです。私の間違いと、pdf形式の構造でそれを修正する方法を教えてもらえますか?