eud-eud-for-devexpress-reports-reporting-for-web-report-designer-create-reports-reports-with-embedded-pdf-content.md
This tutorial explains how to use the PDF Content control to do the following:
The image below shows an invoice report that contains information about order items.
The following image illustrates the first PDF file page embedded to the invoice report. This page has the same paper kind as the initial report. Report controls are used to add item title, item price, line, logo image, and sequential page numbers to this page.
To create the above report with PDF content, follow the steps described in these sections:
The following image illustrates the main report’s Preview :
Create a new blank report. Remove the report’s margins.
Drop the PDF Content control from the Toolbox onto the Detail band.
Select the control, navigate to the Properties panel, click Source or Source URL property’s ellipsis button, and select PDF file. In this demo, we use the following PDF specification: Specification.pdf.
Disable the control’s Generate Own Pages property. Adjust the control size to make PDF content fit the entire Detail band. For this, set the Detail band’s Height to 1095 and the control’s Width and Height to 849 and 1095.
Bind the report to the JSON data below and set the report’s Data Member property to OrderItems.
Place two labels, a line, and a picture box on the PDF page header as shown below:
Set the line’s Width and Fore Color to 2 and orange (rgb(255,165,0)) respectively. Assign the following image to the picture box’s Image Source property:
Add the Page Info control to the PDF page footer. Use the following settings for this control:
Open Preview to show the result. The image below shows the report’s first page:
Add a footer to the main report.
Add the Subreport control to the footer. Assign the report with PDF content to the control’s Report Source URL property. Enable the control’s Generate Own Pages property.
Add the Page Info control to the report’s Bottom Margin band. Set the control’s Text Alignment propery to Middle Center and the Text Format String property to Page {0} of {1}.
Open Preview to show the result.