|
| 1 | +--- |
| 2 | +title: PDF Content |
| 3 | +author: Sergey Andreev |
| 4 | +--- |
| 5 | +# PDF Content |
| 6 | + |
| 7 | +**PDF Content** is a control that renders PDF content in a report. |
| 8 | + |
| 9 | +PDF content is rendered on separate pages and uses its own page settings. |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | +Use one of the following options to specify PDF content: |
| 14 | + |
| 15 | +* [Specify PDF data](#specify-pdf-data). |
| 16 | + |
| 17 | + This data is stored in the report file. The source of this data does not need to be available when the report is rendered. |
| 18 | + |
| 19 | +* [Specify a reference to a PDF document](#specify-a-reference-to-a-pdf-document). |
| 20 | + |
| 21 | + The reference to the document is stored in the report definition file. The referenced document should be available when the report is rendered. |
| 22 | + |
| 23 | +## Add a PDF Content Control to a Report |
| 24 | + |
| 25 | +Drop the **PDF Content** item from the Toolbox onto a [band](../../introduction-to-banded-reports.md) on the design surface. |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | +You can also copy a PDF document from an external application and paste it in your report, or drag a document and drop it onto the design surface. The dragged file's content is assigned to the control's **Source** property as [PDF data](#specify-pdf-data). |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | +## Specify PDF Data |
| 34 | + |
| 35 | +You can assign PDF data to the control's **Source** property. |
| 36 | + |
| 37 | +Expand the **PDF Content**'s smart tag and click the **Source** property's ellipsis button to obtain the binary data from a file. |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | +When users save a report, the **Source** property value persists in the report file. |
| 42 | + |
| 43 | +> [!TIP] |
| 44 | +> See the [Use Expressions](#use-expressions) section below for information on how to conditionally specify the **Source** property value, or bind it to a report parameter or data source field. |
| 45 | +
|
| 46 | +## Specify a Reference to a PDF Document |
| 47 | + |
| 48 | +You can use an external PDF document as a source of PDF data. Set the **Source URL** property to a local file system path or URL. |
| 49 | + |
| 50 | +Expand the **PDF Content**'s smart tag and click the **Source URL** property's ellipsis button to specify the PDF document location in the file system. |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | +To specify the PDF document's location on the Web, use the URL as the **Source URL** property's value. |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | +When users save a report, the URL or path specified in the **Source URL** property is included in the report file. The PDF document should be available at the specified location when a report is printed or rendered in Preview. |
| 59 | + |
| 60 | +> [!TIP] |
| 61 | +> See the [Use Expressions](#use-expressions) section for information on how to conditionally specify the **Source URL** property value, or bind it to a report parameter or data source field. |
| 62 | +
|
| 63 | +The **Source URL** property value takes precedence over the **Source** property value. If you specify both properties, **PDF Content** includes the content specified by **Source URL**. However, if the file specified in the **Source URL** property cannot be loaded, the binary data from the **Source** property is used. |
| 64 | + |
| 65 | +## Use Expressions |
| 66 | + |
| 67 | +You can specify an expression that specifies the **Source** or **Source URL** property value. An expression can include [report parameters](../../shape-report-data/use-report-parameters.md) or [data source](../../bind-to-data.md) fields, or it can conditionally specify a property value. |
| 68 | + |
| 69 | +Expand the **PDF Content**'s smart tag. |
| 70 | + |
| 71 | +* Click the **Expression** property's ellipsis button below the **Source** property. Use the invoked **Expression Editor** to create an expression that identifies the source of binary PDF data. |
| 72 | + |
| 73 | +  |
| 74 | + |
| 75 | +* Click the **Expression** property's ellipsis button below the **Source URL** property. Use the invoked **Expression Editor** to create an expression the value of which identifies a URL or path to a PDF document. |
| 76 | + |
| 77 | +  |
| 78 | + |
| 79 | + |
| 80 | +## Limitations |
| 81 | + |
| 82 | +* PDF content always starts on a new page. Report content is printed?on a new page after the PDF content is finished. |
| 83 | + |
| 84 | +* PDF content is displayed as an image in Preview. Users cannot select text in PDF content. To allow users to select text, export the report to PDF. |
| 85 | + |
| 86 | +* You cannot add the **PDF Content** control to the following bands: |
| 87 | + * **Top Margin** / **Bottom Margin** |
| 88 | + * **Page Header** / **Page Footer** |
| 89 | + * **Group Header** / **Group Footer** bands (if their **Repeat Every Page** properties are enabled). |
| 90 | + * **Vertical Header** / **Vertical Detail** / **Vertical Total** |
0 commit comments