@Override
public void startDocument() throws IOException {
facesContext = FacesContext.getCurrentInstance();
ExternalContext externalContext = facesContext.getExternalContext();
HttpServletResponse response = (HttpServletResponse) externalContext.getResponse();
response.reset();
response.setContentType(contentType);
response.setHeader("Content-Disposition", "inline; filename=\"" + UUID.randomUUID().toString() + ".pdf" + "\"");
OutputStream browserStream = response.getOutputStream();
startDocumentInternal(browserStream);
}