Further work on migrating pdf-view.

This is one of the more complex migrations. Have moved it into its
own file so I can find my way around it more easily.