Skip to main content
Known Participant
November 22, 2011
Question

cfdocument srcfile case issue

  • November 22, 2011
  • 1 reply
  • 1009 views

Recently we start using coldfusion 9 and open office to convert office file to PDF, then we come across a very strange issue.

<cfset myDoc = "C:\my.DOC">

<cfdocument format="pdf" srcfile="#LCASE(myDoc)# filename="#myDoc#-a.pdf"></cfdocument>

<cfdocument format="pdf" srcfile="#myDoc# filename="#myDoc#-b.pdf"></cfdocument>

The output of C:\my.DOC-a.pdf is unreable (binary content) but C:\my.DOC-b.pdf is fine

Anyone have this problem?

Coldfusion version is 9,0,1,274733

This topic has been closed for replies.

1 reply

Inspiring
November 22, 2011

What OS is your server running on?

Known Participant
November 22, 2011

Sorry, I have the wrong order in my first post.

The output for the one with lower case extention is fine

The output for the one with upper case extention is unreadable (binary content)

I also tried to use mimetype application/msword, coldfusion crash when having upper case extention

An exception occurred when performing document processing.

The cause of this exception was that: coldfusion.document.spi.DocumentExportException: java.lang.RuntimeException: The document is not open."

The server is having:

Windows Server 2008 R2 Standards and

Coldfusion version is 9,0,1,274733

Same problem happen on

Windows 7 Ultimate and

Coldfusion version is 9,0,1,274733