In general, accomplishing this task consists of several independent parts:
1. Configure DxPdfViewer (ASP.NET Core Blazor), DevExpress.XtraPdfViewer > PdfViewer (WinForms) or DevExpress.Pdf > PdfDocumentProcessor in conjunction with some custom visual components (ASP.NET WebForms) according to their corresponding product documentation, demos, examples and articles in the Support Center knowledge base, because this is unrelated to XAF itself. For faster resolution on pure PdfViewer and component questions in the future, submit them under the corresponding Blazor, .NET | WinForms or ASP.NET WebForms platforms directly.
2. Embed a configured PDF viewer or other suitable UI control into an XAF View (or displaying a fully custom form separately using traditional approaches for each target platform), and feeding it with data from the application database or external sources. Check out the following XAF documentation for this:
Concepts > UI Construction > Using a Custom Control that is not Integrated by Default
Concepts > UI Construction > View Items > Implement Custom Property Editors
Task-Based Help > How to: Show a Custom Data-Bound Control in an XAF View (WinForms)
Task-Based Help > How to: Show a Custom Data-Bound Control in an XAF View (ASP.NET)
Concepts > Data Manipulation and Business Logic > Create, Read, Update and Delete Data
Concepts > Extend Functionality > Actions
If PDF files are stored in the database as a BLOB object, exposed via a business object property as byte array, the most appropriate solution is to implement a custom property editor that will create a suitable UI control and bind it to data stored in the object's property.
You can also find several integration examples provided by our users or us in the following tickets:
- ASP.NET Core Blazor: XAF's Outlook Inspired Demo PropertyEditor, ComponentModel
- WinForms: XAF's Outlook Inspired Demo PropertyEditor, T252349, T252332, T472676 - WinForms
- ASP.NET WebForms: E5095, T454758, T751219
Typical use-case scenarios include, but are not limited to:
- previewing FileData object contents (created using our FileAttachment module) inside the application (directly in DetailView or ListView) using a specialized PDF viewer control;
- displaying a PDF file from a file system or network in a DetailView or custom form;
- displaying a PDF file stored inside a binary database column in a DetailView or custom form;
- opening a PDF file preview coming from an arbitrary source after clicking on a navigation item.
…
We would also greatly appreciate it if you describe your planned use-case scenarios or exactly how and for what your end-users are supposed to use PDF viewer control in your app.
If possible, attach screenshots, test samples and database to clarify expected results and user steps within the application UI. With that, we will be able to better understand your requirements and provide more specific solutions or consider improvements to our products for the future. Thanks in advance.
Search keywords:
PDF, Adobe, portable document format, XtraPdfViewer, PdfDocumentProcessor