Fix bar button management for pdf.