|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Commands Reference > NeutralFormat > MDMerge |
It merges multiple PDF files into a single multi-page PDF.
call DBWShell("MDMerge inputPDForTXT [,pageOptions] outputPDF appendFlag [bookmarkCode]")
inputPDForTXT |
The PDF to be merged into the outputPDF |
|||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pageOptions |
Optional. A string specifying the page range to be outputted into the merged PDF file – the syntax is explained with samples in the following table:
|
|||||||||||||||||||||
outputPDF |
The resulting merged PDF file |
|||||||||||||||||||||
appendFlag |
0: create new |
|||||||||||||||||||||
bookmarkCode |
Optional.
|
sub main
DBWInit(TRUE)
DBWShell("MDMerge C:\PdfInput1.PDF,1 C:\PdfMerge.PDF 0")
DBWShell("MDMerge C:\PdfInput2.PDF C:\PdfMerge.PDF 1")
end sub
Bulkmerge.txt:
E:\test\PDF\0000434_00.SLDDRW.3.PDF*1
E:\test\PDF\0061002354.SLDDRW.00.PDF*2
E:\test\PDF\01825-0806-0003-S01.SLDDRW.1.PDF
empty line
The script will be written as follows:
sub main
DBWInit(TRUE)
DBWShell("MDMerge C:\bulkmerge.txt C:\PdfMerge.PDF 0")
end sub
It is possible to merge hundreds of PDF files into one PDF file easily with this method.
Bookmark.txt:
Bookmark->0000434_00.SLDDRW
E:\test\PDF\0000434_00.SLDDRW.3.PDF
Bookmark->0061002354.SLDDRW
E:\test\PDF\0061002354.SLDDRW.00.PDF
Bookmark->01825-0806-0003-S01.SLDDRW
E:\test\PDF\01825-0806-0003-S01.SLDDRW.1.PDF
empty line
The script will be written as follows:
sub main
DBWInit(TRUE)
DBWShell("MDMerge C:\Bookmark.txt C:\PdfMerge.PDF 0 4")
end sub
Bookmark.txt:
E:\test\PDF\0000434_00.SLDDRW.3.PDF
E:\test\PDF\0061002354.SLDDRW.00.PDF
E:\test\PDF\01825-0806-0003-S01.SLDDRW.1.PDF
empty line
The script will be written as follows:
sub main
DBWInit(TRUE)
DBWShell("MDMerge C:\Bookmark.txt C:\PdfMerge.PDF 0 1")
end sub