Miraplacid Home Contact UsStoreDownloadsMiraplacid NewsMiraplacid ForumSearch at Miraplacid.com
Miraplacid Publisher (Image Printer Driver)Miraplacid Text Driver (Text Printer Driver)Miraplacid Scripting ComponentsMiraplacid Screen Capture
Bookmark this pageMiraplacid PublisherMiraplacid Text DriverMiraplacid Screen CaptureMiraplacid FormMiraplacid Scripting ComponentsMiraplacid Company

Miraplacid Text Driver 2008 Howto

1. How to print to Text Driver from DOS program?


To set up Miraplacid Text Driver to catch DOS text print job, you need to do the following:
  1. Share Text Driver on the network.
  2. On PC with your DOS program, create the following batch file:
    
    net use lpt1: /delete 
    net use lpt1: \\Your_Computer_Name\SharedPrinter 
    
  3. Run this batch file.
  4. Open Text Driver properties (in Printers folder).
  5. Click on "Advanced" tab and press to "Print processor..."
  6. "MTD_PRINT" print processor should be selected in the left column.
  7. Choose "Text" as default datatype for MIRAPRINT and press "Ok".
  8. Close Miraplacid Text Driver properties.
You should be able to print from a DOS program to LPT1. Try it out from EDIT, open a text file, and print it.

2. How to send extracted text by email with Outlook?


You may use the following script file as a post-processor:

==================== outlook.js =================
var objArgs = WScript.Arguments;
if(objArgs.Count()<1) {
	WScript.Quit(1);
}
var fso = WScript.CreateObject("Scripting.FileSystemObject");

var text = fso.OpenTextFile(fso.GetAbsolutePathName(objArgs.Item(0)), 1);
var mtdtext=text.ReadAll();

var ol = WScript.CreateObject("Outlook.Application");
var msg = ol.CreateItem(0);

msg.Recipients.Add("user@company.com");

var success = msg.Recipients.ResolveAll();

msg.Subject = "New text from MTD";
msg.Body = mtdtext;

if(success) {
	msg.Send();
} else {
	msg.Display();
}
===================================================
Check "Open with" checkbox in File transport properties. Fill out "Open with" editbox with cscript.exe. In "Parameters" type outlook.js (with a full path to it).

Text printed by MTD must be in ANSI. If you need to open Unicode files, change

var text = fso.OpenTextFile(fso.GetAbsolutePathName(objArgs.Item(0)), 1);
to

var text = fso.OpenTextFile(fso.GetAbsolutePathName(objArgs.Item(0)), 1, false, true);

3. How to send extracted text by email with Collaboration Data Objects (CDO) messaging component (CDONTS.NewMail) ?


You may use the following script file as a post-processor:

==================== cdonts.js =================
var objArgs = WScript.Arguments;
if(objArgs.Count()<1) {
	WScript.Quit(1);
}
var fso = WScript.CreateObject("Scripting.FileSystemObject");

var text = fso.OpenTextFile(fso.GetAbsolutePathName(objArgs.Item(0)), 1);
var mtdtext=text.ReadAll();

var mail = WScript.CreateObject("CDONTS.NewMail");
mail.From="user1@company.com";
mail.To="user2@company.com";
mail.Subject="New text from MTD";
mail.Body=mtdtext;
mail.Send();
================================================
Check "Open with" checkbox in File transport properties. Fill out "Open with" editbox with cscript.exe. In "Parameters" type cdonts.js (with a full path to it).

Text printed by MTD must be in ANSI. If you need to open Unicode files, change

var text = fso.OpenTextFile(fso.GetAbsolutePathName(objArgs.Item(0)), 1);
to

var text = fso.OpenTextFile(fso.GetAbsolutePathName(objArgs.Item(0)), 1, false, true);
Copyright © 2001 - 2008 by Miraplacid. Legal Notices