title: Swift PDFView and URLs that end in "/pdf" instead of ".pdf"
body: <p>I have code that loads a pdf file into the PDFView that Apple provides in Swift. It works great, but the problem comes when trying to view pdf files where the URL is not formatted correctly.</p>
  
  <p>For example, if I provide a URL for the PDFView that looks like <code>http://www.example.com/files/myfile.pdf</code> the PDFView works just fine. However, when I provide it with a URL that looks like <code>http://www.example.com/files/articles/article-432/pdf</code> it no longer functions. Both URLs (in the code) point to perfectly valid pdf documents, but only the former actually loads into the PDFView.</p>
  
  <p><strong>EDIT</strong> So after setting the environment variable <code>CG_PDF_VERBOSE</code> in Xcode, the console returned <code>failed to find PDF header: '%PDF' not found.</code> Not really sure what this means, though I suspect it probably means that there is some sort of redirect to the actual file, so I can't get the file directly.</p>
  
  <p>Sorry that I can't share the actual URLs, but its just because they are company specific and I'm not allowed to distribute them.</p>
  
  <p>Thanks in advance for any help!</p>