List of Topics

SfC Home > Web Design > SQL > ColdFusion >

 

Feedback Q&A on ColdFusion

by Ron Kurtus

Readers have sent in a total of 38 comments and questions on ColdFusion issues. They are listed according to date.

You can read them to further your understanding of the subject.



List of next 10 letters

Topic

Title

Country

PDF Doesn't work INDIA
 
PDF Using CF on a MAC USA
 
PDF Populating without activePDF USA
 
Email Flash Having problems sending Flash with Outlook India
 
PDF Doesn't work with IE EH
 
PDF Does not seem to work in CF 6.1 Canada
 
PDF Having trouble USA
 
Dates Has problems with dates USA
 
PDF Expalin syntax Romania
 
Image Management Trying to save images in database USA
 

Next 10

 




First 10 letters


Doesn't work

Topic: PDF

Question

May 10, 2005

The contents of input.cfm is as follows


First Name


Last Name







The contents of output.cfm is as follows




%FDF-1.2
1 0 obj <<
/FDF <<
/Fields
[
<<
/T(date)
/V(#date#)
>>
<<
/T(fname)
/V(#form.fname#)
>>
<<
/T(lname)
/V(#form.lname#)
>>
]
/F(http://www.yoursite.com/pdf/file_name.pdf)
>>
>>
endobj
trailer
<>
%%EOF



I have tried out the code you have provided for converting the cfm to pdf. But I am getting the following error. "The file is damaged and could not be repaired". In fact there is no file is getting generated

Hearty - INDIA

6918

Answer

I assume that at http://www.yoursite.com/pdf/file_name.pdf you put in the URL of your site instead of "www.yoursite.com "and have a folder named "PDF".

Also, note that if the server is using ColdFusion version 7, you can print out the PDF directly, bypassing this code. Let me know if you have CF 7 and I'll tell you the new code.

Back to top


Using CF on a MAC

Topic: PDF

Question

April 25, 2005

I was wondering if it was possible to create a form to do the same thing but using a different database language. I do my web design on a Mac and I don't have access to a PC to run Cold Fusion. I basically need to create a form that will populate a standardized document with personalized information. I was wondering if there was another way to do it. I really enjoyed your site and the tutorials on it. Keep up the good work!

Thanks,
Jack daMac

Jack - USA

6765

Answer

You can install ColdFusion on a MAC for testing purposes. But the server that your site is on must have ColdFusion installed. I typcially test pages off the server instead of my PC.

Note that if the server has CF MX (version 7) you can create a PDF by simply using the new tag surrounding the output of your query.

Back to top


Populating without activePDF

Topic: PDF

Question

January 25, 2005

On The "Simple Method to Populate a PDF File with ColdFusion" Is there a way to go from a CFML (ColdFusion) page to PDF without using activePDF Toolkit? If so how would you go about doing so?

Thank you for your time,
Piet

- USA

5727

Answer

The method and code stated on the page:
http://www.school-for-champions.com/coldfusion/cftopdf2.cfm uses CFML and PDF code. It does not need activePDF.

Back to top


Having problems sending Flash with Outlook

Topic: Email Flash

Question

December 3, 2004

My question is again similar with Haider. I am facing problems while sending and receiving email containing flash in Microsoft Outlook. I have to change the security settings to send the email. Even to receive an email containing a Flash Movie giving a problem in Outlook. It is giving an ActiveX error. But that I cannot do at everyones machine. Any kind of help will be highly appreciable.

Thanks a lot,
Satnam Curry
http://www.currysatnam.com

Satnam - India

5228

Answer

Recent security settings from Microsoft have made it more difficult to send and receive Flash by email. In fact Macromedia does not even use Flash in their email that advertize their products.

It probably would be best to avoid Flash if you have no control over the user's email s/w.

I will update the lesson to note that using Flash is not a good option anymore.

Back to top


Doesn't work with IE

Topic: PDF

Question

November 12, 2004

Hi,
I've read your article about filling pdf forms using coldfusion and fdf. I've trie d to do the same:
- First, I've created a simple PDF form.
- Second, I've created the cfm templates as you explained.
- Third, I tested my own system. But when Acrobat is loading, microsoft explorer warns me and then if I click both "open file" or "Save" internet explorer tells me that the file doesn't exist.

Whats wrong? I've tried with mozilla Firebird and it works well, but I need it to work with internet explorer.

- EH

5000

Answer

Does the sample I have at
http://www.school-for-champions.com/coldfusion/cftopdf2.cfm work in your browser?

If it works in Mozilla, your code is correct. There must be a setting in IE that is affecting PDF files. Have you have trouble viewing a PDF from another source?

One thought is that it may have to do with your path. Internet Explorer can be a pain to work with.

Let me know what you find out.

Back to top


Does not seem to work in CF 6.1

Topic: PDF

Question

November 8, 2004

Hi Ron Kurtus,

Excellent article on CF to PDF.

I would love you to check out if Coldfusion MX 6.1 breaks this ability though. I had it working on my home machine, tried it at work.. no luck. The only difference I can see is CF MX 6.0 to 6.1. I even upgraded my development machine at home to 6.1 and yes, it seems to not work anymore!

Keep getting the error "The file is damanged and cannot be repaired" via the acrobat plugin.

- Canada

4957

Answer

Interesting. I believe the server we're using is 6.0. But I'm not sure why it would not work in 6.1. Note that the new version of CF will have the CF to PDF feature built in.

Back to top


Having trouble

Topic: PDF

Question

September 8, 2004

I'm looking your "Simple Method to Populate a PDF File with ColdFusion" on this page http://www.school-for-champions.com/coldfusion/cftopdf2.cfm. I'm trying to do the same thing but not getting anywhere. Could you please take a look and see whats wrong with this:










%FDF-1.2
1 0 obj <<
/FDF <<
/Fields
[
<<
/T(vendor)
/V(#variables.vendor#)
>>
<<
/T(Address1)
/V(#variables.address1#)
>>
<<
/T(address2)
/V(#variables.address2#)
>>
<<
/T(phone)
/V(#variables.phone#)
>>
<<
/T(email)
/V(#variables.email#)
>>
<<
/T(web)
/V(#variables.web#)
>>
]
/F(http://indev/CFExamples/test.pdf)
>>
>>
endobj
trailer
<>
%%EOF



all this coldfusion page returns is a popup dialog saying to open or save I click open and it opens adobe reader w/ no file. Any help would be greatly appreciated.

Thanks,
Tim

Tim - USA

4200

Answer

Interestingly enough, I noticed that the CF code you put in the mail did not come through. I guess CFMAIL does not accept code. I don't know if my code came through either.

The biggest problems I saw where F(http://indev/CFExamples/test.pdf) should be your actual URL www.wng.com/CFExamples/test.pdf.

Also using CFPARAM and variables may be causing problems.

Back to top


Has problems with dates

Topic: Dates

Question

August 20, 2004

I think you can't do what your telling your students to do I have a
MS SQL server 2000 and I have read countless forums on the date/time issue your suggesting CF cold fusion can do and even if the book says it can.

Problem is when it comes down to it doesn't work.
Damn thing never works the only damn thing I can ever get SQL to work with
is NOW().

For example this should work, it looks correct on the screen but never
ends up in the database:





--------------------
OR simply

----------------


----------------
you can output it here to see it looks correct
Client.caBestCBTime --- caBestCBTime
which should look like this 08:00 AM {t '08:00:00'}

update call_time
set caBestCBTime = '#caBestCBTime#'
where CA_ID = '#Client.CA_ID#' <--- PRIMARY KEY --->


It DOES NOT WORK!!! because your DATABASE in SQL is MAX(8) which is time formated but I think SQL thinks of it as a string "{t '08:00:00'}"... you can try it a hundred different ways with TRIM extra, I don't see the damn thing working and here's a few other people who never get answers about it..
http://www.experts-exchange.com/Web/WebDevSoftware/ColdFusion/Q_20348785.html
http://www.houseoffusion.com/cf_lists/cache/4/7/7085.htm
----------------- As far as I have seen only the damn NOW() works.


Mikeol - USA

4043

Answer

The problem with MS SQL servers is that there are so many variations.

CreateODBCDateTime seems to work the best for me, but I agree that it is one screwed up problem. I've spend hours on the date problem. This was not done on SQL 2000 server, but a previous version.

Back to top


Expalin syntax

Topic: PDF

Question

August 6, 2004

hello!
i have a question about your article. more exactly about the sintax you used to create the pdf output.

%FDF-1.2
1 0 obj <<
/FDF << etc

Could you explain me this sintax or could you give me some online documentations?


have a nice day!
best regards,

mihai - Romania

3944

Answer

It is the very unusual PDF script. You must write it as-is within your code, except where you add your URL and the names of the fields.

You might be able to obtain documentation from Adobe at http://www.adobe.com. You will probably have to email them for the information.

Back to top


Trying to save images in database

Topic: Image Management

Question

May 9, 2004

I am trying to upload images to a directory using coldfusion. It seems I can upload and display them no problem. I am trying to store hem in a Microsoft Access database using SQL without any success. I get type mismatches. If there is a better way ... such as just storing the directory path, I would like to know where the files should reside on the server and how to store the directory path.

I could really use a coded example. I know that this is done all the time in Gallery type websites, dating websites and websites for job searches.

James - USA

3259

Answer

You really don't store the images in the database, just the name. The images should be uploaded to some folder like IMAGES folder. The database should have the name of the image file and perhaps a description, if you want.

Then when you make a query to display the images, you can include the path in the page. You don't usually need the path in the db, since all fiels woudl be in the same folder.

Back to top

Next 10


Summary

Hopefully, this reader feedback has helped provide information about ColdFusion issues.


ColdFusion helps websites succeed


Resources and references

The following are some resources on this topic.

Websites

ColdFusion Resources

Books

Top-rated books on ColdFusion


Questions and comments

Do you have any questions, comments, or opinions on this subject? If so, send an email with your feedback. I will try to get back to you as soon as possible.

Feel free to establish a link from your website to pages in this site.


Where are you now?

School for Champions

ColdFusion topics

Feedback Q&A on ColdFusion




ColdFusion topics

Basics

Development methods

Specific applications

Also see



Let's make the world a better place

Be the best that you can be.

Use your knowledge and skills to help others succeed.

Don't be wasteful; protect our environment.

You CAN influence the world.





Live Your Life as a Champion:

Take care of your health

Seek knowledge and gain skills

Do excellent work

Be valuable to others

Have utmost character

Be a Champion!



The School for Champions helps you become the type of person who can be called a Champion.