Determining archive attributes of .pdf files

That post goes into detail.
Perhaps you can paate your code that you are getting unexpected results from.