test for pdf before trying to make public or private