Viscomsoft .NET PDF Viewer SDK

SplitPDF 

 

Split PDF files.

 Visual Basic

Public bool Sub SplitPDF(ByVal strSourcePDF As String,
                         ByVal iStartFromPageNo As Integer,
                         ByVal strOutputPDFFile1 As String,
                         ByVal strOutputPDFFile2 As String)

 
 C#

public bool SplitPDF(string strSourcePDF,
                     int iStartFromPageNo,
                     string strOutputPDFFile1,
                     string strOutputPDFFile2)

 

Parameter
strSourcePDF - the path of source PDF file.
iStartFromPageNo - the page where the source PDF file will be split. The first page is zero.
strOutputPDFFile1 - the new PDF File 1 generated after the split.
strOutputPDFFile2 - the new PDF File 2 generated after the split.

Namespace: Viscomsoft.PDFViewer

Return  true - successful, otherwise return false -failed.


Example

   

[C# Syntax] 
using Viscomsoft.PDFViewer;

public partial class Form1 : Form
{

  public PDFView _pdfViewer;
  _pdfViewer = new PDFView();
  _pdfViewer.Canvas.Parent = this;
  _pdfViewer.Canvas.Location = new Point(0, 24);

  private void Form1_Load(object sender, EventArgs e)
  {
      _pdfViewer.SplitPDF("c:\\yourpdf.pdf",2,"c:\\newpdf1.pdf","c:\\newpdf2.pdf");
   
  }
 

 
}


 

   

[Visual Basic Syntax] 
Imports Viscomsoft.PDFViewer

Public Class Form1
 

Private Sub resizeCanvas()

  _pdfviewer.Canvas.Size = New Size(Me.ClientSize.Width, Me.ClientSize.Height - 24)

End Sub

Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load

  _pdfviewer.Canvas.Parent = Me

  _pdfviewer.Canvas.Location = New Point(0, 24)

  _pdfviewer.SplitPDF "c:\yourpdf.pdf",2, "c:\newpdf1.pdf","c:\newpdf2.pdf"

 
End Sub


End Class