Ask a Jedi: Documentation on VFS Support

This post is more than 2 years old.

Steve asks:

Regarding the Virtual File System in CF 9: does not appear it's supported in all tags. My attempt to do:results in: The ram:///vfsfile.pdf specified in the cfpdfform tag either does not exist or is not accessible by this tag.

Is there documentation on what is/isn't supported?

Absolutely - but it is a bit hard to find if you don't know where to search. The core documentation may be found online here: Working with in-memory files

Within this documentation you will find a section on functions and tags that work with VFS. The functions are:

FileIsEOF
FileReadBinary
Filemove
Filecopy
FileReadLine
FileExists
FileOpen
FileWriteln
FileClose
FileRead
FileDelete
DirectoryExists
FileSetLastModified
GetFileInfo
GetDirectoryFromPath
GetFileFromPath
ImageNew
ImageRead
ImageWrite
ImageWriteBase64
IsImageFile
IsPDFFile
FileSetLastModified

The docs seem to be missing the new directory functions, like directoryList, which should work just fine with VFS. Those functions were a late addition to ColdFusion 9 so I assume this is just an oversight. Tags supported with VFS are:

cfcontent
cfdocument
cfdump
cfexchange
cfexecute
cffeed
cfhttp
cfftp
cfimage
cfloop
cfpresentation
cfprint
cfreport
cfzip

As you can see, cfpdfform isn't listed there, nor is cfpdf. My guess here is that the PDF support in ColdFusion relies on libraries that can't grok non-physical files.

Raymond Camden's Picture

About Raymond Camden

Raymond is a senior developer evangelist for Adobe. He focuses on document services, JavaScript, and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA https://www.raymondcamden.com

Archived Comments

Comment 1 by Troy Allen posted on 10/13/2009 at 4:59 PM

In the Docs Link you provided, Raymond, if you scroll down to the "Limitations" section near the bottom, it explicitly lists the PDF tags as excluded:

The following tags are not supported:
* cfpdf
* cfpdfform

In fact, those are the only two listed. Thanks for the link!

Comment 2 by Raymond Camden posted on 10/13/2009 at 5:33 PM

Those are definitely NOT the only ones not supported though - none of the spreadsheet stuff works with VFS (afaik).

Comment 3 by Robert posted on 1/19/2010 at 3:38 AM

Oddly enough.. I am able to use cfpdf with VFS (specifically action="merge"). In any case, I was hoping that VFS would speed up my document creation process; however, it takes 25% longer than it originally took when written to disk.
Any thoughts...

Comment 4 by Raymond Camden posted on 1/19/2010 at 11:13 PM

Not really. If it shouldn't work (per docs), I'd probably avoid using it. ;)