INDEX   SEARCH   <--BACK

How to call Batch Document Converter Pro from a VB program

KB ARTICLE: KB0004
KB DATE: 16/01/2004 revised 12/06/2014
REQUIRES VERSION: 1.18 or above

You can call Batch Document Converter Pro on the command line so in VB you can call from Shell function, e.g.

from dos the command line is "Batch Document Converter.exe" c:\1.pdf -p -q
 

because the parameters are passed in the same parameter as the main exe it's recommended to rename the "Batch Document Converter.exe" to "bdcp.exe", e.g.

cd C:\Program Files\Traction Software\Batch Document Converter Pro
Rename "Batch Document Converter.exe" to bdcp.exe


To call BDCP in your VB program, e.g.
Shell("bdcp.exe c:\1.pdf -p -q", vbHide)

NOTE: For Batch Document Converter Pro to pick up the .ini configuration files the working directory has to be set to the location of "Batch Document Converter.exe", otherwise it will create new ones based on the internal default values.  from v5 onwards use -i parameter e.g.  Shell("bdcp.exe -i""C:\Program Files (x86)\Traction Software\Batch Document Converter Pro"" c:\1.pdf -p -q", vbHide)   then the working directory doesn't need to be set.

For silent converting use: -s -S switches. e.g.
Shell("bdcp.exe -s -S c:\1.pdf -p -q", vbHide)

For converting to a certain converter use: -P switch to change converters. e.g.
Shell("bdcp.exe -s -S -P""HP 4000 PCL"" c:\1.pdf -p -q", vbHide)

For setting number of copies on the converter use -C switch e.g. (2 copies)   to repeat copies without setting the converter setting use -c switch instead.
Shell("bdcp.exe -s -S -P""HP 4000 PCL"" -C2 c:\1.pdf -p -q", vbHide)

For setting thr converter tray use -T switch e.g. -T"Tray 1"   alternatively use a csf file (converter settings file) for any converter setting - see help for more information.
Shell("bdcp.exe -i""C:\Program Files (x86)\Traction Software\Batch Document Converter Pro"" -s -S -P""HP 4000 PCL"" -C2 -t""Tray 1"" c:\1.pdf -p -q", vbHide)