Menu

#56 Tree Enumerator not working for NumberTree

v1.0_(example)
closed-fixed
None
5
2014-08-14
2014-08-14
ChrisK
No

Hi Stefano,
I tried to enumerate the PageLabels just to find a bug in the Tree Enumerator.
NumberTree and NameTree override the PairsKey property to be either "Nums" or "Names".
The Tree class uses then this property to access the PDF Objects.
The problem is that the Enumerator doesn't, it's using hardcoded PdfName.Names and hence only works with the NameTree.
I have created a private property pairsKey, which I set in the constructor to tree.pairsKey.
Then I replaced all usage of PdfName.Names in the iterator with pairsKey and it's working fine now.

Regards
Chris

Related

Bugs: #56

Discussion

  • Stefano Chizzolini

    Hi Chris,
    thank you so much for trapping the bug!

    Fixed: branches/0.1.2-Fix, TRUNK

    Stefano

     
    • ChrisK

      ChrisK - 2014-08-15

      Hi Stefano,

      thanks for applying the fix so fast and in general thanks for the great
      library.

      Cheers

                  Chris
      

      Von: Stefano Chizzolini [mailto:stechio@users.sf.net]
      Gesendet: Freitag, 15. August 2014 00:16
      An: [clown:bugs] ; [clown:bugs]
      Betreff: [clown:bugs] #56 Tree Enumerator not working for NumberTree

      Hi Chris,
      thank you so much for trapping the bug!

      Fixed: branches/0.1.2-Fix https://sourceforge.net/p/clown/code/122 , TRUNK
      https://sourceforge.net/p/clown/code/123

      Stefano


      [bugs:#56] http://sourceforge.net/p/clown/bugs/56 Tree Enumerator not
      working for NumberTree

      Status: open
      Group: v1.0_(example)
      Created: Thu Aug 14, 2014 08:58 AM UTC by ChrisK
      Last Updated: Thu Aug 14, 2014 08:58 AM UTC
      Owner: Stefano Chizzolini

      Hi Stefano,
      I tried to enumerate the PageLabels just to find a bug in the Tree
      Enumerator.
      NumberTree and NameTree override the PairsKey property to be either "Nums"
      or "Names".
      The Tree class uses then this property to access the PDF Objects.
      The problem is that the Enumerator doesn't, it's using hardcoded
      PdfName.Names and hence only works with the NameTree.
      I have created a private property pairsKey, which I set in the constructor
      to tree.pairsKey.
      Then I replaced all usage of PdfName.Names in the iterator with pairsKey and
      it's working fine now.

      Regards
      Chris


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/clown/bugs/56/
      https://sourceforge.net/p/clown/bugs/56

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/
      https://sourceforge.net/auth/subscriptions

       

      Related

      Bugs: #56

  • Stefano Chizzolini

    • status: open --> closed-fixed
     

Log in to post a comment.