Added protocol detection to PDF URL