0 Replies Latest reply on Oct 29, 2007 1:04 PM by Vincent LAUGIER

    itext pdf in Firefox

    Vincent LAUGIER Newbie


      I have a trouble visualizing pdfs with firefox

      even when I use :

      <pdf:documentStore useExtensions="true" />

      Firefox takes me to a page with the following source code
      <?xml version='1.0' encoding='UTF-8' ?>
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
      <html><head><meta http-equiv="Refresh" content="0; URL=ticket.pdf?docId=1&cid=9&clr=true" /></head><body></body></html>

      I guess this is because I do not manage to use the useExtensions="true" property well

      This pdf page is called from a button that triggers a method that loads some parameters before it redirects to the pdf page.

      Here is the calling snipet from the web page :
       <h:dataTable value="#{client.serviceOrders}" var="so" rendered="#{not empty client.serviceOrders}">
       <h:column >
       <c:facet name="header">Identifiant Artemis</c:facet>
       <h:outputText value="#{so.artemisId}" rendered="#{so.status.code != 2}" />
       <h:column >
       <c:facet name="header">Date de prise commande</c:facet>
       <h:outputText value="#{so.sellTime}" rendered="#{so.status.code != 2}" />
       <h:column >
       <c:facet name="header">Prix TTC</c:facet>
       <h:outputText value="#{so.amountWithTaxes}" rendered="#{so.status.code != 2}" />
       <c:facet name="header">Detail - Prestations complémentaires</c:facet>
       <h:commandButton action="#{serviceOrderManager.viewOrder(so)}" value="Detail" rendered="#{so.status.code != 2}" />
       <c:facet name="header">Cloture - Encaissement - Reçu - Facture</c:facet>
       <h:commandButton action="#{serviceOrderManager.startClosingOrder(so)}" value="Cloturer la commande" rendered="#{so.status.code == 0 and empty so.payments }"/>
       <h:commandButton action="#{paymentHandler.setOrderforCBPayment(so)}" value="Payer la commande par CB" rendered="#{so.status.code == 1 and not so.paid}"/>
       <h:commandButton action="#{paymentHandler.setOrderForChequePayment(so)}" value="Payer la commande par chèque" rendered="#{so.status.code == 1 and not so.paid}"/>
      <h:commandButton action="#{serviceOrderManager.viewTicket(so)}" value="Reçu" rendered="#{not empty so.payments }"/>
       <h:commandButton action="#{serviceOrderManager.viewTicket(so)}" value="Facture" rendered="#{not empty so.payments }"/>

      here is the called method :
      public String viewTicket(ServiceOrder order) {
       serviceOrder = entityManager.merge(order);
       return "ticket";

      here is my pages.xml snipet
      <rule if-outcome="ticket">
       <redirect view-id="/ticket.xhtml"/>

      I have also added the needed modification to components.xml
      <pdf:documentStore useExtensions="true" />

      and in web.xml
      <!-- PDF filter -->
       <filter-name>Seam Servlet Filter</filter-name>
       <filter-name>Seam Servlet Filter</filter-name>
       <servlet-name>Document Store Servlet</servlet-name>
       <servlet-name>Document Store Servlet</servlet-name>

      my pdf renders well with IE and Konqueror (which do not need the useExtensions)

      Thanks in advance for your help