







Introduction to SilverDox
This document will step you through getting up and running with SilverDox. By the end of the document, you will understand the basic architecture of a SilverDox based solution, know how to convert existing documents to Silverlight documents, how to view the documents, and where to go next.
SilverDox Architecture
A SilverDox based solution is composed of two main parts:
1. A SilverDox Publisher, which is responsible for converting documents to Silverlight XPS (also known as XOD).
2. A SilverDox Client, which is a Silverlight based application capable of viewing XOD files.
The basic workflow of a SilverDox based solution is to use the a SilverDox Publisher component to convert input files (PDF, DOC, DOCX, JPG, etc.) to XOD, and then use the SilverDox client to view the resulting XOD file. A XOD file is simply an XPS file that has been optimized for online viewing. For more information please refer to see the SilverDox FAQ.
The SilverDox Publisher will typically reside at a central location such as a file server, and the clients will be used on remote computers to view the files. Note that the client computers require nothing to be installed beyond a web browser and the Silverlight plug-in as the Silverlight components are served on-demand from a web server, and then executed on a remote machine.
The SilverDox Publisher comes in two flavors:
1. Aa command line interface (CLI) executable called DocPub, which can be downloaded here.
2. Aa .NET, JAVA, or C/C++ API (pdftron.PDF.Convert.ToSilverlight()) which is an add-on to PDFNet SDK. For an example of how to use this API, please see the Silverlight sample project.
To embed document viewing in your Silverlight solution use SilverDox SDK, which can be downloaded here. To get up and running quickly, source code for several sample clients is included as part of the SDK. The sample code may be used as-is, or as a starting point to create a viewer customized for your particular needs.
Getting Started: Converting a Document
The first step is to convert a document to XOD with one of thea SilverDox pPublisher components. The publisher we will use here is the DocPub CLI executable.
Step 1: Download the SilverDox Publisher CLI file from http://www.pdftron.com/silverdox/downloads.html and unzip the archive.
Inside there are 7 files:
File | Description |
docpub32.exe | A 32-bit command-line interface executable for converting documents to XOD files. |
docpub64.exe | A 64-bit command-line interface executable for converting documents to XOD files. |
legal.txt | Legal notice. |
license.pdf | Software license agreement. |
test32.bat | A sample script that will use docpub32.exe to convert documents in several ways. Right-click on the file and choose edit to see the script’s contents. |
test64.bat | A script that will use docpub64.exe to convert documents in several ways. Right-click on the file and choose edit to see the script’s contents. |
usage.txt | A text file Eexplainsing all of the possible dDocPpub switches and contains illustrating several examples. |
Step 2: We will convert the license.pdf file to a XOD. While holding down the shift-key, right click on or inside the “SilverDoxPublisherCLI” folder you just unzipped and choose “Open command window here”. A command prompt will open. To convert license.pdf to license.xod, type the following (replacing 32 with 64 if using a 64-bit OS), and then press return:
docpub32 -f xod license.pdf
What did that mean?
Entry | Meaning |
docpub32 | Launches document publisher utility. |
-f | A switch indicating the output format will be specified in the next argument. |
xod | The output format is to be xod. |
license.pdf | The name of the source file to be converted. |
If you look inside the SilverDoxPublisherCLI folder, there will be a new file, “license.xod”. This is the converted Silverlight xps file that can be opened with a SilverDox viewer, and concludes our use of the publisher. To view “license.xod”, we now turn our attention to the SilverDox client.
Getting Started: Viewing a Document
Step 3: To view the newly created license.xod file, we will use one of the sample clients located on the PDFTron’s SilverDox samples webpage. Open your internet browser and point it to the PDFTron Samples web page, located at http://www.pdftron.com/silverdox/samplecode.html. Click on the image below the heading “ReaderControl Sample” to open a new browser window containing a SilverDox client. (If you do not have a recent version of Silverlight installed on your computer, you may be prompted to download and install it.) This sample SilverDox client is written to automatically open a document located on pdftron.com, but we will now use it to open the document that was just converted.
Step 4: To open an open file dialog, click the button that looks like a folder:


Figure 1: The ReaderControl Client Displaying License.xod
This concludes the client portion of this guide. If you wish, you may now try converting other files present on your computer to XOD, and view them using SilverDox client.
Next Steps
The next step would be to create and compile your own client. For a step-by-step tutorial on creating your first client, download the SilverDox Viewer SDK (http://www.pdftron.com/silverdox/downloads.html) and look at the documentation’s “Getting Started” article. You can also open the SDK’s samples folder containing 5 sample projects, including the completed tutorial project and the project that builds the client used in this guide.
© 2010 PDFTron Systems, Inc. All Rights Reserved. All other trademarks are the property of their respective owners.