Use DevExpress’s PdfViewerControl in a WPF window, assign a PDF through DocumentSource or OpenDocument, and let the built-in command bar and navigation pane handle viewing, search, forms, annotations, and printing. The examples below follow the DevExpress 26.1 documentation updated August 5, 2026. Package names, namespaces, and APIs can change, so match every step to the DevExpress version installed in your project.
What you need before adding the viewer
- A Windows WPF application targeting a framework supported by your installed DevExpress release.
- DevExpress WPF assemblies, obtained through the Unified Component Installer or a configured DevExpress NuGet feed.
- The
DevExpress.Wpf.PdfViewerpackage when using NuGet. - A project configured with the DevExpress references that correspond to your release. The current API reference places
PdfViewerControlinDevExpress.Xpf.PdfViewerand theDevExpress.Xpf.PdfViewer.v26.1.dllassembly.
If Visual Studio cannot resolve the XAML namespace or control, check that the package and its dependent DevExpress assemblies are installed for the same version. Do not mix 25.x, 26.1, or other release assemblies in one application.
Add PdfViewerControl to XAML
The PDF viewer uses DevExpress’s PDF XAML namespace. This minimal window creates a viewer that fills its grid:
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dxpdf="http://schemas.devexpress.com/winfx/2008/xaml/pdf"
Title="PDF Viewer" Height="350" Width="525">
<Grid>
<dxpdf:PdfViewerControl x:Name="pdfViewer" />
</Grid>
</Window>
Give the control a name when you will load documents, call commands, or print from code. If you only bind a source in XAML, a name is optional.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →#1 Best Overall
Load a PDF
Load a file path in code
DocumentSource accepts a full file path. A simple button handler can open a file selected by the user:
using Microsoft.Win32;
private void OpenPdf_Click(object sender, RoutedEventArgs e)
{
var dialog = new OpenFileDialog
{
Filter = "PDF files (*.pdf)|*.pdf|All files (*.*)|*.*"
};
if (dialog.ShowDialog() == true)
pdfViewer.DocumentSource = dialog.FileName;
}
Use an absolute path for predictable behavior. Resolve relative paths yourself before assignment, and report missing files to the user instead of allowing an unhandled exception to escape the click handler.
Load a stream, byte array, or URI
DevExpress documents four source shapes: a stream, byte array, full file path, or URI. Choose according to how your application obtains the document:
// Byte array obtained from your application’s storage or HTTP client
byte[] pdfBytes = await LoadBytesAsync();
pdfViewer.DocumentSource = pdfBytes;
// Keep the stream alive according to your application’s ownership policy
Stream pdfStream = await OpenStreamAsync();
pdfViewer.DocumentSource = pdfStream;
// A URI can be used when the document is addressable as a URI
pdfViewer.DocumentSource = new Uri("https://example.invalid/file.pdf");
The lifetime and accessibility of a stream, and authentication requirements for a remote URI, are application concerns. If you need explicit code-driven loading, the API reference also documents OpenDocument; check the overload available in your installed release.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsLoad a packaged PDF resource
The quick-start pattern assigns a WPF pack URI to DocumentSource. Mark the PDF as a resource in the project, then use the URI form appropriate to your assembly:
pdfViewer.DocumentSource = new Uri(
"pack://application:,,,/YourAssembly;component/Assets/sample.pdf");
Resource build action, assembly name, and URI syntax must match your project. A file copied to the output directory is not the same as a compiled WPF resource.
Choose the command bar and start screen
The viewer can expose its standard commands or run with no built-in command bar:
<dxpdf:PdfViewerControl
x:Name="pdfViewer"
CommandBarStyle="Bars"
ShowStartScreen="True"
NumberOfRecentFiles="5"
ShowOpenFileOnStartScreen="False" />
CommandBarStyle="Bars"displays the standard command surface.CommandBarStyle="None"removes it, useful when your application supplies its own toolbar.ShowStartScreen="True"displays the start screen before a document is loaded.NumberOfRecentFiles="5"limits the recent-file list in this example.ShowOpenFileOnStartScreen="False"hides the Open button on that screen.
These are configuration choices, not required defaults. You can also set them through the designer’s Quick Actions in supported Visual Studio integrations.
Navigate and inspect a document
Once a PDF is loaded, the navigation pane provides built-in panels for:
- Thumbnails, for visual page selection.
- Bookmarks, for document-defined sections.
- Attachments, for files embedded in the PDF.
- Comments and signatures, where present.
- Layers, for showing or hiding optional PDF content.
The command bar and context menus expose common navigation and viewing commands. Users can search text, with options such as case-sensitive and whole-word matching, select and copy text or images, follow hyperlinks, and fill supported interactive forms.
Forms, bookmarks, attachments, and text tools
The viewer supports filling forms and provides workflows for importing or exporting form data. It also exposes bookmarks, hyperlinks, and attachments for documents that contain them. Availability and behavior depend on the PDF’s content and on the DevExpress version you reference; do not assume that a malformed or unusual PDF will expose every structure perfectly.
Search and copy
Use the search command in the viewer’s command bar, then choose case-sensitive or whole-word matching when the document requires an exact search. Selected text or images can be copied through the standard copy command.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #3
Layer visibility
Open the Layers panel to inspect optional content groups and toggle their visibility. This is useful for engineering drawings or PDFs that contain alternate visual layers.
Work with annotations and comments
Readers can create sticky notes and text markup, edit annotation properties, reply in the Comments pane, set a review status, and remove annotations. A code workflow can highlight selected text:
// Invoke after the user has selected text in the viewer.
pdfViewer.HighlightSelectedText();
Exact annotation methods and overloads are version-sensitive. Use IntelliSense and the API reference for your installed assembly when adding custom annotation commands. The Comments pane is the place to review replies and status changes made by users.
Print from the viewer
Let the user choose print settings
Users can open printing from the File toolbar group, the context menu, or Ctrl+P. The dialog supports printer selection, copies, page range, paper size and orientation, paper source, and print-to-file output.
From code, invoke:
private void Print_Click(object sender, RoutedEventArgs e)
{
pdfViewer.Print();
}
To customize the dialog before it appears, handle PageSetupDialogShowing and adjust the exposed settings for your release. Alternatively, the documented PrintDocumentCommand can be bound to your own command surface.
Print with programmatic settings
For unattended or tightly controlled workflows, use a print method that accepts printer settings, including PdfPrinterSettings in releases that expose it:
// The exact constructor and properties are release-specific.
// Consult the API reference for your installed DevExpress version.
var settings = new PdfPrinterSettings
{
PrinterName = "Your printer name"
};
pdfViewer.Print(settings);
Printer drivers and the rendering path can affect speed and output. The print documentation discusses XPS printing, DirectX/GDI+ compatibility, and legacy printing settings as troubleshooting choices. GDI+ has documented limitations that can lose content such as stroke and clip text rendering, transparency, or blend modes; test representative PDFs before selecting a rendering path for production.
Rank #4
Licensing boundary for PDF Document API code
DevExpress’s overview states that production code using the listed PDF Document API capabilities requires an active DevExpress Office File API Subscription or Universal Subscription. Examples include importing or exporting interactive form data in code, password-protecting a document, specifying a signature, editing form-field properties, and flattening annotations. That statement is scoped to those PDF Document API features; it does not establish that every basic PdfViewerControl display scenario requires those subscriptions. Confirm current entitlements and license terms with DevExpress before deployment.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Troubleshooting common problems
The XAML control is unknown
Verify the DevExpress.Wpf.PdfViewer package or installer component is installed, the dxpdf namespace is exactly correct, and all DevExpress references target one release.
The document does not open
Check that the path is absolute, the file exists, and the stream is readable and remains valid for the viewer’s use. For a URI, verify network access and any required authentication. Log the exception and show a user-facing error rather than replacing a working document silently.
Images or lazy content appear missing
Allow the document to finish loading before reading pages or printing. For very large files, avoid immediately starting several expensive operations on the UI thread.
Printed output differs from the screen
Try the documented XPS, DirectX, GDI+, or legacy printing options for your environment, and test the printer driver. If GDI+ drops transparency, blend modes, or stroke/clip text content, choose a different supported path and compare output.
Recent files or the start screen are not shown
Check ShowStartScreen, NumberOfRecentFiles, and ShowOpenFileOnStartScreen. A custom command bar with CommandBarStyle="None" will not provide the built-in open commands.
Best Value
- Used Book in Good Condition
Or skip the browser setup
If your application also needs website screenshots, ScreenshotNeo provides a single HTTP request instead of a locally managed browser. It accepts consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be disabled. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing result.
See the complete options and authentication details in the ScreenshotNeo documentation. A cURL request is:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
The same request in Python:
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
And Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
ScreenshotNeo also offers an MCP server with take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.
Recommended Free Tools
Implementation checklist
- Install the matching DevExpress WPF PDF Viewer package or installer component.
- Add the PDF XAML namespace and place
PdfViewerControlin a layout container. - Load a path, stream, byte array, or URI through
DocumentSource, or use the documentedOpenDocumentroute. - Choose whether to show the command bar and start screen.
- Test search, forms, bookmarks, attachments, annotations, layers, and copy operations with representative PDFs.
- Test dialog-based and programmatic printing with the drivers and rendering path used in deployment.
- Check subscription requirements before shipping code that uses the PDF Document API features listed by DevExpress.
Frequently Asked Questions
Can I bind PdfViewerControl to a PDF received from an API?
Yes. Convert the response to a readable stream or byte array and assign it to DocumentSource, observing the stream lifetime required by your application and the API version.
Is PdfViewerControl the same as the PDF Document API?
No. The viewer is the WPF UI control. DevExpress separately scopes subscription requirements to listed PDF Document API operations such as programmatic form-data export, password protection, signatures, field-property editing, and annotation flattening.
How do I remove the built-in toolbar?
Set CommandBarStyle to None and provide your own commands or bindings for the actions your application needs.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.

