Image Viewer CP Pro SDK ActiveX

Image Viewer CP Pro SDK ActiveX

Platform : Windows 10, Windows 8, Vista, Windows 7, XP

It is a PDF Viewer and Document Viewer SDK , Export to PDF ,Image processing, 1D and 2D Barcode Reader, Writer, DICOM and OCR with C#, C , VB.NET , VB, Delphi, Vfp, MS Access.

Popular Solution Go   Back

C# - Reduce PDF document size through C#

Step 1: To install the Image Viewer CP Pro ActiveX Control, begin by launching the setup file (http://www.viscomsoft.com/demo/imageviewercpprosetup.exe). Select the desired installation folder for the Image Viewer CP Pro ActiveX and continue with the installation on your development computer.

Step 2: Create New Visual C# Project, select Windows Forms Application.



Step 3: The next step is to install Image Viewer CP Pro ActiveX in ToolBox. Select Toolbox, select Components item, right click mouse button, select Choose Items...



Step 4: Select COM Components tab, select Image Viewer CP Pro ActiveX Control , click OK. 


Step 5: From the Toolbox, add the Image Viewer CP Pro ActiveX control to the design surface.


Step 6:  Add two button in form with the following code. , one button named buttonLoad, another button named buttonSave.

 

 private void buttonLoad_Click(object sender, EventArgs e)

        {

            axImageViewer1.FileName ="c:\\yourfolder\\yourfile.jpg";

        }

 

        private void buttonSave_Click(object sender, EventArgs e)

        {

            axImageViewer1.PDFUseJPEGCompression = true;

            axImageViewer1.PDFJPEGQuality = 40;

            axImageViewer1.Save("c:\\yourfolder\\yournewfile", "pdf"); 

        }


Step 7: Press F5 to build and run the application.