Chromium Embedded Framework (CEF)
The Chromium Embedded Framework (CEF) is an open source framework used to embed the Chromium (Chrome) browser engine in other applications.
PSPDFKit for Windows Vista/7/8/8.1 via CEF
With CEF, PSPDFKit can be integrated into almost any desktop-style application on any OS, similar to our Electron support. The most common use case is integrating PSPDFKit into apps that are built with WIN32 or WPF instead of UWP.
CefSharp, a popular binding for CEF, supports Windows Vista, 7, 8, 8.1, and 10.
Using CEF with CefSharp on Windows
Support for CefSharp on Windows is currently in beta. Please contact us for a sample app.
The 7zip file provided contains a modified version of the official CefSharp minimal example solution. It is a Git repository, and the last commit on master contains the complete changes necessary for using our SDK with CefSharp.
A scheme handler, which supplies the files requested by the CefSharp control, is registered for http. This is just a very basic custom scheme handler to demonstrate how to handle requests, and it is not production-ready code. To fully implement a custom scheme handler, please consult the CefSharp documentation.
To get the sample to run, do the following:
- Unzip the minimal example project and open the solution contained within it.
- Make sure
CefSharp.MinimalExample.Wpfis the active project.
- In the Solution Explorer, open the file
- Replace the
LICENSE_KEY_GOES_HEREtext with your license key.
- Right-click on
CefSharp.MinimalExample.Wpf\Properties\assets and then click on Open Folder in File Explorer.
- Copy all the files (i.e.
pspdfkit.wasm, etc.) from the PSPDFKit for Web distributable folder,
\package\dist, into the assets folder.
CefSharp.MinimalExample.Wpf\CefSharpSchemeHandlerFactory.csand change the string
cef.example.comto match the bundle ID of your license. This is essential!
- Right-click on the project
CefSharp.MinimalExample.Wpfand click on Build.
- Start the project and it should display
default.pdfin the app.
If the PDF is not displayed, you can troubleshoot the app while it is running by opening a Chrome browser, navigating to http://localhost:8088/, and clicking on PSPDFKit for Web.
This will open a connection to the running app and you can switch to the Console tab of the developer tools and examine any error messages.