2 Replies Latest reply on Jan 13, 2008 9:36 PM by Justin Cobb

    a4j:commandbutton to get pdf bytes

    Justin Cobb Newbie

      I am trying to use a a4j:commandbutton to submit a form an return a pdf file to the user. I can get it to return fine if I use an h:commandbutton, it asks if I want to save or open a file.

      The reason I want to use the a4j:commandbutton is because once the user clicks it, it generates the pdf on the fly and I want to present the user with a modaldialog that shows it is creating the pdf, and then close the modal dialog on the oncomplete event.

      If I do use the a4j:commandbutton is just returns the pdf bytes in the browser since it is unable to write the proper response headers.

      Does anyone have any suggestions?