pen.getPages doesn’t sort after retrieving keys

Question
pen.getPages() returns the pages from a decrypted PGC in descending order, whereas pages from a normal PGC is returned in ascending order. Why is there a difference?

Answer
The difference in page order between decrypted PGC files and normal PGC files is due to the implementation of Java collections (HashMap) which are used in ADM and our Network SDK Java component Infracore.
HashMap doesn't guarantee the order of elements. HashMap is used in ADM to hold page addresses and corresponding strokes, while in Infracore it is used to hold page addresses and corresponding pages. As pen.getPages doesn’t sort after retrieving keys, the order of keys (in our case, page addresses) can’t be guaranteed to be the same as it was when put into collection.

Applies To
ETK, getPages

Was this article useful? Thanks for the feedback There was a problem submitting your feedback. Please try again later.