Skip navigation
WCoder
Currently Being Moderated

Problem with invalid /Pages on root obj...

Sep 19, 2013 2:10 AM

Tags: #xref #pages #page #startxref

Document : http://6m889f.1fichier.com/ - 28Kb - No script - No crypt (can be open with wordpad).

 

The document is an extract of a page of a big document that seems to be done with acrobat, so i suppose the doc is valid but my undestanding of PDF32000_2008 is wrong...

 

The page contain only an image type : CCITTFaxDecode.

 

The mecanisme i use to decode the doc :

 

1 - Extract start xref from the doc (read from end)

startxref

116

%%EOF

 

2 - Move to offset 116

20 0 obj

    <<

        /DecodeParms

            <</Columns 4/Predictor 12>>

        /Filter/FlateDecode

        /ID[<9D591874D8530F47922A2947626F4B0A><6D9DBF0DD389B440AC6E086693CE9B 16>]

        /Index[11 19]

        /Info 10 0 R    <- This entry don't exist.

        /Length 59

        /Prev 27626   

        /Root 12 0 R    <- This entry exist.

        /Size 30

        /Type/XRef/W[1 2 1]

    >>

stream...endstream...endobj

 

a - I have an other xref at offset 27626

b - /Info ref to an obj that is not visible on the PDF document ?

c - /Root ref to a valid obj.

 

3 - I decode xref

 

Message - Process XRef - Offset 116

---------------------------------------------------------------------- -< Begin of first cross-reference stream

Message - Process type 1 :  Dump Data ( 4 ): 01 00 10 00

Message - Add new XRef 11 - Offset 16        <- Match with file       

 

Message - Process type 1 :  Dump Data ( 4 ): 01 02 6C 00

Message - Add new XRef 12 - Offset 620        <- Match with file

 

Message - Process type 1 :  Dump Data ( 4 ): 01 02 B9 00

Message - Add new XRef 13 - Offset 697        <- Match with file

 

Message - Process type 1 :  Dump Data ( 4 ): 01 04 45 00

Message - Add new XRef 14 - Offset 1093        <- Match with file

 

Message - Process type 1 :  Dump Data ( 4 ): 01 06 3B 00

Message - Add new XRef 15 - Offset 1595        <- Match with file

 

Message - Process type 1 :  Dump Data ( 4 ): 01 07 EF 00

Message - Add new XRef 16 - Offset 2031        <- Match with file

 

Message - Process type 1 :  Dump Data ( 4 ): 01 08 B2 00

Message - Add new XRef 17 - Offset 2226        <- Match with file

 

Message - Process type 1 :  Dump Data ( 4 ): 01 09 3F 00

Message - Add new XRef 18 - Offset 2367        <- Match with file

 

Message - Process type 1 :  Dump Data ( 4 ): 01 0A 78 00

Message - Add new XRef 19 - Offset 2680        <- Match with file

 

Message - Process type 1 :  Dump Data ( 4 ): 01 00 74 00

Message - Add new XRef 20 - Offset 116        <- Match with file (this entry)

 

Message - Drop type 2 :  Dump Data ( 4 ): 02 00 0E 00    <- ?

Message - Drop type 2 :  Dump Data ( 4 ): 02 00 0E 01     <- ?

Message - Drop type 2 :  Dump Data ( 4 ): 02 00 0E 02     <- ?

Message - Drop type 2 :  Dump Data ( 4 ): 02 00 0E 03     <- ?

Message - Drop type 2 :  Dump Data ( 4 ): 02 00 0E 04     <- ?

Message - Drop type 2 :  Dump Data ( 4 ): 02 00 0E 05     <- ?

Message - Drop type 2 :  Dump Data ( 4 ): 02 00 0E 06     <- ?

Message - Drop type 2 :  Dump Data ( 4 ): 02 00 0E 07     <- ?

 

Message - Process type 1 :  Dump Data ( 4 ): 01 01 CE 00

Message - Add new XRef 21 - Offset 462

