destroying pdf instance