restoring old pdf viewer (new window) code