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

VB.NET - How to Split Pages from PDF file using VB.Net

Step 1: To install the Image Viewer CP Pro ActiveX Control, begin by launching the setup file (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 Basic Project, select Windows 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: Now you will see the Image Viewer CP Pro ActiveX's icon on toolbox, drag it to form. 

 

Step 6: Design the UI same as following
 

Step 7: When pressing the "Split” button our sample’s code will call PDFEditSplit method to split start from specific page of PDF file, the page number start from 0. 0 is first page, 1 is second page.
Remember if you want to use PDFEditDeletePage method and another PDF Editing methods, you need buy our Advanced PDF Viewer and PDF Edit Plug-in.

Step 8.  Our sample’s code hard code output to c:\yourpath\split1.pdf and c:\yourpath\split2.pdf, you should change the correct output path before you run this sample.

AxImageViewer1.PDFEditSplit(TextBox1.Text, TextBox2.Text, "c:\yourpath\split1.pdf", "c:\yourpath\split2.pdf")


Step 9: If you run this project now, you will see black color rectangle. In this sample, you do not need display the image. You may set the width and height properties of Image Viewer CP Pro ActiveX  to 1 pixel, then the user will not see it.
 
Step 10: Download the sample source code from VBNET_Split_Page_PDF.zip