---
schema_version: "1"
id: da5adee7a7dfed60e83c5a2f46451b229800290f4399356c4031fde09983f8f2
title: Component Behavior When Rendered as PDF
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/salesforce-pages-developers-guide/guides/pages/styling/pages-output-pdf-component-behavior.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-pages-developers-guide/guide/pages-output-pdf-component-behavior.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 2d7d13294a2bc48587bbcca1995dbdaa3fed24f753e0c10e5fe281cda2ca4d7e
products:
  - Visualforce Developer Guide
  - Platform Developer Content
---

# Component Behavior When Rendered as PDF

Understanding how Visualforce components behave when converted to PDF is essential to creating pages that render well.

The Visualforce PDF rendering service renders static HTML and basic CSS that is explicitly provided by the page. As a rule, don’t use components that:

-   Rely on JavaScript to perform an action
-   Depend on Salesforce style sheets
-   Use assets such as style sheets or graphics that aren’t available in the page itself or in a static resource

To check if your Visualforce page falls into one of these categories, right-click anywhere on the page and view the HTML source. If you see a `<script>` tag that refers to JavaScript (.js) or a `<link>` tag that refers to a style sheet (.css), verify that the generated PDF file displays as expected.

## Components That Are Safe When Rendering as PDF

-   `<apex:composition>` (as long as the page contains PDF-safe components)
-   `<apex:dataList>`
-   `<apex:define>`
-   `<apex:facet>`
-   `<apex:include>` (as long as the page contains PDF-safe components)
-   `<apex:insert>`
-   `<apex:image>`
-   `<apex:outputLabel>`
-   `<apex:outputLink>`
-   `<apex:outputPanel>`
-   `<apex:outputText>`
-   `<apex:page>`
-   `<apex:panelGrid>`
-   `<apex:panelGroup>`
-   `<apex:param>`
-   `<apex:repeat>`
-   `<apex:stylesheet>` (as long as the URL isn’t directly referencing Salesforce style sheets)
-   `<apex:variable>`

## Components to Use with Caution When Rendering as PDF

-   `<apex:attribute>`
-   `<apex:column>`
-   `<apex:component>`
-   `<apex:componentBody>`
-   `<apex:dataTable>`

## Components That Are Unsafe to Use When Rendering as PDF

-   `<apex:actionFunction>`
-   `<apex:actionPoller>`
-   `<apex:actionRegion>`
-   `<apex:actionStatus>`
-   `<apex:actionSupport>`
-   `<apex:commandButton>`
-   `<apex:commandLink>`
-   `<apex:detail>`
-   `<apex:enhancedList>`
-   `<apex:flash>`
-   `<apex:form>`
-   `<apex:iframe>`
-   `<apex:includeScript>`
-   `<apex:inputCheckbox>`
-   `<apex:inputField>`
-   `<apex:inputFile>`
-   `<apex:inputHidden>`
-   `<apex:inputSecret>`
-   `<apex:inputText>`
-   `<apex:inputTextarea>`
-   `<apex:listViews>`
-   `<apex:message>`
-   `<apex:messages>`
-   `<apex:outputField>`
-   `<apex:pageBlock>`
-   `<apex:pageBlockButtons>`
-   `<apex:pageBlockSection>`
-   `<apex:pageBlockSectionItem>`
-   `<apex:pageBlockTable>`
-   `<apex:pageMessage>`
-   `<apex:pageMessages>`
-   `<apex:panelBar>`
-   `<apex:panelBarItem>`
-   `<apex:relatedList>`
-   `<apex:scontrol>`
-   `<apex:sectionHeader>`
-   `<apex:selectCheckboxes>`
-   `<apex:selectList>`
-   `<apex:selectOption>`
-   `<apex:selectOptions>`
-   `<apex:selectRadio>`
-   `<apex:tab>`
-   `<apex:tabPanel>`
-   `<apex:toolbar>`
-   `<apex:toolbarGroup>`

