MDSplit

<< Click to Display Table of Contents >>

Navigation:  Programming Mechworks PDM > DBWCommandShell > Commands Reference > NeutralFormat >

MDSplit

Description

It splits a multiple sheets PDF file into many single page PDFs.

Syntax

call DBWShell("MDSplit inputPDF outputFolder outputBasePDFname")

Parameters

inputPDF

The full path name of the PDF to split

outputFolder

the output folder for the created PDFs

outputBasePDFname

the base filename of the splitted PDF files

Remarks

The command creates files with names like <outputBasePDFname>-XXX.PDF, where XXX is a number from 000 to NNN

The command MDGetPageCount can be used for understanding if a PDF is a multi-page PDF or not.

Example

Sub main()

  DBWInit(TRUE)
  DBWShell("MDSplit E:\MyArchive\MyMultiPageFile.pdf C:\temp myOutputFileTest")
End Sub

Results

if the input MyMultiPageFile.pdf file is a 3 pages PDF:

C:\temp\myOutputFileTest-001.pdf
C:\temp\myOutputFileTest-002.pdf
C:\temp\myOutputFileTest-003.pdf