---------------------------------------------------------------------- -< End of first cross-reference stream

 

  a - All entries start with 01 : Is valid and is a the offset.

  b - I have some starting with 02

      I don't really undestand the document about this entry

     The solution seems to be on Table 18 –  Entries in a cross-reference stream

      I suppose first byte (w:121) is the type Type 2 (first column of the table )

      For 000E and 07 i don't undestand....

      I will see that point later except if it the solution to my problem ^_^...

 

4- I decode the second xref

  a -  Move to offset 27626 ( /Prev 27626 )

 

5 0 obj<<


/DecodeParms<</Columns 4/Predictor 12>>


/Filter/FlateDecode/ID[<9D591874D8530F47922A2947626F4B0A><6D9DBF0DD389 B440AC6E086693CE9B16>]


/Info 10 0 R<- Like in previousely, this entry don't exist.


/Length 49


/Root 12 0 R<- Like in previousely, this entry exist.


/Size 11


/Type/XRef/W[1 2 1]

>>

stream...endstream...endobj

 

b - decoding

 

---------------------------------------------------------------------- -< begin of second cross-reference stream

 

Message - Drop type 0 :  Dump Data ( 4 ): 00 00 00 00    <- ?

 

Message - Process type 1 :  Dump Data ( 4 ): 01 5B 2A 00

Message - Add new XRef 1 - Offset 23338        <- Match with file (this entry)

 

Message - Process type 1 :  Dump Data ( 4 ): 01 5E 01 00

Message - Add new XRef 2 - Offset 24065        <- Match with file (this entry)

 

Message - Process type 1 :  Dump Data ( 4 ): 01 6A 83 00

Message - Add new XRef 3 - Offset 27267        <- Match with file (this entry)

 

Message - Process type 1 :  Dump Data ( 4 ): 01 6B 10 00

Message - Add new XRef 4 - Offset 27408        <- Match with file (this entry)

 

Message - Process type 1 :  Dump Data ( 4 ): 01 6B EA 00

Message - Add new XRef 5 - Offset 27626        <- Match with file (this entry)

 

Message - Drop type 2 :  Dump Data ( 4 ): 02 00 01 00    <- ?

Message - Drop type 2 :  Dump Data ( 4 ): 02 00 01 01    <- ?

Message - Drop type 2 :  Dump Data ( 4 ): 02 00 01 02     <- ?

Message - Drop type 2 :  Dump Data ( 4 ): 02 00 03 00    <- ?

Message - Drop type 2 :  Dump Data ( 4 ): 02 00 04 00    <- ?

---------------------------------------------------------------------- -< End of second cross-reference stream

 

  a - All entries start with 01 : Is valid and is a the offset.

  b - I have some starting with 02

     same issue than for previous xref.

 

So now i have a vector of all obj on the document there no orphan,  it's why i don't investigate for strange entry 02.

 

5 - Read root entry

12 0 obj<<


/AcroForm 21 0 R


/Metadata 2 0 R


/Pages 9 0 R<- This entry to not exist


/Type/Catalog

>>

endobj

 

As previous with /Info 10 0 R that don't exist on the document, /Pages 9 0 R don't exist on document ?!

 

The document can be read by acrobat-reader & foxit, so i do something wrong but i don't see what...

 

The only obj with "page" is :

 

13 0 obj

     <<     /BleedBox[29.9391 30.0045 681.297 871.951]

              /Contents 15 0 R

              /CropBox[29.9391 30.0045 681.297 871.951]

              /MediaBox[0 0 711.968 901.89]

              /Parent 9 0 R

              /Resources<</ColorSpace<</CS0 22 0 R/CS1 23 0 R>>/ExtGState<</GS0 24 0 R/GS1 25 0 R>>

              /Font<</T1_0 28 0 R>>

              /ProcSet[/PDF/Text/ImageC]

              /XObject<</Im0 19 0 R>>

     >>

     /Rotate 0

     /StructParents 57

     /TrimBox[29.9391 30.0045 681.297 871.951]

     /Type/Page

>>

endobj

 

And "/Parent 9 0 R" this the same issue than with root : It's not on the doc ?

 

If someone can help me ?

 

Thanks

 

WCoder

 

