| Carrier Grade Conversion Engine Description | ||
| ...Back to Downloads | ||
| This utility demonstrates the use of the ImageMaker print driver to convert from any 'printable' file format to a Fax Image format, with built in support for handling multiple conversions across multiple machines. | ||
| The Carrier grade conversion application (printdoc.zip) supports the following: | ||
| 1) | Conversion of all printable document types to TIFF, JPEG, or TXT under program control | |
| 2) | Support for multi-threaded conversion (if this is a requirement). | |
| 3) | Support for multi-machine conversion (if this is a requirement). | |
| 4) | Can be installed as as service (see below). | |
| 5) | A choice of COM, DLL, and EXE integration interfaces (odcCom.dll, printdoc.dll or Pdfilcnv.EXE - source samples provided). | |
| 6) | a MultiBatch application that can demonstrate the automated conversion of thousands of documents across multiple machines. | |
| The primary interface to the Carrier Grade Document Conversion Engine is the odcCOM.DLL COM object. The COM object can be called from user context, or from a server (or system context). The COM object communicates with the local ODCdaemon.exe application, or the 'remote' ODCdaemon.exe application if the SHARE setting is set. | ||
| To support conversions of documents under control of a Web Server, we provide a COM object (OCXCom.dll), and a ODCdaemon.exe application that runs in user space, and communicates with the controlling application running in the web space. | ||
| Installation instructions: | ||
| 1) | Unzip files onto a Win2000 or NT4.0 machine. | |
| 2) | Run SETUP.EXE | |
| 3) | Switch to the install directory default is: "C:\ImgMaker\Conersion_Toolkit" | |
| 4) | Run cpCom.exe to try converting single files. | |
| 5) | To test conversion of multiple files, run convert.bat from the DOS prompt with the following command line: 'convert guide.doc' | |
| 6) | Review the contents of products.doc.tif in the output directory. | |
| 7) | Convert any additional files by using PDFILCNV.EXE (For additional command line parameters, see CONVERT.BAT) | |
| WEB SERVER DOCUMENT CONVERSION: | ||
| The Document Conversion engine uses the native document application to do the rendering. For example, to render a DOC file, the conversion engine needs to launch WORD. Then, under program control, the application is directed to create a print stream that is then rendered to a TIFF file. | ||
| Using this method, we can support rendering any file format type that has an owner application that supports the 'print' or 'printto' system command. | ||
| To confirm support for any document, from the Windows Explorer, right click on the document, then look for, and select 'print'. The document should be printed to the default print driver. Applications that support 'print' also support 'PrintTo', where the output can be directed to a specified printer for procesing. | ||
| Document Conversion to 24 bit Jpeg, 24 bit TIFF and 24 bit BMP is also supported. (but requires a different driver). We also support multiple simultaneous file conversions on the same machine. In both cases, contact us for more details. | ||
| SETUP and TESTING: | ||
| List of files provided: | ||
| readme.txt | - this file | |
| convert.bat | - sample conversion batch file for PdFilcnv.exe | |
| PDDLG.EXE | - Control Dialog | |
| img32mfx.dll | - communication dll | |
| ODCdaemon.EXE | - Windows Daemon process (for server rendering) | |
| PDFILCNV.EXE | - DOS File Conversion Utility (single file) | |
| PRINTDOC.DLL | - Server Conversion DLL | |
| cpCom.exe | - Windows C++ application that calls the COM object. | |
| odcCom.dll | - Com object. | |
| products.doc | - simple overview document | |
| guide.doc | - detailed product spec | |
| cpSample.zip | - sample C++ code for CpCom.EXE | |
| vbSample.zip | - sample VB code for VbCom.exe | |
| csServ.zip | - sample C++ code for .NET implementation | |
| Pdfilcnv.zip | - sample C code for PdFilCnv.EXE | |
| MultiBatch.exe | - Application to manage the conversion of thousands of files | |
| MultiBatch.txt | - sample TXT file with 4 files to convert. | |
| The Document Conversion software controls file conversion to TIFF by first launching the file owner application (e.g. Word, Excel, Netscape), then instructing the owner application to print the document using Windows shell commands. | ||
| Our experience is that no one utility can convert all file formats. However, most applications have a mechanism used by the Windows shell to support file printing. | ||
| The CpCom.EXE application is a Windows based application that converts files through the COM ojbect. It assumes that the ODCdaemon.exe application is running. Sample code to the CpCom.EXE application is provided in the CpSample.zip file. | ||
| The PDFILCNV.EXE application is a console application that is launched with a command line. The command line includes the name of the source file (among other things). The PDFILCNV.EXE application terminates with a 'number of pages' printed return code, or a negative value if there was a timeout. This way, even if a document conversion does fail (due to some required user intervention), other conversions can still take place. In addition, a second Windows Daemon application (ODCdaemon.EXE) is provided to support file conversions from a Service application (such as a CGI script running on an web based server). | ||
| We have tested this conversion process with many document types, including Word, Adobe, HTML. To ensure best results on NT 4.0 set the default document type for .TXT to be WordPad (rather than notepad). | ||
| For a complete list of known application settings, see appendix below. | ||
| Throughput (speed): | ||
| On a single machine (PII 500MHz) a 5 page Word document converts in 5.2 seconds, an 11 page Word documents converts in 6.6 seconds. System resources are maxed out, and there is no advantage to trying to do multiple simultaneous conversions. | ||
| If WORD is left up (and doesn't have to re-load itself each time), the time to print is reduced by about 20%. To get conversion down to 1 second per document can be accomplished by adding additional 'slave' computers. (ie do 5 simultaneous conversions, each on a different slave). | ||
|
To increase throughput:
- set the dithering to Windows Fast Dither. - pre-load the core applications (like Word, Acrobat). These should be running, not minimized, but make the display window as small as possible (reduces painting time). - scalability can be supplied by adding additional computing power. We can provide you with the instructions to control conversion remotely across multiple machines. |
||
|
Testing the COM object using CpCom.exe on a Single Machine (Windows 2000 / NT4 Only): |
||
|
Run CpCom.exe (which in turn launches ODCdaemon.exe).
Make sure the following fieldsare set: |
||
| Server Name: | Leave this blank. To convert using another server, see below. | |
| Printer Name: | Normally set to 'ImageMAKER DocCnvrt Driver' | |
| Output Directory: | Normally set to c:\imgmaker\conversion_toolkit | |
| Output File Type: | Normally set to TIFF Group 3 Rerversed. | |
| Printer Type: | Normally B&W. Can switch between B&W, and Color. Changes the printer name and output file type automatically. Need to download and install the 'PrintClr.zip' file to use the Color driver. | |
| Additional Print settings: | ||
| Orientation. | Only takes effect if the print application doesn't define it. | |
| Resolution | Only takes effect if the driver supports the other resolutions. | |
| Dither Mode | Sets the prefered dither mode | |
| Page Type | Sets the prefered page size | |
| File to Convert: | Name of source file to convert. Must specify the full path. | |
| Next, test and re-compile the C++ sample code, of VB code, and confirm that you can communicate with the COM object, and can control the conversion. | ||
| Next, use the COM object in your environment, and if there are any problems, use the CpCom test application to track down the problem. The main things to look for are: | ||
| - that ODCdaemon.exe is running | ||
| - that the input and output filenames are fully specified | ||
| The COM object can be called from multiple instances. The jobs are queued and processed by ODCdaemon sequentially. If the job times out waiting in the queue to be converted, then the COM object will return an error code: -15. | ||
| Error Return Codes: (similar to the pdFilCnv list below) | ||
|
number of pages printed
else: 0 Daemon timed out (global daemon setting) -1 problem parsing command line -2 timeout connecting to Daemon -3 Keyboard hit -4 Output File name likely invalid (or is an existing directory) -5 Daemon not running -6 Daemon not running -7 internal error -8 internal error -9 internal error -10 internal error -11 Timeout on job start (global daemon setting) -12 Timeout on first page (global daemon setting) -13 Timeout on subsequent page (global daemon setting) -14 Maximum pages exceeded (global daemon setting) -15 PdFilCnv timed out (/o setting) -16 Timed out waiting for PrintQueue to empty -17 ODCDaemon is busy - timed out waiting to process job |
||
| For a complete list of COM methods and properties, see "COM Object Usage" below, or refer to ODCcom.txt in the same source directory. | ||
| To set/review any of the static settings used by the COM object, see the registry values in: HKCU\Software\ImageMaker\ODCCom\. If no values are set in HKCU, then the Com Object looks to HKLM\Software\ImageMaker\ODCCom for its values. | ||
| There are a couple of additional values in the registry not set by the | ||
| CpCom interface, but which have an effect on printing: | ||
| MultiplePagesPerFile - if 0, then we output single paged tiff files. | ||
| ConnectRetries - number of attempts to connect to pipe. | ||
|
PrintJobTimeout - number of seconds to try and get ODCdaemon connection
before timing out (should be a large value). |
||
| Testing the COM object using CpCom.exe across Multiple Machines: | ||
| The COM object is designed to support document conversion across multiple machines. | ||
| To model handling conversions across multiple machines under program control, first confirm that the CpCom.exe application (ODC Server (COM) Sample) is installed and works on a single machine. Then, install the same software on the second machine, and confirm that it too works. | ||
| Next, on the first machine, modify the input and outpt directories to specify the | ||
| UNC names of a known file server. ie: | ||
| output Directory: \\cyan\c-root\imgmaker, specify an input file from a known server | ||
| file to convert: \\cyan\c-root\imgaker\conversion_toolkit\products.doc | ||
| Test this once again to confirm that it works. | ||
| Finally, in the 'Server' field, enter the name of the second machine. ie: if the machine name is 'RED', then enter 'red' in the field. This time when you do a test conversion, RED will do the converting. | ||
| If the above scenario works, next try the same field values in your code when calling the COM object. | ||
| NOTE: If calling the COM object from an ASP page, the context is usually very limited, and pipe names cannot connect across machines. The ASP script normally runs in its own security environment (login context). Accordingly, it does not have permission to communicate across machines via pipe connections. To get around this, the ASP script can still indicate a 'server' to do the conversions, but the call goes up through the local daemon (running in a proper user context), and is then relayed across to the actual server. | ||
| Should this end up being a problem in your environment, and permissions are not allowed connecting to a pipe from the system or IIS context, then we have a work-around. The work-around requires that you run ODCdaemon on your local machine in user context (or as a User Service - see installing ODCdaemon as a service below). In this case, the COM object can connect to a local pipe (on the same machine), and the ODCdaemon application can then relay that pipe call across the network. To enable this feature, you must set the following in the COM object: 'useRedirectionServer = TRUE' | ||
| Also: If you want to use our custom application, we've built a 'MultiBatch' application to demonstrate the conversion process, which can be used to 'load lists', and to manage load balancing of conversions across multiple machines. (Demo available on request). | ||
|
Testing With Pdfilcnv.exe and/or printdoc.dll On A Single Machine (Windows 2000 / NT4 Only): |
||
| 1) | From your start menu run the Windows Document Conversion Daemon. | |
| 2) | Start a command-line prompt. | |
| 3) | Change to the directory in which you installed the ImageMaker Document Conversion Toolkit. | |
| 4) |
Type the command:
ODCdaemon PDFILCNV GUIDE.DOC -FGUIDE.TIF -D This will start the document conversion process. |
|
| 5) | From your start menu run the ImageMaker fax viewer program to view the output file GUIDE.TIF | |
| 6) | For more examples, see the sample batch file 'convert.bat'. | |
|
Testing With ODCdaemon and multiple printers On A Single Machine (Windows 2000 / NT4 Only): |
||
| Using the conversion server, it's possible to convert more than one document at a time. This requires first installing additional printers, then following the instructions provided below: | ||
| Note: Microsoft Office Products only support a single thread per application. ie: can't convert two Word docs at the same time. You can convert an Excel and a Word doc at the same time, or multiple PDF's and/or TXT files. | ||
| To do the conversion, from the installation directory, run 'MULTITST.BAT'. | ||
| Requirements: | ||
| - that 3 printers have been installed PrintDoc1, PrintDoc2, PrintDoc3 | ||
|
- that 3 ODCdaemon registry settings are defined in
[HKEY_CURRENT_USER\Software\imagemaker\ODCdaemon\Settings-daemon1] [HKEY_CURRENT_USER\Software\imagemaker\ODCdaemon\Settings-daemon2] [HKEY_CURRENT_USER\Software\imagemaker\ODCdaemon\Settings-daemon3] |
||
|
To manually set the registry:
ODCdaemon -idaemon1 (set to: PrintDoc1, PrintDocPipe1) ODCdaemon -idaemon2 (set to: PrintDoc2, PrintDocPipe2) ODCdaemon -idaemon3 (set to: PrintDoc3, PrintDocPipe3) and manually configure printer name to: printDoc1, pipename to: PrintDocPipe1 etc. |
||
| Parameters: | ||
| 1) | name of first file to convert | |
| 2) | name of second file (optional) | |
| 3) | name of third file (optional) | |
| 4) | START (forces concurrency). (optional) | |
|
To convert one file:
multitst sample.doc |
||
|
To convert two files:
multitst sample.doc readme.txt |
||
|
To convert three files:
multitst sample.doc readme.txt acrobat.pdf |
||
|
To convert three files simultaneously:
multitst sample.doc readme.txt acrobat.pdf START |
||
|
Note: For Microsoft products (Word, Excel, etc) you cannot simultaneously
convert two
or more of the same file types. |
||
| Testing With ODCdaemon across two or more machines (Windows 2000 / NT4 Only): | ||
| The following sample assumes you've installed the Document Conversion Toolkit at | ||
| \\MachineB\c-drive\imgmaker\printdoc - Server\Share\dir name | ||
| and that the default daemon pipe name is \\.\pipe\PrintDocDaemonPipe | ||
| Once that is straightened away, try the following: | ||
| To test locally: | ||
| On machine B: (conversion machine) try the following: | ||
|
pdfilcnv guide.doc -d
pdfilcnv guide.doc -d:\\.\pipe\PrintDocDaemonPipe |
||
| This confirms that the deamon pipe is 'PrintDocDaemonPipe' | ||
| To test across the network: | ||
|
On machine A: (web server)
copy over the following files from machine B to c:\imgmaker\printdoc pdfilcnv.exe printdoc.dll guide.doc |
||
|
Then, from machine A, try the following:
pdfilcnv guide.doc -d:\\MachineB\pipe\PrintDocDaemonPipe pdfilcnv \\MachineB\c-root\imgmaker\printdoc\guide.doc -d:\\MachineB\pipe\PrintDocDaemonPipe |
||
|
Note:
1) both pdfilcnv.exe and ODCdaemon.exe are checking the same file. 2) Because of NT security, the output file must be written to a drive local to the deamon (we have a fix for this, but just trying to move things forward). |
||
| To Test a different pipe name: | ||
|
On machine B:,
in the daemon,
change the pipe name to JBpipe. Stop, then restart the ODCdaemon.exe. Then, on machine A:, try: pdfilcnv \\MachineB\c-root\imgmaker\printdoc\guide.doc -d:\\MachineB\pipe\JBpipe |
||
| To Test the registry settings: | ||
|
To test the Registry settings, on machine B:,
modify ODCdaemon so that the 'web server' is A. (no back slashes required). Then, stop, and re-start the ODCdaemon application. Then using the registry editor on A, look at: HKLM\\Software\\ImageMaker\\PrintDoc\\PipeNames it should contain the Binary value: \\MachineA\pipe\JBpipe On Machine A (web server), try the following: pdfilcnv \\MachineB\c-root\imgmaker\printdoc\guide.doc -dR |
||
| Running ODCdaemon as a service (silent conversion): | ||
|
All applications can be launched silently from a service context (Win2K), and everything
seems to work as expected - but only on Windows 2000 (or later).
To set this up... Using the Windows NT Resource Kit programs InstSrv.exe and SrvAny.exe: |
||
| 1) |
Install the Service (by name):
c:\resKit\instsrv.exe "Document Conversion" c:\resKit\SrvAny.exe |
|
| 2) |
run Regedit and open HKLM\System\CurrentControlSet\Services\Document Conversion
Create the 'Parameters' key, and add: name: Application data type: REG_SZ string: c:\imgmaker\printdoc\ODCdaemon.exe |
|
| 3) | From the Services control panel, edit the 'Document Conversion' service, and set the access priveleges to a 'logged in user'. | |
| 4) | Start the service. | |
| To test, try the following: | ||
|
pdfilcnv c:\imgmaker\conversion_toolkit\products.doc
pdfilcnv c:\imgmaker\conversion_toolkit\products.doc -d -l |
||
| The first command ling does the conversion without using ODCdaemon.exe The second command line runs the conversion silently through the service. | ||
| To test and debug ODCdaemon problems, you can always stop the service, (and stop ODCdaemon.exe), then run ODCdaemon as a normal application. | ||
| More information on setting up an application as a service can be found in the Windows Knowledge Base article: Q137890 | ||
| Running MultiBatch.exe | ||
| MultiBatch.exe is installed in the ImageMAKER Conversion_Toolkit program group as 'Batch Conversion'. The purpose of MultiBatch is to control the conversion of thousands of documents across multiple conversion machines. | ||
| To test conversion of thousands of documents, try the following: | ||
| 1) | Create a TXT file that points to the files. If the source files are HTML web sites, then list the filename as 'http://www.cnn.com'. If you are going to do the conversions across multiple machines, then the filenames need to be specified by their UNC names. ie: instead of specifying the file as 'c:\imgmaker\products.doc', you would specify it by its Computer and Share Name: '\\computer\c-root\imgmaker\products.doc'. | |
| 2) | Run MultiBatch.exe (from the Start / Programs / ImageMAKER Conversion_Toolkit menu). | |
| 3) | Load the TXT file. You can try loading the sample file 'MultiBatch.txt' currently in the installation directory, then click on the Start button. | |
| 4) | To simultaneously convert documents using multiple machines, install the Carrier conversion on additional machines, and when running ODCDaemon, specify the 'registry server' (from the Configure/Options dialog) to be the machine running MultiBatch. | |
| 5) | On completion of conversion, you can view the log, or the results (thumbnail). | |
| 6) |
MultiBatch supports the following options:
output directory: Change this to a UNC directory name if converting across multiple machines output File Type: Currently TIFF, DCX, PCX. An upgrade is available to support Color output, and PDF file output. multiple pages per file: default is ON prefix output file names with job name: default is OFF mirror input directory structure: default is OFF overwrite log files: default is OFF logfile directory: current default is Multibatch temp directory: currently the default output directory. |
|
| 7) | To automate conversion of lists of files, select the 'enable job autoload'. This loads in TXT files from the specified default directory, processes them, and then renames the TXT file to .DONE. This way, the conversion server can process lists as they are written to the source directory, and indicate that conversion is done by changing the .TXT extension to .TXT.DONE when completed. | |
| Testing for COLOR output (NT platforms only) | ||
| 1) | Make sure you've installed the color upgrade to printdoc.zip (clr_doc.zip). | |
| 2) | The color print driver upgrade is capable of printing B&W OR COLOR. To set the active state, from the printer properties menu, select 'Device Settings' / 'Printer Operation' / 'Printer Output'. You can switch between 24-bit color, and Monochrome. (The default is 24-bit color) | |
| 3) |
From the install directory, run a test of pdfilcnv.exe to create a color output file.
pdfilcnv source.doc -foutput.jpg -t202 The output filetypes are: 200 - Color TIFF (RLE) 201 - 24 bit BMP 202 - 24 bit JPEG |
|
| 4) |
Now try it again with the ODCdaemon running (using the -d switch to turn on the daemon):
ODCdaemon pdfilcnv source.doc -foutput.jpg -t202 -d |
|
| 5) |
If there are any problems at all, you can use two additional switches:
-r - forces the control dialog application to launch -l - forces a log file to be written in the system drive (normally C:\log\*.log). |
|
| Support for conversion to PDF: | ||
| Using the exact same architecture (but different driver), we can also provide you with a DOC->PDF type conversion product. (as an upgrade). | ||
| 1) | Application prints to a supported Postscript printer through the Printdoc EXE interface. | |
| 2) | We capture the output programatically to a .ps file | |
| 3) | Your app launches Adobe Distiller on completion of conversion to postscript. | |
| Auto Kill Feature: | ||
| To automatically check for, and abort applications that have launched, but do not print (and therefore appear to hang), you need to do the following: | ||
| 1) | Select the 'Service/Configure' option | |
| 2) | Select either 'Auto Close Dialogs', and 'Auto Kill Apps' | |
| 3) | Select 'Add', then drag the 'magnifier icon' over the window or 'OK button' within the window to close. | |
| 4) | Release the mouse button, and the daemon will automatically send a message to close (indicating that it has learned). | |
| The next time there is a timeout, the daemon looks for the listed window classes, and either closes the window, or kills the application. | ||
| Note: This feature can be turned off at any time by de-selecting the toggle box. Also, the feature does not work unless applications are specifically listed in the display box. | ||
| COM Object usage: (see ODCcom.txt for more complete info). | ||
| Using the Odccom COM object in an ASP script: | ||
|
dll name: odcCOM.dll
Object name: ODCSRV Library string: ODCCOM 1.0 Type Library Object Browser name: ODCCOMLib |
||
| Properties: | ||
| To get and set default values: | ||
|
obj.printerName obj.outputDirectory obj.outputFileName obj.outputFileType obj.printerType obj.connectRetries obj.logEnabled obj.printJobTimeout obj.serverName obj.installPath obj.Jobid obj.multiplePagesPerFile obj.retCode |
- get/set default printer - get/set default output directory - get/set default output filename - 0:Group 3 TIFF 6:Group 4 TIFF - B&W or Color driver - not used. - if TRUE, write log files to \log directory - recomment 600 seconds (10 minute maximum) - "" or remote server name (see notes below) - source directory of dll - not used - default is TRUE - read only: return value from ConvertDocument |
|
|
Defaults values for all these properties are stored in
HKLM\Software\ImageMAKER\odcCom Defaults can be set if calling from an Administrator account. |
||
|
Setting the Server Name: Use name of computer that is going to do
the conversion, and make sure source and destination filenames are UNC.
ie: input file name: \\serverName\share\imgmaker\sample.doc outputFile name: \\serverName\share\imgmaker\sample.tif server: serverName For more details regarding setting this up, see additional notes in the readme.txt file, under: Testing With ODCdaemon across two or more machines (Windows 2000 / NT4 Only): |
||
| Methods: | ||
| To Start the conversion process: | ||
|
obj.StartServerProcess
- starts ODCdaemon.exe
obj.ConvertDocument inputFileName, "" - input name, output name |
||
| NOTE: If Output Name is provided in the parameter call to ConvertDocument, then that value is parsed into 'OutputFileName' and 'OutputDirectory' environment values. BUG: This feature currently not working. Must set output filename by setting 'outputDirectory' and 'outputFileName' properties, and using "" as the second parameter in the call to ConvertDocument. | ||
| If calling StartServerProcess from a service, ODCdaemon will not start. ODCdaemon must be started manually, or as a separate service. See notes in readme.txt, under 'Running ODCdaemon as a service (silent conversion)'. | ||
| PDFilcnv.exe Command-line Parameters | ||
| Suggested command line parmaeters: | ||
| PDFILCNV GUIDE.DOC -FGUIDE.TIF -d | ||
|
Command line parameters for each application (use the /? switch to get this)
are listed below.
PDFILCNV Conversion Utility - Copyright (c) Spittin Image Software. Converts document files from other formats to .tif fax images. |
||
|
Syntax: PDFILCNV <docname.ext> [options]
Where: |
||
| <docname.ext> | Document filename [required] | |
| /fs | s is output filename. | |
| /p<printer > | specify the name of the printer to print to. If name has spaces, enclose in quotes. | |
| /l | Log debugging info to file: \LOG\PDFILCNV.LOG | |
| /tn | Output file type 0: TIFF Class F | |
| /mn |
Page format
n=0 specifies single page per output file n=1 multiple pages per file |
|
| /d[:server] |
Use Daemon to do conversion,
If server name specified use the Conversion Daemon on server. /d:\\.\pipe\pipename - local machine/custom name /d:\\server\pipe\pipename - server / custom name /d:server - server default name |
|
| /dR[:regkey] |
If 'r' specified look to local registry for available
Conversion Daemon.
If r:regkey specified look to registry for available Conversion Daemon. |
|
| /on | n [optional] specifies timeout in seconds. Will wait n seconds for the print job to complete. | |
| /q | Produce no output (quiet) | |
| /r | Force Control Dialog to display (for debugging) | |
| /? | This help screen | |
| Output File Types: | ||
| PS_TIF_GAMA | 0 // reverse G3 | |
| PS_TIF_NORMAL | 1 // normal G3 | |
| PS_DCX | 2 | |
| PS_PCX | 3 | |
| PS_MR_REVERSE | 4 // Group 3 2D Modified Read (reverse) | |
| PS_MR_NORMAL | 5 // Group 3 2D Modified Read (normal) | |
| PS_MMR_REVERSE | 6 // Group 4 (G4) Modified Mofified Read (reverse) | |
| PS_MMR_NORMAL | 7 // Group 4 (G4) Modified Modified Read (normal) | |
| PS_PACKBITS | 8 // Normal Tif Packbits | |
| PS_CUSTOM_MH | 9 // custom MH file format (Winfax) | |
| PS_BMP | 10 // BMP output | |
| PS_TIF24_PACKBITS | 200 // 24Bit colour TIF (packbits compression) | |
| PS_BMP24 | 201 // 24Bit colour BMP | |
| PS_JPEG24 | 202 // 24Bit colour JPEG | |
| Returns | ||
|
number of pages printed
else: -1 problem parsing command line -2 timeout connecting to Daemon -3 Keyboard hit -4 Output File name likely invalid (or is an existing directory) -5 Daemon not running -6 Daemon not running 0 Daemon timed out (global daemon setting) -11 Timeout on job start (global daemon setting) -12 Timeout on first page (global daemon setting) -13 Timeout on subsequent page (global daemon setting) -14 Maximum pages exceeded (global daemon setting) -15 PdFilCnv timed out (/o setting) -16 Timed out waiting for PrintQueue to empty |
||
| To Test NOT creating the TIFF file: (this passes in the value -1 (0xFFFFFFFF)) | ||
|
pdfilcnv guide.doc /t4294967295
(It doesn't seem to be any faster). |
||
| Debugging Hints | ||
| If you encounter problems, here is a quick checklist of things to look for: | ||
| 1) |
Is the 'PrintTo' file association set?
To confirm, From the start button, select Settings / Printers to open up the list of available printers. Then use Windows Explorer to open a list of available files. Then, 'drag' a .html file from the Windows Explorer application over top of a printer icon. The owner application should launch, and the output should print. |
|
| 2) |
Does the 'Print' association work.
From Windows Explorer, right click on the .html file, and select 'Print'. If 'Print' works (to the default printer), but 'PrintTo' doesn't, then go to the file association definition for 'Print', and create a new command for 'PrintTo'. Then copy the exact same command into the 'PrintTo' definition, and set the appropriate ImageMAKER driver to the default driver. |
|
| 3) |
Is there an application associated with the file type?
From Windows Explorer, double-click on the file icon to get the associated owner application to launch. If no application lanches, proceed to Step 4. If the application launches, can you print from the app? If so, then there should be a way to set file associations to support 'Print' or 'PrintTo'. |
|
| 4) |
If no file association, and you can't open, print, or PrintTo a file, then determine what the owner application is, open that file, and confirm that you can print. Then, look for information on setting file associations, or set up one yourself. Most applications support the following command line options:
Print: "C:\Program Files\Windows NT\Accessories\WORDPAD.EXE" /p "%1" PrintTo: "C:\Program Files\Windows NT\Accessories\WORDPAD.EXE" /pt "%1" "%2" "%3" "%4" |
|
| 5) |
Have you added your application to the ODCdaemon KILL list.
If there is a problem during conversion, the ODCdaemon can be trained to close the application. To complete the training, from the ODCdaemon interface, select 'Service' / 'Configure', and in the AutoKill Apps section, select ADD. We've set up the common file types, but you most likely need to add your own applications. To do so, open the app (for instance, Microsoft PhotoDraw), then from the ADD dialog, select the magnifying glass, drag it over the parent window for your app, release the button, then select OK on the AutoKill 'Find Window' dialog. |
|
| To enable status logging: | ||
| To turn logging on, run PDFILCNV with the /l switch. Log files are written to the following files: | ||
|
\log\printdoc.log - status from PRINTDOC.DLL
\log\dialog.log - status from the Control Dialog PDDLG.EXE \log\pdfilcnv.log - status from PDFILCNV.EXE \log\pddircnv.log - status from PDDIRCNV.EXE \log\ODCdaemon.log - status from Windows Document Conversion Daemon |
||
| If printing fails: | ||
| Two possible failure modes can occur: | ||
| 1) |
The printing application stops before printing and is looking
for user intervention
(macro, etc) - Not a problem, as the print operation is not affected. All that will happen is the printing application doesn't return, and PDFILCNV times out. |
|
| 2) |
The printing application hangs, or does not complete.
- Two likely causes are the printing process is taking way longer than than the allocated timeout (you need to adjust the time-out), or the print process has stopped (likely caused by a Control Dialog problem). All following print jobs will be queued, and nothing will print. Remedy is to delete the jobs, stop, then re-start the print spooler. |
|
| The key to the conversion process is to process only one JOB at a time. If more than one job is queued, then pdfilcnv.exe will continue to time out, and nothing will be printed. | ||
| Uninstalling to create a CLEAN MACHINE: | ||
| Every so often we encounter a problem so bizarre that it can only be corrected by removing, and re-installing the driver. Here then is a complete list of what you have to do to get a clean machine: | ||
|
From the printers panel, remove the printer (assuming one exists)
Run 'regedit', and remove the following key entries: HKEY_LOCAL_MACHINE/System/CurrentControlSet/Control/Print/ Monitors/Fax Monitor Port HKEY_LOCAL_MACHINE/System/CurrentControlSet/Control/Print/ Monitors/FaxBatch Monitor Port HKEY_LOCAL_MACHINE/System/CurrentControlSet/Control/Print/ Environments/windows NT x86/Drivers/Version-3/ ImageMaker Fax Print Driver HKEY_LOCAL_MACHINE/System/CurrentControlSet/Control/Print/ Environments/windows NT x86/Drivers/Version-3/ ImageMaker FaxBatch Driver HKEY_LOCAL_MACHINE/Software/Microsoft/Windows NT/CurrentVersion/ Print/Printers/<printername> where <printername> is the name of each ImageMaker printer on the system in turn Go to the ControlPanel / Services application, and stop the spooler Delete the following files: \winNT\system32\imgfx5mn.dll \winNT\system32\imgfx5mu.dll \winNT\system32\spool\drivers\w32x86\imgfx5dr.dll \winNT\system32\spool\drivers\w32x86\imgfx5ui.dll Move (DO NOT COPY) the following files to a temp directory: \windows\system32\spool\drivers\w32x86\3\imgfx5dr.dll \windows\system32\spool\drivers\w32x86\3\imgfx5ui.dll Re-boot the machine Delete the following files from the temp directory: imgfx5dr.dll imgfx5ui.dll Try re-installing the driver(s). |
||
| Questions and Answers: | ||
| Question: | ||
| I have a question about the timeout parameter. Is this the time it takes for the word processor to complete, or the word processor plus the printer driver's TIFF conversion. | ||
| Answer: | ||
| The timeout value is the amount of seconds to wait before timing out after making the call to Shell Execute. We return after the APP prints, and the tiff file is generated. | ||
| The ODCdaemon has a second timer (which I think should be set to longer than your printdoc timeout value) where it can 'autoclose' the currently active window. Ie: if there is a WORD autoclose specified, and the timeout is 3 seconds, 3 seconds after starting the printdoc, the ODCdaemon will close Word. | ||