Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

help! How to view my work in pdf

Community Beginner ,
Jul 28, 2010 Jul 28, 2010

I haven't had the chance to work with PDF with CF 8 and I'm not sure where to start.

I'm currently producing a report from a DB and I'm showing it in a table but I was just told to add a link where our user can click and get that same report in PDF. Users may want to share the report, keep the report, etc

I did some reading and a brief testing but still confuse. Should I use CFDOCUMENT tags with format attribute set to "pdf"? and what other attributes do I need for this task? When I ran mypdftest.cfm with the following codes, I got my pdf:

<cfdocument format="pdf">

Hello this is a test

</cfdocument>

but when I added a query on my second test and try to out put the result, I got my pdf but instead of showing the query result, I got strange characters

everywhere.

<cfdocument format="pdf">

    <cfquery name="test" datasource="#application.dsn#">

     Select * from some table where LastName = 'Allen'

   </cfquery> 

     <table>

      <tr>

         <td>First Name</td>

        <td>Last Name</td>

      </tr>

     <cfoutput query="test">

      <tr>

         <td>#FName#</td>

        <td>#LName#</td>

      </tr>

     </cfoutput>

     </table>

</cfdocument>

Can anyone help????

TOPICS
Getting started
594
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 28, 2010 Jul 28, 2010

I get the strange characters from time to time during testing, but I have never seen it during production. When it happens, I change the format to something other than PDF, run the page, and then BACK to pdf and all is well. Not sure WHY that solves the issue, but it does.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 29, 2010 Jul 29, 2010
LATEST

Thank you! at least I know some other people had this experience.

I tried to run it again and this time I did not get those strange chars. But yesterday I tried it more than once. Adobe did not know about this???????

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources