For the complete documentation index, see llms.txt. This page is also available as Markdown.

View a PDF document on Server/Desktop

To view a PDF document.

// create a view controller
PDFViewCtrl view = new PDFViewCtrl();

// create a doc instance
PDFDoc doc = new PDFDoc(filename);

// set doc to the view
view.SetDoc(doc);
// define pointer for view controller
std::auto_ptr<PDF::PDFViewCtrl> view;

// create a view controller,
// passing in the platform specific window handle and the current HINSTANCE for windows
view = std::auto_ptr<pdftron::PDF::PDFViewCtrl>(new pdftron::PDF::PDFViewCtrl(parent_hwnd, hinstance));

// create a doc instance
std::auto_ptr<PDF::PDFDoc> doc(new PDF::PDFDoc(filename));

// set doc to the view
view->SetDoc(*doc);
// create a view controller
PDFViewCtrl view = new PDFViewCtrl();

// create a doc instance
PDFDoc doc = new PDFDoc(filename);

// set doc to the view
view.setDoc(doc);

PDF Viewer Control (Simple) sample - Full sample Full source code which shows how to use PDF viewer control in a basic project. The sample uses a number of built-in features from PDFViewCtrl to implement document navigation, text highlighting, markup, and editing. Samples available in Python, C# (.Net), C++, Go, Java, Node.js (JavaScript), PHP, Ruby, VB. To use this code, you'll need to download and get started with Server SDK.

About viewing a document

The Apryse SDK comes with a powerful high level class called PDFViewCtrl that allows users to easily display PDF documents in their application. This class wraps around all the document processing lower level details that are required when displaying a PDF document.

Last updated

Was this helpful?