I am trying to learn the PDF language and make some PDF files from scratch. I have made some text files which work and now I want to insert some images, but I can't get it to work!
I have made a testfile consisting of just an image inserted as an XObject. The "image" is just a tiny gray 4x4 square. The file opens in Acrobat Reader without any error messages, but without the image.
I am posting the PDF content below. Can somebody see whats wrong?
Any help much appreciated...
...thanks in advance!!
%PDF-1.4
2 0 obj
<<
/Type /XObject
/Subtype /Image
/Name /Imagename2
/Width 4
/Height 4
/BitsPerComponent 8
/ColorSpace /DeviceGray
/Length 16
stream
EEEEEEEEEEEEEEEE
endstream
endobj
1 0 obj
<<
/Length 42
>>
stream
q
1 0 0 1 100 200 cm
/Imagename2 Do
Q
endstream
endobj
3 0 obj
<<
/Type /Page
/Parent 4 0 R
/Resources <<
/XObject << /Imagename2 2 0 R >>
>>
/MediaBox [0 0 850.3937007874016 850.3937007874016]
/Contents [1 0 R]
>>
endobj
4 0 obj
<<
/Type /Pages
/Kids [3 0 R]
/Count 1
>>
5 0 obj
<<
/Type /Catalog
/Pages 4 0 R
>>
endobj
xref
0 6
0000000000 65535 f
0000000199 00000 n
0000000010 00000 n
0000000297 00000 n
0000000475 00000 n
0000000531 00000 n
trailer
<<
/Size 6
/Root 5 0 R
>>
startxref
586
%%EOF