Can I write code for splitting PDF with results from a VB.NET application?
Question
Solution
And here is the code for you to get split result from VB.NET:
Dim PSCmd As String = "c:\PSCMD\PSCMD.exe"
Dim PSCmdArgs As String = "-B """ & g_TempFolder & "SplitOutput\"" {basename}_{part:0000}_{bookmark} -HN"
Dim p As New System.Diagnostics.ProcessStartInfo
Dim MyProcess As System.Diagnostics.Process = Nothing
p.FileName = PSCmd
p.Arguments = """" & g_TempFolder & FileName & """ " & PSCmdArgs
p.WindowStyle = ProcessWindowStyle.Hidden
MyProcess = System.Diagnostics.Process.Start(p)
MyProcess.WaitForExit()
'Check the ExitCode - 0 means success
If MyProcess.ExitCode <> 0 Then
Throw New Exception("PSCMD returned code: " & MyProcess.ExitCode & " during PDF Split")
End If
You can view the whole usage about A-PDF Split Command Line in this webpage.
Related products
- A-PDF Merger - Combine two or more image files or Acrobat PDF files into a single PDF document
- A-PDF Content Splitter - Split PDF files based on content
- A-PDF Merger Command Line - A command line tool to combine image and PDF files into one PDF.
- A-PDF Split Command Line - A command line tool to split PDF file into separate pdf files.
We always like improving our products based on your suggestions. Please send your feedback (or ask questions) to us in the contact page.