Message was edited by: WCoder - Firefox crash + correction+add pdf...

 
Replies
  • Currently Being Moderated
    Sep 19, 2013 2:31 AM   in reply to WCoder

    I have not looked into the details of your post but have one question for you: are you aware of (and understand) compressed object streams?

     

    Olaf

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 19, 2013 3:37 AM   in reply to WCoder

    No, that's not what he meant. Object streams, 7.5.7. Cross reference streams, 7.5.8.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 19, 2013 3:46 AM   in reply to WCoder

    No, I was referring to "compressed object streams", as defined in IUSO 32000-1, "7.5.7 Object Streams". Are you familiar with that chapter?

     

    Olaf

     

     

    Am 19 Sep 2013 um 12:33 schrieb WCoder <forums_noreply@adobe.com>:

     

     

    Re: Problem with invalid /Pages on root obj...

    created by WCoder in PDF Language and Specifications - View the full discussion

    If you speak about : <</Filter/FlateDecode - Yes i already do this part of job you can do this using zlib and inflate function.

     

     

    I use v1.2.8 from http://www.zlib.net/

     

     

    Pseudo code.

     

     

    z_stream oZStream;

     

     

    Zero memory : oZStream

     

     

    // Set input buffer :

     

    oZStream.avail_in <= size imput buffer read from "/Length 407"    + 1   (see pitfall)

     

    oZStream.next_in <= input buffer (pointer)  (see pitfall) 

     

     

    // Set output buffer (append).

     

    oZStream.avail_out <= max size of output buffer (i use a static buffer of 16Mo - i don't already optimize this point).

     

    oZStream.next_out <= output buffer (pointer)

     

     

    // Init unpack

     

    if ( Z_OK == ( lResult = inflateInit ( &oZStream )))

     

     

    // Unpack : In one time for me i have a big ... buffer _

     

    if ( 0 <= ( lResult = inflate ( &oZStream, Z_FINISH )))

     

     

    // Finalize operation.

     

    inflateEnd ( &oZStream );

     

     

    Warning there's a pitfalls :

     

     

    A - the begin and the end of the stream.

     

    32392030206F626A0D3C3C2F46696C7465722F466C61          29 0 obj.<</Filter/Fla

     

    74654465636F64652F492039392F4C656E6774682037            teDecode/I 99/Length 7

     

    342F532033382F562037373E3E73747265616D0D0A68           4/S 38/V 77>>stream..h             // Stream start after stream and after 0D0A (line separator)

     

    ....

     

    865003544BB4168466BA0ED7C4C2C0902D0035F01640          .P.TK...f.......-.5..@

     

    80010072E908100D0A656E6473747265616D                              ...r.....endstream                      // Stream end before endstream and before ODOA (line separator)

     

     

    B - The size of the input buffer, i need to increst it by one, i don't undestand why but it's work !?

     

     

    WCoder

     

    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5695533#5695533

    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: Re: Problem with invalid /Pages on root obj...

    To unsubscribe from this thread, please visit the message page at Re: Problem with invalid /Pages on root obj.... In the Actions box on the right, click the Stop Email Notifications link.

    Start a new discussion in PDF Language and Specifications by email or at Adobe Community

    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

     

    --

    Olaf Druemmer | Managing Director | callas software GmbH | Schoenhauser Allee 6/7 | 10119 Berlin

    Tel +49.30.4439031-0 | Fax +49.30.4416402 | o.druemmer@callassoftware.com | www.callassoftware.com

    Amtsgericht Charlottenburg, HRB 59615 | Geschäftsführung: Olaf Drümmer, Ulrich Frotscher

     

    =================================================

    ►  PDF modulo X: 

    ►  Medien-Workflows mit PDF/X-4 praktisch umsetzen

    ►  Workshop mit Robert Zacherl und Olaf Drümmer 

    ▷  22.10.2013  Hamburg, Radisson Blu - www.amiando.de/pmx-hamburg

    ▷  20.11.2013  München, Hotel Vitalis - www.amiando.de/pmx-muenchen

    ▷  21.11.2013  Frankfurt, Intercontinental - www.amiando.de/pmx-frankfurt

    =================================================

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 19, 2013 4:21 AM   in reply to WCoder

    Looks right.

     
    |
    Mark as:

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