You should not attempt to use
JSF to render pages that are not in HTML format (such as PDFs and Excel spreadsheets). Use a
servlet to render the PDF.
Normally, thanks to the Eolas lawsuit, an attempt to open a PDF in a Microsoft Internet Explorer window will instead result in a new, non-IE window being opened, so unless you're using a non-Microsoft browser, if it replaced what was in your browser window, what you got wasn't a true PDF, it was PDF corrupted by the things JSF does because it thought you were attempting to output an HTML web page.
To reliably open a PDF in an external window, output the PDF from a plain-vanilla servlet and set the "target" attribute on the commandLink of the JSF form that provides the servlet URL to fetch/create the PDF and set your Content-Disposition header appropriately. Note that "target" is not an option on the JSF commandButton, so if you want a "button", tart up a commandLink with suitable button-looking graphics and CSS settings.