page

A single Visualforce page. All pages must be wrapped inside a single page component tag.

Example

<!-- Page: -->
            <apex:page renderAs="pdf">
                <style> body { font-family: Arial Unicode MS; } </style>
                <h1>Congratulations</h1>
                This is your new PDF
            </apex:page>
        

Attributes

Attribute Name Description Attribute Type Required
action The action method invoked when this page is first requested by the server. Use merge-field syntax to reference the method. For example, action="{!init}" references the init() method in the controller. If an action is not specified, the page simply refreshes. Action Method  
apiVersion The version of the Force.com Web Services API used to render and execute the page. double  
cache A Boolean value that specifies whether the browser should cache this page. If set to true, the browser caches the page. If not specified, this value defaults to false. Boolean  
contentType The MIME content type used to format the rendered page. Possible values for this attribute include any type that can be generated using a text-based generator, including "text/html", "application/vnd.ms-excel", and "text/css". For more information, including a complete list of possible values, see http://www.iana.org/assignments/media-types/. You can also define the filename of the rendered page by appending a # followed by the file name to the MIME type. For example, "application/vnd.ms-excel#contacts.xls". String  
controller The name of the custom controller class written in Apex used to control the behavior of this page. This attribute cannot be specified if the standardController attribute is also present. String  
expires   Integer  
extensions The name of one or more custom controller extensions written in Apex that add additional logic to this page. String  
id An identifier for the page that allows it to be referenced by other components in the page. String  
label The label that is used to reference the page in Salesforce setup tools. String  
language The language used to display labels that have associated translations in Salesforce. This value overrides the language of the user viewing the page. Possible values for this attribute include any language keys for languages supported by Salesforce, for example, "en" or "en-US". String  
name The unique name that is used to reference the page in the Force.com Web Services API. String  
pageStyle The pageStyle attribute is deprecated and has no effect on the page. String  
recordSetName   String  
recordSetVar This attribute indicates that the page uses a set oriented standard controller. The value of the attribute indicates the name of the set of records passed to the page. This record set can be used in expressions to return values for display on the page or to perform actions on the set of records. For example, if your page is using the standard accounts controller, and recordSetVar is set to "accounts", you could create a simple pageBlockTable of account records by doing the following: <apex:pageBlockTable value="{!accounts}" var="a"><apex:column value="{!a.name}"/></apex:pageBlockTable> String  
renderAs The name of any supported content converter. Currently pdf is the only supported content converter. Setting this attribute to pdf renders the page as a pdf. Rendering a Visualforce page as a PDF is intended for pages that are designed and optimized for print. Standard components which are not easily formatted for print or contain form elements like inputs, buttons, any component that requires JavaScript to be formatted, should not be used. This includes but is not limited to, any component that requires a form element. Verify the format of your rendered page before deploying it. If the PDF fails to display all the characters, adjust the fonts in your CSS to use a font that supports your needs. For example, <apex:page renderas="pdf"> <style> body { font-family: Arial Unicode MS; } </style> Note that the pageBlock and sectionHeader components do not suppor double-byte fonts when rendered as a PDF. String  
rendered A Boolean value that specifies whether the page is rendered. If not specified, this value defaults to true. Boolean  
setup A Boolean value that specifies whether the page should use the style of a standard Salesforce setup page. If true, setup styling is used. If not specified, this value defaults to false. Boolean  
showHeader A Boolean value that specifies whether the Salesforce tab header is included in the page. If true, the tab header is displayed. If not specified, this value defaults to true. Boolean  
sidebar A Boolean value that specifies whether the standard Salesforce sidebar is included in the page. If true, the sidebar is displayed. If not specified, this value defaults to true. Boolean  
standardController The name of the Salesforce object that is used to control the behavior of this page. This attribute cannot be specified if the controller attribute is also present. String  
standardStylesheets A Boolean value that specifies whether the standard Salesforce stylesheets are added to the generated page header if the showHeader attribute is set to false. If set to true, the standard stylesheets are added to the generated page header. If not specified, this value defaults to false. Boolean  
tabStyle The Salesforce object or custom Visualforce tab that controls the color, styling, and selected tab for this page. If using a Salesforce object, the attribute must be specified with the developer name for the object. For example, to use the styling associated with MyCustomObject, use tabStyle="MyCustomObject__c". If not specified, this value defaults to the style of the associated controller (if a standard controller), or the Home tab (if a custom controller). To use a custom Visualforce tab, set the attribute to the name (not label) of the tab followed by a double-underscore and the word tab. For example, to use the styling of a Visualforce tab with the name Source and a label Sources, use tabStyle="Source__tab". String  
title The title of the page as displayed in the browser. Note, when you are editing a page in developer mode, the page title will not be displayed. String  
wizard The pageStyle attribute is deprecated and has no effect on the page. Boolean  
© Copyright 2000-2008 salesforce.com, inc. All rights reserved.
Various trademarks held by their respective owners.