25 Replies Latest reply: Mar 29, 2007 5:09 AM by xaliver RSS

    CFdocument

    xaliver Community Member
      hello,

      I have a problem with the creation of pdf. My acpplication functioned very well and generated pdf without problem with cfdocument. And for 2 days, the pdf have not been any more to create. When I call my page plus nothing this master key. My navigator functions, but nothing. I does not include/understand! No change was to realize. It is very bizzard…

      Somebody with a track?

      Thank you in advance for your answers and sorry for my bad English
        • 1. Re: CFdocument
          BKBK MVP
          Do you have MX version 7, 7.0.1 or 7.0.2? And your browser and web server?

          • 2. Re: CFdocument
            xaliver Community Member
            I have MX version 7.0.2 and a ISS 6.0 on Windows 2003 Webserver. My browser is IE 6.

            It is very strange, many pdf are generated but with much time and other not.
            • 3. Re: CFdocument
              BKBK MVP
              Have you installed the latest update for MX7.0.2? You should also realize that an error in your code may cause the cfdocument tag to malfunction.

              • 4. Re: CFdocument
                xaliver Community Member
                Yes, I have installed the latest update for MX7.0.2. I installed on another server with the same configuration and same files CFM CFC. My pdf functions very well… In more I lately did not install anything on the production machine tool!!! I does not understand!?
                • 5. Re: CFdocument
                  BKBK MVP
                  Could we see the code you use to create the PDF

                  • 6. Re: CFdocument
                    xaliver Community Member
                    This is my example :
                    ----------------------------
                    <cfdocument format="pdf" orientation="portrait" pagetype="A4" marginbottom="1.5" marginleft="0.5" marginright="0.5" margintop="0.5" unit="cm">
                    <HTML>
                    <LINK type="text/css" rel="StyleSheet" href="/_css/printCS.css" />
                    <cfdocumentitem type="footer">
                    <cfoutput>
                    <CENTER>
                    <font face="MS Sans Serif, Geneva, sans-serif">
                    #cfdocument.currentpagenumber# / #cfdocument.totalpagecount#<BR>
                    </font>
                    </CENTER>
                    </cfoutput>
                    </cfdocumentitem>
                    <cfquery name="qFournisseur" datasource="cad_transfert">
                    SELECT distinct T_ADRESSE.* FROM T_ADRESSE, t_adr_liens
                    where adli_noadr = ( select distinct four_id_adre from t_fournisseur where four_actif = 1 and four_id = #vCofc_id_four# )
                    and adli_type = 3
                    and adli_noadr_fille = adre_id
                    order by adre_raison_soc
                    </cfquery>
                    <div class="Logo"> </div>
                    <CFOUTPUT query="qFournisseur">
                    <div class="adresse#qFournisseur.currentrow#">
                    <div class="raisonsoc">
                    <strong>
                    #ADRE_RAISON_SOC#<BR>
                    <CFIF trim(ADRE_ADRE1) NEQ "">#ADRE_ADRE1#<BR></CFIF>
                    </strong>
                    </div>
                    ...
                    </HTML>
                    </cfdocument>
                    • 7. Re: CFdocument
                      BKBK MVP
                      I don't think it's good to have a query inside the cfdocument tag. Place the query qFournisseur above the cfdocument tag.

                      • 8. Re: CFdocument
                        xaliver Community Member
                        I put outsite all query of the cfdocument tag. no change.
                        I have some difference between my machine of the production and the development, at the level of the Java version:

                        Production :
                        Java Version 1.4.2_09
                        Java VM Version 1.4.2_09-b05
                        Java Specification Version 1.4

                        Development :
                        Java Version 1.4.2_05
                        Java VM Version 1.4.2_05-b04
                        Java Specification Version 1.4

                        But the production is more up to date than the Dev !!!
                        • 9. Re: CFdocument
                          BKBK MVP
                          Any changes when you remove all links to external files, for example, <link...>? Can you create this simple Macromedia example:

                          <cfdocument format="pdf">
                          <p>This is a document rendered by the cfdocument tag.</p>
                          <table width="50%" border="2" cellspacing="2" cellpadding="2">
                          <tr>
                          <td><strong>Name</strong></td>
                          <td><strong>Role</strong></td>
                          </tr>
                          <tr>
                          <td>Bill</td>
                          <td>Lead</td>
                          </tr>
                          <tr>
                          <td>Susan</td>
                          <td>Principal Writer</td>
                          </tr>
                          <tr>
                          <td>Adelaide</td>
                          <td>Part Time Senior Writer</td>
                          </tr>
                          <tr>
                          <td>Thomas</td>
                          <td>Full Time for 6 months</td>
                          </tr>
                          <tr>
                          <td>Michael</td>
                          <td>Full Time for 4 months</td>
                          </tr>
                          </table>
                          </cfdocument>
                          • 10. Re: CFdocument
                            jmarron Community Member
                            Could you find a solution? We are facing exactly the same problem
                            • 11. Re: CFdocument
                              xaliver Community Member
                              Yes the code that you provided me functions well. But I do not understand why my scripts which functioned very quite front does not function now any more.

                              Is it possible that it is my includes external files which pose a problem (CSS)?
                              • 12. Re: CFdocument
                                BKBK MVP
                                Is it possible that it is my includes external files which pose a problem (CSS)?

                                Yes, even simple, often negligible, html errors and errors in included files may cause the cfdocument tag to falter. An example in your code is that you do not put the link tag within HTML head tags. What happens when you comment out the lines involving included files?

                                • 13. Re: CFdocument
                                  xaliver Community Member
                                  I did not understand well, to do one tests not putting a file CSS, but by adding styles CSS in code HTML of CFDocument, it is well that?
                                  • 14. Re: CFdocument
                                    BKBK MVP
                                    Do a test without any included files. If that works, reintroduce the link tag like this

                                    <head>
                                    <link >
                                    </head>

                                    • 15. Re: CFdocument
                                      xaliver Community Member
                                      OK, I have unintall and to completely reinstall the Coldfusion waiter. But no change. Whereas my scripts CFM functions very well on another machine with the same configuration. I think that the problem come from another problem!

                                      Does somebody know which are the lib used by Coldfusion to generate the pdf?

                                      On the other hand indeed cfdocument simple functions very well!

                                      I really any more do not know or to seek. I understands well that bonds external can posser of the problems, but these documents one to function very well and continuous with functioning well on another machine???
                                      • 16. Re: CFdocument
                                        BKBK MVP
                                        Remove the cfdocument and cfdocumentitem tags. Run the page. What happens?

                                        • 17. Re: CFdocument
                                          xaliver Community Member
                                          It is ok, my page is correct, not error. All is there, even the references to the images via the CSS
                                          • 18. Re: CFdocument
                                            BKBK MVP
                                            >> What happens?

                                            > It is ok, my page is correct, not error. All is there, even the references
                                            > to the images via the CSS


                                            What I mean is, do you get any problems similar to the ones you get with cfdocument? For example, does Coldfusion take long to process the page?

                                            • 19. Re: CFdocument
                                              xaliver Community Member
                                              Not, all is normal, here the 2 URL, the first is a simple pdf with CFdocument, the second the contents with format HTML of the pdf which poses problem:

                                              http://intranet.cades.ch/apps/cades/print/testpdf.cfm
                                              http://intranet.cades.ch/apps/cades/print/testprint.cfm?vRub=105&vAction=viewCS&vCofc_id_f our=7270&vDateEffet=01.04.2007

                                              And here the bonds which does not function:

                                              http://intranet.cades.ch/apps/cades/print/print.cfm?vRub=105&vAction=viewCS&vCofc_id_four= 7270&vDateEffet=01.04.2007
                                              • 20. Re: CFdocument
                                                xaliver Community Member
                                                Should I change the version of Java? Currently, I am in production on the version:
                                                Java Version 1.4.2_09
                                                Java VM Version 1.4.2_09-b05
                                                Java Specification Version 1.4

                                                And in Development (which functions):
                                                Java Version 1.4.2_05
                                                Java VM Version 1.4.2_05-b04
                                                Java Specification Version 1.4
                                                • 21. Re: CFdocument
                                                  BKBK MVP
                                                  Yes, there is a problem. Could you show us all of the code? If not, I could privately have a look at it.

                                                  • 22. Re: CFdocument
                                                    xaliver Community Member
                                                    OK, I copied it in a textual file from my site with the address:

                                                    www.indc.ch/sources/print.cfm.txt
                                                    • 23. Re: CFdocument
                                                      BKBK MVP
                                                      OK, Xaliver. I'm looking into it.

                                                      • 24. Re: CFdocument
                                                        BKBK MVP
                                                        I have some suggestions for you. Where can I post them?

                                                        • 25. CFdocument
                                                          xaliver Community Member
                                                          Yes, well on with pleasure. You can give me your sugestions at the my address email: christophe[AT]indc.ch