Visual Studio

<< Click to Display Table of Contents >>

Navigation:  Installation >

Visual Studio

WPViewPDF also comes with a component to be used in .NET Forms application.

The name of the assembly is PDFViewerLib.  

 

There are different versions for the Demo, the regular and the PLUS edition. Please see directory "DotNET".

 

In the full version the source which was written in C# is also included. You can use this source to compile the assembly if you need it for a different framework version.

 

To use WPViewPDF drag the assembly to the toolbox. You can then drop one instance to the form.

 

Please copy the  DLLS wPDFView05.dll, wpdecodejp.dll and wp_type1ttf.dll to the executable directory. You can also control which engine DLL is loaded by the wrapper assembly. Please use WPViewPDF.PDFViewer.SetDLLName to load the engine DLL (and the connected TTF and JBIG2 Dlls) from a different path.

 

The 64bit edition requires wPDFView05x64.dll, wpdecodejp64.dll and wp_type1ttf64.dll. If your application was built for "AnyCPU" it will be executed as 64bit or 32bit depending on the host system. Please see our example code for loading the correct DLL in this case.

 

Unless You use the demo version You need to set the license keys from the delivery (e-mail) using ViewerStart()

 

      public Form1()

       {

           InitializeComponent();

          // Set some properties

           pdfViewer1.ViewerStart("name", "xxx", 0);

       }

 

To avoid redundancy this manual shows how to use the VCL in objectpascal and/or the dot-net assembly in C#.

 

 

 

 

Note:

In a standard C or C++ VisualStudio program please call command COMPDF_CPP_PROGRAM, 1

which translates to

  SendMessage(WM_PDF_COMMAND, 1289, (LPARAM)1);

right after start.

 

 

The .NET wrapper has been compiled in setting "AnyCPU".

 

It will load the 32bit engine while in 32bit mode, the 64bit engine while in 64 bit mode.