Foxit WebPDF Viewer – Discontinued

Getting Started Guide for WebPDF Viewer

Getting Started with WebPDF Viewer

Foxit WebPDF Viewer is a cross-platform solution for quickly displaying and manipulating PDF document in a web browser. Built on Foxit’s widely-used core PDF technology, WebPDF Viewer provides extensive and easy-to-use capabilities for online viewing. This guide will show you how to quickly create your own basic WebPDF Viewer page.

  1. Download the WebPDF Viewer package and then refer to the Deployment Guide for instructions on how to install and configure WebPDF Viewer on Windows and Linux.
  2. Once installation is complete you should be able to open the WebPDF Viewer demo at http://{ip}:{port}/ which is usually http://localhost:8080/ if you have used the default settings.


Create your own WebPDF Viewer Page

  1.  To integrate WebPDF Viewer into your webpage:Create a HTML page named “myviewer”(choose a name you like), and place it in the installation directory at ..\webpdf\viewer\webapp\pc
  2. Create a
    tag in the HTML section and reserve “docViewer” as the ID. This will be the container for the WebPDF Viewer.
  3. Add a style for the viewer element in HTML section so that is takes up a reasonably sized area.
  4. Add the css link in the section
  5. Add the following script after the HTML body section closes () to create a new Viewer instance
  6. Open your viewer at: http://localhost:8080/pc/myviewer.html
  7. To open your own PDF file, use one of these two methods:Add a uri parameter in the open URL to open a network PDF file (HTTP file)http://localhost:8080/pc/myviewer.html?docuri= ver/doc/3BigPreview.pdf

    The docuri is the download link of PDF file.Modify the parameter of openFileByUri() in the script content in step 7:Replace “getBaseUrl() +’docs/sample/butterflies.pdf'” to the URL of your file, and then open http://localhost:8080/pc/myviewer.html

  8. There is also a HTML GettingStarted sample in the installation directory:.. foxitsoftware\webpdf\viewer\webapp\pc\gettingstarted.html.
  9. WebPDF Viewer uses Server Rendering (SR) for PC Viewer by default. You can change to JavaScript Rendering(JR) in the console at: http://localhost:9000/console ( defaultname&password: admin, admin)

That is it! You have now created a basic WebPDF Viewer for your web page. Please refer to the following document (in the same directory this this one) for more information about how to use and integrate WebPDF Viewer into your web solutions:

  • User Guide
  • Developer Guide
  • Deployment Guide

Note: This article refers to a deprecated version of a Foxit Product. If you are still using Foxit WebPDF Viewer, please refer to your download package documents for Developer Guide and API Reference.

Get a trial version of Foxit PDF SDK for Web and see the brand new features we’ve released for our web-based version!

Updated on May 15, 2017

Was this article helpful?
Thanks for your feedback. If you have a comment on how to improve the article, you can write it here: