From PDF XChange PDF SDK
Jump to: navigation, search

Atoms are hashed tokens that PDF-XChange PDF SDK uses in place of strings in some places to optimize performance. For example, it is much faster to compare atoms than strings. Atoms are represented by integer values of ULONG type. Value of 0 is reserved and in most cases represents an invalid value.

Object IPXS_Inst contains several methods for conversion from strings to atom (StrToAtom, StrToAtomRaw) or atom to string (AtomToStr, AtomToStrRaw).

If there is needs to often use atoms, it is recommended to convert most used strings to atoms and remember them in to the code. Most methods that takes atoms as parameters are faster than similar methods that takes strings are parameter.

Please note, that atom value retrived in one session may not be the same in another session, so these values should not be remembered and hardcoded into the code.