CFCONTENT APPLICATION PDF
text/html; text/plain; application/msword; application/msexcel; application/poscript ; application/x-zip-compressed; application/pdf; application/rtf; video/x-msvideo. cfcontent type = “file_type” deleteFile = “Yes” or “No” file = “filename” reset = ” Yes” or text/html; text/plain; application/x-shockwave-flash; application/msword . systemHash=”> application/json”>
|Published (Last):||18 April 2007|
|PDF File Size:||6.55 Mb|
|ePub File Size:||14.23 Mb|
|Price:||Free* [*Free Regsitration Required]|
The following tag can force most browsers to display a dialog box that asks users whether they want to save the contents of the file specified by the cfcontent tag using the filename specified by the filename value.
Category Data output tags Syntax. When you use this attribute, any other output on the current CFML page is ignored; only the contents of the file is sent to the client. Description Does either or both of the following: However, if the file attribute is specified, ColdFusion attempts to get the content type from the file.
Do not use this tag after the cfflush tag on a page, it has cfconteng effect or ColdFusion throws an error.
You can use the cfcontent tag to override the default character encoding of the response. To set the character encoding character set of generated output, including the page HTML, use code such as the following:. For a complete list of media types used on the Internet, see www. The MIME content type of the page, optionally followed by a semicolon and the character encoding.
The following are some of the content type values that you can use:. Name of file whose contents will be the page output. For example, to specify the character encoding of the page output as Japanese EUC, use the type attribute, as follows:.
The filename must start with a drive letter and a colon, or a forward or backward slash. This list uses Java internal names, not the IANA character encoding names that you use in the SetEncoding charset parameter and other ColdFusion attributes and parameters. Changed the behavior of the tag if the type attribute is not specified and the file attribute is specified.
This tag executes only if it is enabled in the ColdFusion Administrator. The MIME content type of the page, optionally followed by a semicolon and the character encoding.
View Help PDF adobe. For more information, see the Administrator online Help. Category Data output tags.
For more information, see the Administrator online Help.
ColdFusion Help | Using cfcontent
You can specify this tag’s attributes in an attributeCollection attribute whose value is a structure. Excel interprets the table format. If the user selects to open the file, most browsers open the file in the related application, not the browser window. For a complete list of media types used on the Internet, see www. For these file types, the inline content disposition specification requests the browser to display the file directly if the user selects to open the file.
If the user selects to open the file, most browsers open the file in cfcobtent related application, not the browser window. However, if the file attribute is specified, ColdFusion attempts to get the content type from the file.
In this case, all output is sent with the specified type. If a file delete operation is unsuccessful, ColdFusion throws an error.
When using ColdFusion in a distributed configuration, the file attribute must refer to a path on the system on which the web server runs. Sets the MIME content encoding header for the current page; if the encoding information includes a character encoding, sets the character encoding cfcontrnt generated output. The page at http: Name of an on-disk or in-memory file whose contents provide the page output. For many file types, such as Excel documents, that Internet Explorer can display directly in the browser, vfcontent browser displays the file without asking users whether to save it if you use a cfheader tag similar to the following:.
When using ColdFusion in a distributed configuration, the file attribute must refer to aplpication path on the system on which the web server runs. For example, to tell ColdFusion to return the page using Japanese EUC character encoding, use the type attribute, as follows:. Because Excel can include executable code, the browser prompts the user whether to save the file or open it in a browser.
If you specify a file, this attribute has no effect. Notice that the graphics do not display and the hyperlinks do not work, because the html page uses relative filename appplication. The content type determines how the browser or client interprets the page contents.
Some file types, such as PDF documents, do not use executable code and can display directly in most browsers. Applicafion only if you specify a file with the file attribute.