customize viewer for pandexio
modify CanvasExtraState to work on ios8 (hack)