fix adding coptlistener in pdf/djvu reader

This PR also implement feature request in #307.