As you may already know, DevExpress Reports is our royalty-free .NET reporting platform.
DevExpress Reports ships as part of most DevExpress subscriptions and fully supports WinForms,
WPF, ASP.NET, MVC, and ASP.NET Core.
If you are new to the DevExpress product line and have yet to experience the flexibility
of our desktop and web reporting suite, be sure to point your browser to devexpress.com/try
to download your free 30-day trial of DevExpress Reports today.
In this tutorial, I'll describe one of our newest reporting features - a feature we will
ship in May 2020.
As the title of this tutorial suggests, DevExpress Reports now allows you to merge PDF documents
with your report.
Though workarounds did exist in the past to merge PDF docs, v20.1 makes it super easy
to embed PDF files directly into a report.
In addition to simplicity, this new feature allows users to preview PDF content within
our report viewer.
Let's get started and let's embed a few PDF documents into reports.
As you can see in our report control toolbox, v20.1 includes a new PDFContent control.
Let me first show you how easy it is to embed or merge a PDF file when using our integrated
Visual Studio report designer.
I'll simply drag and drop a random PDF file into the report design area.
Note what happens when I drop the PDF file - the PDFContent control spans the entire
width of the live report area- from the left to the right side of the document's margins.
As you might expect, PDFContent control automatically stores the original PDF file in a byte array.
PDF source is serialized as a byte array along with the report's layout.
Before we proceed, let me quickly show you a preview of this simple report - a PDF file
that contains arrival card info.
Let's now return to the DevExpress Visual Studio Report Designer and note a couple of
other important features of PDFContent control.
As you can see, you don't actually need to embed a local PDF file.
Should you prefer to reference documents stored on a remote server or computing device, DevExpress
Reports allows you to specify the URL path to your PDF file.
Perhaps most important - these properties can also be bound to a data source field.
To help demonstrate this capability - a capability we expect to be used most often - I'm going
to run a sample invoice report we ship as part of our distribution.
In this example, we've bound PDFContent to our data source's PDF field - a field which
stores a PDF byte array.
When I generate my report preview, DevExpress Reports automatically displays the specified
PDF documents along with my invoice report.
These PDF documents are displayed in succession as PDFContent always starts with new page
for each PDF file.
Before I wrap up this video, let me quickly describe our reporting platform's PDF export
feature.
You'll note that embedded PDF content is always previewed as an image within DevExpress Reports'
runtime report viewer.
As you can see, text selection and data editing support is unavailable within our report viewer.
If you or your users would like to enable text selection and data editing, you can simply
export your report to PDF.
Once exported, your report - in this case an invoice and four merged PDF files - can
be edited or modified directly within Adobe Acrobat or other PDF viewers.
I hope you've enjoyed this short tutorial on DevExpress Reports and its new PDFContent
control.
If you liked this video, please give us a thumbs up.
If you have questions, please comment below.
And please remember to subscribe to this channel for more great DevExpress training videos.