Skip navigation
pahuja rajeev
Currently Being Moderated

Object stream and Cross reference stream

Jun 12, 2013 2:30 PM

Hi,

 

I am creating a simple pdf which just displays letter 'A'. I created width array of Font object, as compressed object inside object stream.

I am also creating cross ref. stream which has 30 objects. One entry is of type 2 which is showing obj. id of objectstream with 0 as offset.

This pdf works fine , if i don't use object stream and cross ref. stream.

 

Here is how it looks:

 

Obj stream:

14 0 obj

<</Type/ObjStm/N 1/First 5/Filter/FlateDecode/Length 15 0 R>>stream

xœ34V0ˆ6463Sˆ

} ]

endstream

endobj

 

decoded stream is: 13 0[1366 ]

 

29 0 obj

<</Type /Catalog/Pages 28 0 R/PageMode /UseNone/PageLayout /SinglePage/OpenAction [27 0 R]>>endobj

 

Cross Ref. stream:

30 0 obj

<</Type/XRef/Size 31/W[1 4 1]/Info 21 0 R/Root 29 0 R/ID [<67e07d430c7a5c4cae26033cb3cc1e30> <67e07d430c7a5c4cae26033cb3cc1e30>]/Length 493>>stream

01 00000013  00

01 00000381  00

01 000003c2  00

01 000003e5  00

01 00000078  00

01 00000095  00

01 00000204  00

01 0000021a  00

01 000002a2  00

01 000002eb  00

01 00000321  00

01 00000405  00

02 0000000E  00

01 000004a7  00

01 000004bd  00

01 00019629  00

01 00019643  00

01 0001965d  00

01 0001978c  00

01 00019828  00

01 0001983e  00

01 0001985c  00

01 000198c8  00

01 000198de  00

01 0001993f  00

01 0001998b  00

01 00019a1f  00

01 00019a59  00

01 00019ac7  00

 

 

endstream

endobj

startxref

105159

%%EOF

 

When i open this .pdf, acrobat gives error saying root object is missing or invalid. Any help is appreciated.

 

Thanks

R

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points