printer

603
294 Route 101 Tel: (603) 673-1019 Amherst, NH 03031 Fax: (603) 672-4112

Upload: nik-ikhwan-haqim

Post on 28-May-2017

243 views

Category:

Documents


7 download

TRANSCRIPT

Page 1: printer

294 Route 101 Tel: (603) 673-1019 Amherst, NH 03031 Fax: (603) 672-4112

Page 2: printer
Page 3: printer

Printer DriverUser Manual

Page 4: printer

The information contained in this manual is subject to change without notice. Changes, technical inaccuracies and typographical errors will be corrected in subsequent editions of this manual.

The software described in this manual is furnished under a license agreement. The software may be used or copied only in accordance with terms of the agreement. No part of this manual may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying and recording, for any purpose other than the purchaser's own use without the express written consent of Black Ice Software, Inc.

© 1989, 1996, 1997, 1998, 1999, 2001 and 2002 by Black Ice Software, Inc., 292 Route 101, Amherst, NH 03031. All rights reserved.

Release 6.XXFourth Edition (December, 2001)SP1055ISBN 1-56265-009-8

Printed in the U.S.A. April 29, 2002

Page 5: printer

Table Of Contents

INTRODUCTION..................................................................................................................... 25

Organization of the manual................................................................................................ 25

PART A: DRIVERS FOR XP/W2K/NT STANDARD AND TERMINAL SERVER VERSIONS............................................................................................................................... 26

Installing the XP/W2K/NT Drivers........................................................................................27

XP/W2K/NT AND TERMINAL SERVER TIFF DRIVER..................................................32

Device Settings sheet............................................................................................................. 32Paper Width....................................................................................................................... 33Paper Height...................................................................................................................... 33Units.................................................................................................................................. 33Specifying the Paper Size................................................................................................... 34

Paper Sizes Supported.................................................................................................... 34Add Fax Header................................................................................................................. 35Create a Faxable Image..................................................................................................... 35Force FAX Resolution........................................................................................................ 36

What is Fax Paper Size?................................................................................................. 36How is Page size computed and image size translated into pixels?................................36

Advanced Paper size.......................................................................................................... 36Specifying Page Orientation............................................................................................... 36Rotate a Landscape Image to Portrait................................................................................36Specifying Graphic Resolution...........................................................................................37Horizontal Resolution........................................................................................................ 37Vertical Resolution............................................................................................................. 37Generated Image Size......................................................................................................... 38

File Formats sheet.................................................................................................................. 39Specifying the File Format................................................................................................. 40Options.............................................................................................................................. 40Create a multi page image.................................................................................................40Disable image.................................................................................................................... 40Eastern Character Support................................................................................................. 41Write Text File................................................................................................................... 41Mail Merge........................................................................................................................ 41Save Position and style info................................................................................................ 43TIFF Options..................................................................................................................... 43Internet TIFF format.......................................................................................................... 43Reverse bit order in TIFF................................................................................................... 43Add Page Numbering Tag.................................................................................................. 43Photo Quality..................................................................................................................... 43Intensity............................................................................................................................. 44

i294 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 1998 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 6: printer

Filename Generation sheet..................................................................................................... 45Name Generation Methods................................................................................................. 46Filename............................................................................................................................ 48Filename Prefix.................................................................................................................. 48Filename Extension............................................................................................................ 48Use custom extension......................................................................................................... 48Keep existing files.............................................................................................................. 48Output directory................................................................................................................. 48Group File Options............................................................................................................ 49Disable Group File............................................................................................................ 49Delete group file after printing........................................................................................... 49

Start Application sheet........................................................................................................... 50Enable Start Application.................................................................................................... 50Application......................................................................................................................... 51Start Before Printing.......................................................................................................... 51Start After Printing............................................................................................................. 51Pass Parameters................................................................................................................ 51Show Application Window.................................................................................................. 51Disable Messaging Interface.............................................................................................. 51

XP/W2K/NT AND TERMINAL SERVER COLOR DRIVER.............................................53

Driver Files............................................................................................................................ 53Configuring the Driver on Windows XP/W2K/NT and Terminal Server...............................53Device Settings sheet............................................................................................................. 54

Paper Width....................................................................................................................... 54Paper Height...................................................................................................................... 55Units.................................................................................................................................. 55Specifying the Paper Size................................................................................................... 55

Page Sizes Supported..................................................................................................... 55Add Fax Header................................................................................................................. 56Create a Faxable Image..................................................................................................... 57Force FAX Resolution........................................................................................................ 57

What is Fax Paper Size?................................................................................................. 57How is Page size computed and image size translated into pixels?................................57

Advanced Paper size.......................................................................................................... 57Specifying Page Orientation............................................................................................... 57Rotate a Landscape Image to Portrait................................................................................58Specifying Graphic Resolution...........................................................................................58Horizontal Resolution........................................................................................................ 59Vertical Resolution............................................................................................................. 59Generated Image Size......................................................................................................... 59

File Formats sheet.................................................................................................................. 60Specifying the File Format................................................................................................. 60JPEG Loss Ratio................................................................................................................ 61Color Depth....................................................................................................................... 61

ii294 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 1998 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 7: printer

Options.............................................................................................................................. 61Create a multi page image.................................................................................................62Disable image.................................................................................................................... 62Eastern Character Support................................................................................................. 62Write Text File................................................................................................................... 62Mail Merge........................................................................................................................ 63Save Position and style info................................................................................................ 64TIFF Options..................................................................................................................... 64Internet TIFF format.......................................................................................................... 64Reverse bit order in TIFF................................................................................................... 64Add Page Numbering Tag.................................................................................................. 65Photo Quality..................................................................................................................... 65Intesity............................................................................................................................... 65

Filename Generation sheet..................................................................................................... 66Name Generation Method.................................................................................................. 67Filename............................................................................................................................ 69Filename Prefix.................................................................................................................. 69Filename Extension............................................................................................................ 69Use custom extension......................................................................................................... 69Keep existing files.............................................................................................................. 69Output directory................................................................................................................. 69Group File Options............................................................................................................ 70Disable Group File............................................................................................................ 70Delete group file after printing........................................................................................... 70

Start Application sheet........................................................................................................... 71Enable Start Application.................................................................................................... 71Application......................................................................................................................... 72Start Before Printing.......................................................................................................... 72Start After Printing............................................................................................................. 72Pass Parameters................................................................................................................ 72Show Application Window.................................................................................................. 72Disable Messaging Interface.............................................................................................. 72

XP/W2K/NT AND TERMINAL SERVER METAFILE DRIVER.......................................73

Driver Files............................................................................................................................ 73Configuring the EMF (Metafile) Driver on Windows XP/W2K and NT................................73Device Settings sheet............................................................................................................. 74

Paper Width....................................................................................................................... 74Paper Height...................................................................................................................... 75Units.................................................................................................................................. 75Specifying the Paper Size................................................................................................... 75

Page Sizes Supported..................................................................................................... 75Add Fax Header................................................................................................................. 76Create a Faxable Image..................................................................................................... 77

iii294 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 1998 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 8: printer

This option is not available in the EMF printer driver....................................................77Force FAX Resolution........................................................................................................ 77

What is Fax Paper Size?................................................................................................. 77How is Page size computed and image size translated into pixels?................................77

Advanced Paper size.......................................................................................................... 77Specifying Page Orientation............................................................................................... 77Rotate a Landscape Image to Portrait................................................................................77Specifying Graphic Resolution...........................................................................................78Horizontal Resolution........................................................................................................ 78Vertical Resolution............................................................................................................. 79Generated Image Size......................................................................................................... 79

File Formats sheet.................................................................................................................. 80Specifying the File Format................................................................................................. 80Options.............................................................................................................................. 80Disable image.................................................................................................................... 81Eastern Character Support................................................................................................. 81Write Text File................................................................................................................... 81Mail Merge........................................................................................................................ 81Save Position and style info................................................................................................ 83

Filename Generation sheet..................................................................................................... 84Name Generation Method.................................................................................................. 85Filename............................................................................................................................ 87Filename Prefix.................................................................................................................. 87Filename Extension............................................................................................................ 87Use custom extension......................................................................................................... 87Keep existing files.............................................................................................................. 87Output directory................................................................................................................. 87Group File Options............................................................................................................ 88Disable Group File............................................................................................................ 88Delete group file after printing........................................................................................... 88

Start Application sheet........................................................................................................... 89Enable Start Application.................................................................................................... 89Application......................................................................................................................... 90Start Before Printing.......................................................................................................... 90Start After Printing............................................................................................................. 90Pass Parameters................................................................................................................ 90Show Application Window.................................................................................................. 90Disable Messaging Interface.............................................................................................. 90

THE PROGRAMMING INTERFACE..................................................................................91

Programming Interface.......................................................................................................... 91Project settings for the XP/W2k/NT and Terminal Server...................................................91How printers store their settings on Windows NT, Windows 2000 and Windows XP?........92Windows DEVMODE......................................................................................................... 93

Members OF THE WINDOWS DEVMODE.................................................................94iv

294 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112© 1989 - 1998 Black Ice Software Inc.

Information Contained Is Not For Reproduction Or Distribution

Page 9: printer

Black Ice DEVMODE...................................................................................................... 103The definition of the BlackIceDEVMODE structure:...................................................104MEMBERS OF THE BlackIceDEVMODE STRUCTURE..........................................104

Messaging Interface......................................................................................................... 115The WM_COPYDATA Windows Message..................................................................117The COPYDATASTRUCT structure...........................................................................118The BLACKICE_PRINTER_MESSAGE structure......................................................119Description of the Black Ice Printer Messages..............................................................120The BLACKICE_MESSAGE_STARTDOC message:.................................................120The BLACKICE_MESSAGE_STARTPAGE message:...............................................120The BLACKICE_MESSAGE_ENDPAGE message:...................................................120The BLACKICE_MESSAGE_ENDDOC message:.....................................................120The BLACKICE_MESSAGE_ABORT message:........................................................121

Command Line Parameters.............................................................................................. 122Group File Description.................................................................................................... 123

Group File Content....................................................................................................... 123Group file header section.............................................................................................. 123Group file body............................................................................................................ 125

Message Capture OCX Control........................................................................................127PrinterName Property................................................................................................... 127StartDoc event.............................................................................................................. 127StartPage event............................................................................................................. 127EndPage event.............................................................................................................. 127EndDoc event............................................................................................................... 128

The BLICECTR.DLL message capture DLL.....................................................................129WaitForPrnPipe............................................................................................................ 130EndWaitPrnPipe........................................................................................................... 130SetListeningPriority..................................................................................................... 130

Sample code for changing the printer settings programmatically.....................................131Changing the DEVMODE structure under Windows XP/W2K/NT..............................131

Fax Boards........................................................................................................................... 136GammaLink Fax Boards.................................................................................................. 136Dialogic VFX Fax Boards................................................................................................ 136Bicom Fax Board............................................................................................................. 136Commetrex Fax Board..................................................................................................... 136Natural Micro Systems Fax Board...................................................................................137

XP/W2K AND NT RESOURCE TOOLKIT........................................................................139

Directory structure of the Resource Toolkit.........................................................................139Components of the Resource Toolkit...................................................................................140

1. Install........................................................................................................................... 1401.1 The Install DLL................................................................................................... 1401.2 The dSetParameter() function..............................................................................1401.4 Example to set a member of the DEVMODE at install time................................142

v294 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 1998 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 10: printer

1.5 How to add code to set a member of the DEVMODE..........................................1431.6 Functions of the Install DLL................................................................................144Where to find the most recent driver files ?..................................................................147How to install the printer driver with a different package other than Install Shield?.....150Which are the correct parameters to call the dSetParameter() function to install the printer driver................................................................................................................ 155How to set the printer setting at install time using an INI file?.....................................156How to install the printer with a custom name?............................................................163How to install more than one printers?.........................................................................163How to install or configure the printer driver to use different output directory for each user? 163How to change the Messaging Interface Name.............................................................164

2. Message Capture Sample.............................................................................................1653. Source of the User Interface DLL.................................................................................1654. Message Capture OCX Control....................................................................................166

PrinterName Property................................................................................................... 166StartDoc event.............................................................................................................. 166StartPage event............................................................................................................. 167EndPage event.............................................................................................................. 167EndDoc event............................................................................................................... 167

5. VB Message Capture Sample........................................................................................ 1676 The BlackIceDEVMODE.DLL......................................................................................167

6.1 Description of the DLL........................................................................................ 1676.2 How to use the BlackIceDEVMODE.dll..............................................................1686.3 DLL Functions.................................................................................................... 169

6.3.1 The initialization functions.........................................................................1696.3.1.1 BlackIce_GetLastError..................................................................................1696.3.1.2 LoadBlackIceDEVMODE.............................................................................1696.3.1.3 ReleaseBlackIceDEVMODE.........................................................................1706.3.1.4 SaveBlackIceDEVMODE.............................................................................1706.3.1.5 SaveDefaultBlackIceDEVMODE..................................................................170

6.3.2 Change the values of the DEVMODE.........................................................1706.3.3 The “Device Settings” tab functions............................................................171

6.3.3.1 GetPaperSize................................................................................................1716.3.3.2 SetPaperSize.................................................................................................1726.3.3.3 GetPageWidthInPixels..................................................................................1726.3.3.4 SetPaperWidthInPixel...................................................................................1726.3.3.5 GetPageHeightInPixels.................................................................................1726.3.3.6 SetPaperHeightInPixel..................................................................................1726.3.3.7 GetFaxHeader...............................................................................................1736.3.3.8 SetFaxHeader...............................................................................................1736.3.3.9 IsFaxOutputEnabled.....................................................................................1736.3.3.10 EnableFaxOutput..........................................................................................1736.3.3.11 DisableFaxOutput........................................................................................1736.3.3.12 IsAdvancedPaperSizeEnabled.......................................................................1746.3.3.13 EnableAdvancedPaperSize...........................................................................174

vi294 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 1998 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 11: printer

6.3.3.14 DisableAdvancedPaperSize..........................................................................1746.3.3.15 GetOrientation..............................................................................................1746.3.3.16 SetOrientation..............................................................................................1746.3.3.17 IsRotatePaperEnabled...................................................................................1756.3.3.18 EnableRotatePaper.......................................................................................1756.3.3.19 DisableRotatePaper......................................................................................1756.3.3.20 GetXDPI......................................................................................................1756.3.3.21 SetXDPI.......................................................................................................1756.3.3.22 GetYDPI......................................................................................................1766.3.3.23 SetYDPI.......................................................................................................1766.3.3.24 IsFaxLowOutputEnabled..............................................................................1766.3.3.25 EnableLowFaxOutput...................................................................................1766.3.3.26 DisableLowFaxOutput..................................................................................176

6.3.4 The “File Formats” Tab functions...............................................................1786.3.4.1 GetFileFormat..............................................................................................1786.3.4.2 SetFileFormat...............................................................................................1796.3.4.3 GetLossRatio................................................................................................1796.3.4.4 SetLossRatio................................................................................................1796.3.4.5 GetColorDepth.............................................................................................1796.3.4.6 SetColorDepth..............................................................................................1796.3.4.7 IsMultipageImageEnabled.............................................................................1806.3.4.8 EnableMultipageImage.................................................................................1806.3.4.9 DisableMultipageImage................................................................................1806.3.4.10 IsAppendImageEnabled................................................................................1806.3.4.11 EnableAppendImage....................................................................................1806.3.4.12 DisableAppendImage...................................................................................1816.3.4.13 IsDisableImageEnabled................................................................................1816.3.4.14 EnableDisableImage.....................................................................................1816.3.4.15 DisableDisableImage....................................................................................1816.3.4.16 IsEasternCharSupportEnabled......................................................................1816.3.4.17 EnableEasternCharSupport...........................................................................1816.3.4.18 DisableEasternCharSupport..........................................................................1826.3.4.19 IsWriteTextEnabled......................................................................................1826.3.4.20 EnableWriteText..........................................................................................1826.3.4.21 DisableWriteText.........................................................................................1826.3.4.22 IsMailMergeEnabled....................................................................................1826.3.4.23 EnableMailMerge.........................................................................................1836.3.4.24 DisableMailMerge........................................................................................1836.3.4.25 IsAdvancedTextEnabled...............................................................................1836.3.4.26 EnableAdvancedText....................................................................................1836.3.4.27 DisableAdvancedText...................................................................................1836.3.4.28 IsInternetTiffFormatEnabled.........................................................................1846.3.4.29 EnableInternetTiffFormat.............................................................................1846.3.4.30 DisableInternetTiffFormat............................................................................1846.3.4.31 IsReverseBitOrderEnabled............................................................................1846.3.4.32 EnableReverseBitOrder................................................................................1846.3.4.33 DisableReverseBitOrder...............................................................................1856.3.4.34 IsPageNumberingEnabled.............................................................................185

vii294 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 1998 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 12: printer

6.3.4.35 EnablePageNumbering.................................................................................1856.3.4.36 DisablePageNumbering................................................................................1856.3.4.37 GetDithering................................................................................................1856.3.4.38 SetDithering.................................................................................................1866.3.4.39 GetBrightness...............................................................................................1866.3.4.40 SetBrightness...............................................................................................186

6.3.5 The “Filename Generation” tab functions...................................................1876.3.5.1 GetFileGenerationMethod.............................................................................1876.3.5.2 SetFileGenerationMethod.............................................................................1886.3.5.3 GetFileNamePrefix.......................................................................................1886.3.5.4 SetFileNamePrefix........................................................................................1886.3.5.5 GetFileExtension..........................................................................................1886.3.5.6 SetFileExtension...........................................................................................1886.3.5.7 IsCustomExtensionEnabled...........................................................................1896.3.5.8 EnableCustomExtension...............................................................................1896.3.5.9 DisableCustomExtension..............................................................................1896.3.5.10 GetINIFileName...........................................................................................1896.3.5.11 SetINIFileName...........................................................................................1896.3.5.12 GetImageFileName.......................................................................................1906.3.5.13 SetImageFileName.......................................................................................1906.3.5.14 IsKeepExistingFilesEnabled.........................................................................1906.3.5.15 EnableKeepExistingFiles..............................................................................1906.3.5.16 DisableKeepExistingFiles.............................................................................1906.3.5.17 GetOutputDirectory......................................................................................1916.3.5.18 SetOutputDirectory......................................................................................1916.3.5.19 IsGroupFileDisabled.....................................................................................1916.3.5.20 DisableGroupFile.........................................................................................1916.3.5.21 EnableGroupFile..........................................................................................1916.3.5.22 IsDeleteGroupFileEnabled............................................................................1926.3.5.23 EnableDeleteGroupFile................................................................................1926.3.5.24 DisableDeleteGroupFile...............................................................................192

6.3.6 The “Start Application” tab functions.........................................................1936.3.6.1 IsStartApplicationEnabled............................................................................1936.3.6.2 EnableStartApplication.................................................................................1946.3.6.3 DisableStartApplication................................................................................1946.3.6.4 GetApplicationPath.......................................................................................1946.3.6.5 SetApplicationPath.......................................................................................1946.3.6.6 IsStartBeforePrint.........................................................................................1946.3.6.7 EnableStartBeforePrint.................................................................................1956.3.6.8 DisableStartBeforePrint................................................................................1956.3.6.9 IsPassParametersEnabled..............................................................................1956.3.6.10 EnablePassParameters..................................................................................1956.3.6.11 DisablePassParameters.................................................................................1956.3.6.12 IsStartNormal...............................................................................................1956.3.6.13 EnableStartNormal.......................................................................................1966.3.6.14 DisableStartNormal......................................................................................1966.3.6.15 IsStartMinimized..........................................................................................1966.3.6.16 EnableStartMinimized..................................................................................196

viii294 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 1998 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 13: printer

6.3.6.17 DisableStartMinimized.................................................................................1976.3.6.18 IsStartHidden...............................................................................................1976.3.6.19 EnableStartHidden........................................................................................1976.3.6.20 DisableStartHidden......................................................................................1976.3.6.21 IsMessagingInterfaceEnabled.......................................................................1976.3.6.22 EnableMessagingInterface............................................................................1986.3.6.23 DisableMessagingInterface...........................................................................198

6.3.7 Miscellaneous functions..............................................................................1986.3.7.1 GetInterfaceName.........................................................................................1986.3.7.2 SetInterfaceName..........................................................................................1986.3.7.3 GetPaperLength............................................................................................1986.3.7.4 SetPaperLength.............................................................................................1996.3.7.5 IsTIFFDllEnabled.........................................................................................1996.3.7.6 EnableTIFFDll..............................................................................................1996.3.7.7 DisableTIFFDll............................................................................................1996.3.7.8 IsJPEGDllEnabled........................................................................................1996.3.7.9 EnableJPEGDll.............................................................................................2006.3.7.10 DisableJPEGDll...........................................................................................2006.3.7.11 GetTIFFDLLName.......................................................................................2006.3.7.12 SetTIFFDLLName.......................................................................................2006.3.7.13 GetJPEGDLLName......................................................................................2016.3.7.14 SetJPEGDLLName......................................................................................2016.3.7.15 GetResourceDLLName................................................................................2016.3.7.16 SetResourceDLLName.................................................................................2016.3.7.17 GetBitsPerPixel............................................................................................201

7 C++ Sample - how to modify the printer settings programmatically............................2027.1 How the PrinterSettings program works:.............................................................203

8 The BlackIceDEVMODE.OCX.....................................................................................2038.1 Description of the OCX.......................................................................................2038.2 How to use the BlackIceDEVMODE.OCX..........................................................2038.3 Methods of the BlackIceDEVMODE.OCX..........................................................204

8.3.1 The initialization functions.........................................................................2048.3.1.1 LoadBlackIceDEVMODE.............................................................................2048.3.1.2 ReleaseBlackIceDEVMODE.........................................................................2058.3.1.3 SaveBlackIceDEVMODE.............................................................................2058.3.1.4 SaveDefaultBlackIceDEVMODE..................................................................205

8.3.2 Changing the printer settings.......................................................................2058.3.3 The “Device Settings” methods...................................................................206

8.3.3.1 GetPaperSize................................................................................................2068.3.3.2 SetPaperSize.................................................................................................2078.3.3.3 GetPageWidthInPixels..................................................................................2078.3.3.4 SetPaperWidthInPixel...................................................................................2078.3.3.5 GetPageHeightInPixels.................................................................................2078.3.3.6 SetPaperHeightInPixel..................................................................................2078.3.3.7 GetFaxHeader...............................................................................................2088.3.3.8 SetFaxHeader...............................................................................................2088.3.3.9 IsFaxOutputEnabled.....................................................................................2088.3.3.10 EnableFaxOutput..........................................................................................208

ix294 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 1998 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 14: printer

8.3.3.11 DisableFaxOutput........................................................................................2098.3.3.12 IsAdvancedPaperSizeEnabled.......................................................................2098.3.3.13 EnableAdvancedPaperSize...........................................................................2098.3.3.14 DisableAdvancedPaperSize..........................................................................2098.3.3.15 GetOrientation..............................................................................................2098.3.3.16 SetOrientation..............................................................................................2108.3.3.17 IsRotatePaperEnabled...................................................................................2108.3.3.18 EnableRotatePaper.......................................................................................2108.3.3.19 DisableRotatePaper......................................................................................2108.3.3.20 GetXDPI......................................................................................................2108.3.3.21 SetXDPI.......................................................................................................2118.3.3.22 GetYDPI......................................................................................................2118.3.3.23 SetYDPI.......................................................................................................2118.3.3.24 IsFaxLowOutputEnabled..............................................................................2118.3.3.25 EnableLowFaxOutput...................................................................................2118.3.3.26 DisableLowFaxOutput..................................................................................212

8.3.4 The “File Formats” methods.......................................................................2138.3.4.1 GetFileFormat..............................................................................................2138.3.4.2 SetFileFormat...............................................................................................2138.3.4.3 GetLossRatio................................................................................................2148.3.4.4 SetLossRatio................................................................................................2148.3.4.5 GetColorDepth.............................................................................................2148.3.4.6 SetColorDepth..............................................................................................2148.3.4.7 IsMultipageImageEnabled.............................................................................2158.3.4.8 EnableMultipageImage.................................................................................2158.3.4.9 DisableMultipageImage................................................................................2158.3.4.10 IsAppendImageEnabled................................................................................2158.3.4.11 EnableAppendImage....................................................................................2158.3.4.12 DisableAppendImage...................................................................................2168.3.4.13 IsDisableImageEnabled................................................................................2168.3.4.14 EnableDisableImage.....................................................................................2168.3.4.15 DisableDisableImage....................................................................................2168.3.4.16 IsEasternCharSupportEnabled......................................................................2168.3.4.17 EnableEasternCharSupport...........................................................................2178.3.4.18 DisableEasternCharSupport..........................................................................2178.3.4.19 IsWriteTextEnabled......................................................................................2178.3.4.20 EnableWriteText..........................................................................................2178.3.4.21 DisableWriteText.........................................................................................2178.3.4.22 IsMailMergeEnabled....................................................................................2178.3.4.23 EnableMailMerge.........................................................................................2188.3.4.24 DisableMailMerge........................................................................................2188.3.4.25 IsAdvancedTextEnabled...............................................................................2188.3.4.26 EnableAdvancedText....................................................................................2188.3.4.27 DisableAdvancedText...................................................................................2188.3.4.28 IsInternetTiffFormatEnabled.........................................................................2198.3.4.29 EnableInternetTiffFormat.............................................................................2198.3.4.30 DisableInternetTiffFormat............................................................................2198.3.4.31 IsReverseBitOrderEnabled............................................................................2198.3.4.32 EnableReverseBitOrder................................................................................219

x294 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 1998 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 15: printer

8.3.4.33 DisableReverseBitOrder...............................................................................2208.3.4.34 IsPageNumberingEnabled.............................................................................2208.3.4.35 EnablePageNumbering.................................................................................2208.3.4.36 DisablePageNumbering................................................................................2208.3.4.37 GetDithering................................................................................................2208.3.4.38 SetDithering.................................................................................................2218.3.4.39 GetBrightness...............................................................................................2218.3.4.40 SetBrightness...............................................................................................221

8.3.5 The “Filename Generation” methods..........................................................2228.3.5.1 GetFileGenerationMethod.............................................................................2228.3.5.2 SetFileGenerationMethod.............................................................................2238.3.5.3 GetFileNamePrefix.......................................................................................2238.3.5.4 SetFileNamePrefix........................................................................................2238.3.5.5 GetFileExtension..........................................................................................2238.3.5.6 SetFileExtension...........................................................................................2238.3.5.7 IsCustomExtensionEnabled...........................................................................2248.3.5.8 EnableCustomExtension...............................................................................2248.3.5.9 DisableCustomExtension..............................................................................2248.3.5.10 GetINIFileName...........................................................................................2248.3.5.11 SetINIFileName...........................................................................................2248.3.5.12 GetImageFileName.......................................................................................2258.3.5.13 SetImageFileName.......................................................................................2258.3.5.14 IsKeepExistingFilesEnabled.........................................................................2258.3.5.15 EnableKeepExistingFiles..............................................................................2258.3.5.16 DisableKeepExistingFiles.............................................................................2258.3.5.17 GetOutputDirectory......................................................................................2268.3.5.18 SetOutputDirectory......................................................................................2268.3.5.19 IsGroupFileDisabled.....................................................................................2268.3.5.20 DisableGroupFile.........................................................................................2268.3.5.21 EnableGroupFile..........................................................................................2268.3.5.22 IsDeleteGroupFileEnabled............................................................................2278.3.5.23 EnableDeleteGroupFile................................................................................2278.3.5.24 DisableDeleteGroupFile...............................................................................227

8.3.6 The “Start Application” methods................................................................2288.3.6.1 IsStartApplicationEnabled............................................................................2288.3.6.2 EnableStartApplication.................................................................................2298.3.6.3 DisableStartApplication................................................................................2298.3.6.4 GetApplicationPath.......................................................................................2298.3.6.5 SetApplicationPath.......................................................................................2298.3.6.6 IsStartBeforePrint.........................................................................................2298.3.6.7 EnableStartBeforePrint.................................................................................2308.3.6.8 DisableStartBeforePrint................................................................................2308.3.6.9 IsPassParametersEnabled..............................................................................2308.3.6.10 EnablePassParameters..................................................................................2308.3.6.11 DisablePassParameters.................................................................................2308.3.6.12 IsStartNormal...............................................................................................2318.3.6.13 EnableStartNormal.......................................................................................2318.3.6.14 DisableStartNormal......................................................................................231

xi294 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 1998 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 16: printer

8.3.6.15 IsStartMinimized..........................................................................................2318.3.6.16 EnableStartMinimized..................................................................................2318.3.6.17 DisableStartMinimized.................................................................................2328.3.6.18 IsStartHidden...............................................................................................2328.3.6.19 EnableStartHidden........................................................................................2328.3.6.20 DisableStartHidden......................................................................................2328.3.6.21 IsMessagingInterfaceEnabled.......................................................................2328.3.6.22 EnableMessagingInterface............................................................................2338.3.6.23 DisableMessagingInterface...........................................................................233

8.3.7 Miscellaneous methods...............................................................................2348.3.7.1 GetInterfaceName.........................................................................................2348.3.7.2 SetInterfaceName..........................................................................................2348.3.7.3 GetPaperLength............................................................................................2348.3.7.4 SetPaperLength.............................................................................................2348.3.7.5 IsTiffDllEnabled...........................................................................................2358.3.7.6 EnableTiffDll................................................................................................2358.3.7.7 DisableTiffDll..............................................................................................2358.3.7.8 IsJpegDllEnabled..........................................................................................2358.3.7.9 EnableJpegDll..............................................................................................2358.3.7.10 DisableJpegDll.............................................................................................2368.3.7.11 GetTIFFDLLName.......................................................................................2368.3.7.12 SetTIFFDLLName.......................................................................................2368.3.7.13 GetJPEGDLLName......................................................................................2368.3.7.14 SetJPEGDLLName......................................................................................2368.3.7.15 GetResourceDLLName................................................................................2378.3.7.16 SetResourceDLLName.................................................................................2378.3.7.17 GetBitsPerPixel............................................................................................237

9 Visual Basic Sample – How to modify the printer settings............................................237Differences between Win95/98/ME and XP/W2K/NT Drivers............................................240

PART B: DRIVERS FOR WIN95/98 AND ME...................................................................241

Installing the Win95/98 and ME Drivers..............................................................................242

WIN95/98 AND ME MONOCHROME DRIVER................................................................246

Configuring the Driver on Windows 95/98 and ME.............................................................247Device Settings sheet........................................................................................................... 248

Paper Width..................................................................................................................... 248Paper Height.................................................................................................................... 249Units................................................................................................................................ 249Specifying the Paper Size................................................................................................. 249

Page Sizes Supported................................................................................................... 249Add Fax Header............................................................................................................... 250Create a Faxable Image................................................................................................... 251Force FAX Resolution...................................................................................................... 251

What is Fax Paper Size?............................................................................................... 251How is Page size computed and image size translated into pixels?..............................251

Advanced Paper size........................................................................................................ 251

xii294 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 1998 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 17: printer

Specifying Page Orientation............................................................................................. 251Rotate a Landscape Image to Portrait..............................................................................252Specifying Graphic Resolution.........................................................................................252Horizontal Resolution...................................................................................................... 252Vertical Resolution........................................................................................................... 253Generated Image Size....................................................................................................... 253

File Formats sheet for Win95/98and ME..............................................................................254Specifying the File Format............................................................................................... 254Options............................................................................................................................. 255Create a multi page image...............................................................................................255Disable image.................................................................................................................. 255Eastern Character Support............................................................................................... 255Write Text File................................................................................................................. 255Mail Merge...................................................................................................................... 256Save Position and style info.............................................................................................. 257TIFF Options................................................................................................................... 258Internet TIFF format........................................................................................................ 258Reverse bit order in TIFF................................................................................................. 258Add Page Numbering Tag................................................................................................ 258Photo Quality................................................................................................................... 258Intensity........................................................................................................................... 258

Filename Generation sheet................................................................................................... 260Name Generation Methods............................................................................................... 261Filename.......................................................................................................................... 263Filename Prefix................................................................................................................ 263Filename Extension.......................................................................................................... 263Use custom extension....................................................................................................... 263Keep existing files............................................................................................................ 263Output directory............................................................................................................... 263Group File Options.......................................................................................................... 264Disable Group File.......................................................................................................... 264Delete group file after printing......................................................................................... 264

Start Application sheet......................................................................................................... 265Enable Start Application.................................................................................................. 265Application....................................................................................................................... 266Start Before Printing........................................................................................................ 266Start After Printing........................................................................................................... 266Pass Parameters............................................................................................................... 266Show Application Window................................................................................................ 266Disable Messaging Interface............................................................................................ 266

WIN95/98 AND ME COLOR DRIVER................................................................................267

Driver Files.......................................................................................................................... 267Configuring the Driver on Windows 95/98 and ME.............................................................267

xiii294 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 1998 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 18: printer

Device Settings sheet........................................................................................................... 268Paper Width..................................................................................................................... 268Paper Height.................................................................................................................... 269Units................................................................................................................................ 269Specifying the Paper Size................................................................................................. 269

Page Sizes Supported................................................................................................... 269Add Fax Header............................................................................................................... 270Create a Faxable Image................................................................................................... 271Force FAX Resolution...................................................................................................... 271

What is Fax Paper Size?............................................................................................... 271How is Page size computed and image size translated into pixels?..............................271

Advanced Paper size........................................................................................................ 271Specifying Page Orientation............................................................................................. 271Rotate a Landscape Image to Portrait..............................................................................272Specifying Graphic Resolution.........................................................................................272Horizontal Resolution...................................................................................................... 273Vertical Resolution........................................................................................................... 273Generated Image Size....................................................................................................... 273

File Formats sheet................................................................................................................ 274Specifying the File Format............................................................................................... 274JPEG Loss Ratio.............................................................................................................. 275Color Depth..................................................................................................................... 275Options............................................................................................................................. 275Create a multi page image...............................................................................................276Disable image.................................................................................................................. 276Eastern Character Support............................................................................................... 276Write Text File................................................................................................................. 276Mail Merge...................................................................................................................... 277Save Position and style info.............................................................................................. 278TIFF Options................................................................................................................... 278Internet TIFF format........................................................................................................ 278Reverse bit order in TIFF................................................................................................. 278Add Page Numbering Tag................................................................................................ 279Photo Quality................................................................................................................... 279Intesity............................................................................................................................. 279

Filename Generation sheet................................................................................................... 280Name Generation Method................................................................................................ 281Filename.......................................................................................................................... 283Filename Prefix................................................................................................................ 283Filename Extension.......................................................................................................... 283Use custom extension....................................................................................................... 283Keep existing files............................................................................................................ 283Output directory............................................................................................................... 283Group File Options.......................................................................................................... 284

xiv294 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 1998 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 19: printer

Disable Group File.......................................................................................................... 284Delete group file after printing......................................................................................... 284

Start Application sheet......................................................................................................... 285Enable Start Application.................................................................................................. 285Application....................................................................................................................... 286Start Before Printing........................................................................................................ 286Start After Printing........................................................................................................... 286Pass Parameters............................................................................................................... 286Show Application Window................................................................................................ 286Disable Messaging Interface............................................................................................ 286

WIN95/98 AND ME METAFILE DRIVER.........................................................................287

Driver Files.......................................................................................................................... 287Configuring the Driver on Windows 95/98 and ME.............................................................287Device Settings sheet........................................................................................................... 288

Paper Width..................................................................................................................... 288Paper Height.................................................................................................................... 289Units................................................................................................................................ 289Specifying the Paper Size................................................................................................. 289

Page Sizes Supported................................................................................................... 289Add Fax Header............................................................................................................... 290Create a Faxable Image................................................................................................... 291Force FAX Resolution...................................................................................................... 291

What is Fax Paper Size?............................................................................................... 291How is Page size computed and image size translated into pixels?..............................291

Advanced Paper size........................................................................................................ 291Specifying Page Orientation............................................................................................. 291Rotate a Landscape Image to Portrait..............................................................................291Specifying Graphic Resolution.........................................................................................292Horizontal Resolution...................................................................................................... 292Vertical Resolution........................................................................................................... 293Generated Image Size....................................................................................................... 293

File Formats sheet................................................................................................................ 294Specifying the File Format............................................................................................... 294Options............................................................................................................................. 294Disable image.................................................................................................................. 295Eastern Character Support............................................................................................... 295Write Text File................................................................................................................. 295Mail Merge...................................................................................................................... 295Save Position and style info.............................................................................................. 297

Filename Generation sheet................................................................................................... 298Name Generation Method................................................................................................ 299Filename.......................................................................................................................... 301Filename Prefix................................................................................................................ 301

xv294 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 1998 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 20: printer

Filename Extension.......................................................................................................... 301Use custom extension....................................................................................................... 301Keep existing files............................................................................................................ 301Output directory............................................................................................................... 301Group File Options.......................................................................................................... 302Disable Group File.......................................................................................................... 302Delete group file after printing......................................................................................... 302

Start Application sheet......................................................................................................... 303Enable Start Application.................................................................................................. 303Application....................................................................................................................... 304Start Before Printing........................................................................................................ 304Start After Printing........................................................................................................... 304Pass Parameters............................................................................................................... 304Show Application Window................................................................................................ 304Disable Messaging Interface............................................................................................ 304

THE PROGRAMMING INTERFACE................................................................................305

Programming Interface........................................................................................................ 305Windows DEVMODE....................................................................................................... 305

Members OF THE WINDOWS DEVMODE...............................................................306Black Ice DEVMODE...................................................................................................... 315

The definition of the BlackIceDEVMODE structure....................................................316MEMBERS OF THE BlackIceDEVMODE STRUCTURE..........................................316

Messaging Interface......................................................................................................... 327The WM_COPYDATA Windows Message..................................................................327The COPYDATASTRUCT structure...........................................................................328The BLACKICE_PRINTER_MESSAGE structure......................................................329Description of the Black Ice Printer Messages..............................................................330The BLACKICE_MESSAGE_STARTDOC message:.................................................330The BLACKICE_MESSAGE_STARTPAGE message:...............................................330The BLACKICE_MESSAGE_ENDPAGE message:...................................................330The BLACKICE_MESSAGE_ENDDOC message:.....................................................331The BLACKICE_MESSAGE_ABORT message:........................................................331

Command Line Parameters.............................................................................................. 332Group File Description.................................................................................................... 333

Group File Content....................................................................................................... 333Group file header section.............................................................................................. 333Group file body............................................................................................................ 335

Message Capture OCX Control........................................................................................337PrinterName Property................................................................................................... 337StartDoc event.............................................................................................................. 337StartPage event............................................................................................................. 337EndPage event.............................................................................................................. 337EndDoc event............................................................................................................... 338

Sample code for changing the printer settings programmatically.....................................339xvi

294 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112© 1989 - 1998 Black Ice Software Inc.

Information Contained Is Not For Reproduction Or Distribution

Page 21: printer

Changing the DEVMODE structure under Win 95/98 & ME.......................................339Fax Boards........................................................................................................................... 341

GammaLink Fax Boards.................................................................................................. 341Dialogic VFX Fax Boards................................................................................................ 341Bicom Fax Board............................................................................................................. 341Commetrex Fax Board..................................................................................................... 341Natural Micro Systems Fax Board...................................................................................342

WIN95/98 AND ME RESOURCE TOOLKIT.....................................................................343

Directory structure of the Resource Toolkit.........................................................................343Components of the Resource Toolkit...................................................................................344

1. Install........................................................................................................................... 3441.1 The Install DLL................................................................................................... 3441.2 The dSetParameter() function..............................................................................3441.4 Example to set a member of the DEVMODE at install time................................3461.5 How to add code to set a member of the DEVMODE..........................................3461.6 Functions of the Install DLL................................................................................348Which are the right parameters for the dSetParameter() function to install the printer driver ?......................................................................................................................... 350Where to find the most recent driver files ?..................................................................351How to install the printer driver with a different package other than Install Shield?.....352How to install the printer with a custom name?............................................................354How to install more than one printers?.........................................................................355

2. Message Capture Sample.............................................................................................3553. Source of the User Interface DLL.................................................................................3554. Message Capture OCX Control....................................................................................355

PrinterName Property................................................................................................... 356StartDoc event.............................................................................................................. 356StartPage event............................................................................................................. 356EndPage event.............................................................................................................. 356EndDoc event............................................................................................................... 356

5. VB Message Capture Sample........................................................................................ 3566 The BlackIceDEVMODE.DLL......................................................................................356

6.1 Description of the DLL........................................................................................ 3576.2 How to use the BlackIceDEVMODE.dll..............................................................3576.3 DLL Functions.................................................................................................... 358

6.3.1 The initialization functions.........................................................................3586.3.1.1 BlackIce_GetLastError..................................................................................3586.3.1.2 LoadBlackIceDEVMODE.............................................................................3586.3.1.3 ReleaseBlackIceDEVMODE.........................................................................3596.3.1.4 SaveBlackIceDEVMODE.............................................................................359

6.3.2 Change the values of the DEVMODE.........................................................3596.3.3 The “Device Settings” functions.................................................................359

6.3.3.1 GetPaperSize................................................................................................3596.3.3.2 SetPaperSize.................................................................................................360

xvii294 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 1998 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 22: printer

6.3.3.3 GetPageWidthInPixels..................................................................................3606.3.3.4 SetPaperWidthInPixel...................................................................................3606.3.3.5 GetPageHeightInPixels.................................................................................3606.3.3.6 SetPaperHeightInPixel..................................................................................3616.3.3.7 GetFaxHeader...............................................................................................3616.3.3.8 SetFaxHeader...............................................................................................3616.3.3.9 IsFaxOutputEnabled.....................................................................................3616.3.3.10 EnableFaxOutput..........................................................................................3616.3.3.11 DisableFaxOutput........................................................................................3626.3.3.12 IsAdvancedPaperSizeEnabled.......................................................................3626.3.3.13 EnableAdvancedPaperSize...........................................................................3626.3.3.14 DisableAdvancedPaperSize..........................................................................3626.3.3.15 GetOrientation..............................................................................................3626.3.3.16 SetOrientation..............................................................................................3636.3.3.17 IsRotatePaperEnabled...................................................................................3636.3.3.18 EnableRotatePaper.......................................................................................3636.3.3.19 DisableRotatePaper......................................................................................3636.3.3.20 GetXDPI......................................................................................................3636.3.3.21 SetXDPI.......................................................................................................3646.3.3.22 GetYDPI......................................................................................................3646.3.3.23 SetYDPI.......................................................................................................3646.3.3.24 IsFaxLowOutputEnabled..............................................................................3646.3.3.25 EnableLowFaxOutput...................................................................................3656.3.3.26 DisableLowFaxOutput..................................................................................365

6.3.4 The “File Formats” functions......................................................................3656.3.4.1 GetFileFormat..............................................................................................3656.3.4.2 SetFileFormat...............................................................................................3656.3.4.3 GetLossRatio................................................................................................3666.3.4.4 SetLossRatio................................................................................................3666.3.4.5 GetColorDepth.............................................................................................3666.3.4.6 SetColorDepth..............................................................................................3666.3.4.7 IsMultipageImageEnabled.............................................................................3676.3.4.8 EnableMultipageImage.................................................................................3676.3.4.9 DisableMultipageImage................................................................................3676.3.4.10 IsAppendImageEnabled................................................................................3676.3.4.11 EnableAppendImage....................................................................................3676.3.4.12 DisableAppendImage...................................................................................3676.3.4.13 IsDisableImageEnabled................................................................................3686.3.4.14 EnableDisableImage.....................................................................................3686.3.4.15 DisableDisableImage....................................................................................3686.3.4.16 IsEasternCharSupportEnabled......................................................................3686.3.4.17 EnableEasternCharSupport...........................................................................3686.3.4.18 DisableEasternCharSupport..........................................................................3696.3.4.19 IsWriteTextEnabled......................................................................................3696.3.4.20 EnableWriteText..........................................................................................3696.3.4.21 DisableWriteText.........................................................................................3696.3.4.22 IsMailMergeEnabled....................................................................................3696.3.4.23 EnableMailMerge.........................................................................................3706.3.4.24 DisableMailMerge........................................................................................370

xviii294 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 1998 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 23: printer

6.3.4.25 IsAdvancedTextEnabled...............................................................................3706.3.4.26 EnableAdvancedText....................................................................................3706.3.4.27 DisableAdvancedText...................................................................................3706.3.4.28 IsInternetTiffFormatEnabled.........................................................................3716.3.4.29 EnableInternetTiffFormat.............................................................................3716.3.4.30 DisableInternetTiffFormat............................................................................3716.3.4.31 IsReverseBitOrderEnabled............................................................................3716.3.4.32 EnableReverseBitOrder................................................................................3716.3.4.33 DisableReverseBitOrder...............................................................................3716.3.4.34 IsPageNumberingEnabled.............................................................................3726.3.4.35 EnablePageNumbering.................................................................................3726.3.4.36 DisablePageNumbering................................................................................3726.3.4.37 GetDithering................................................................................................3726.3.4.38 SetDithering.................................................................................................3736.3.4.39 GetBrightness...............................................................................................3736.3.4.40 SetBrightness...............................................................................................373

6.3.5 The “Filename Generation” functions.........................................................3736.3.5.1 GetFileGenerationMethod.............................................................................3736.3.5.2 SetFileGenerationMethod.............................................................................3736.3.5.3 GetFileNamePrefix.......................................................................................3746.3.5.4 SetFileNamePrefix........................................................................................3746.3.5.5 GetFileExtension..........................................................................................3746.3.5.6 SetFileExtension...........................................................................................3746.3.5.7 IsCustomExtensionEnabled...........................................................................3756.3.5.8 EnableCustomExtension...............................................................................3756.3.5.9 DisableCustomExtension..............................................................................3756.3.5.10 GetINIFileName...........................................................................................3756.3.5.11 SetINIFileName...........................................................................................3756.3.5.12 GetImageFileName.......................................................................................3766.3.5.13 SetImageFileName.......................................................................................3766.3.5.14 IsKeepExistingFilesEnabled.........................................................................3766.3.5.15 EnableKeepExistingFiles..............................................................................3766.3.5.16 DisableKeepExistingFiles.............................................................................3766.3.5.17 GetOutputDirectory......................................................................................3776.3.5.18 SetOutputDirectory......................................................................................3776.3.5.19 IsGroupFileDisabled.....................................................................................3776.3.5.20 DisableGroupFile.........................................................................................3776.3.5.21 EnableGroupFile..........................................................................................3776.3.5.22 IsDeleteGroupFileEnabled............................................................................3786.3.5.23 EnableDeleteGroupFile................................................................................3786.3.5.24 DisableDeleteGroupFile...............................................................................378

6.3.6 The “Start Application” functions...............................................................3786.3.6.1 IsStartApplicationEnabled............................................................................3786.3.6.2 EnableStartApplication.................................................................................3786.3.6.3 DisableStartApplication................................................................................3796.3.6.4 GetApplicationPath.......................................................................................3796.3.6.5 SetApplicationPath.......................................................................................3796.3.6.6 IsStartBeforePrint.........................................................................................379

xix294 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 1998 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 24: printer

6.3.6.7 EnableStartBeforePrint.................................................................................3796.3.6.8 DisableStartBeforePrint................................................................................3806.3.6.9 IsPassParametersEnabled..............................................................................3806.3.6.10 EnablePassParameters..................................................................................3806.3.6.11 DisablePassParameters.................................................................................3806.3.6.12 IsStartNormal...............................................................................................3806.3.6.13 EnableStartNormal.......................................................................................3816.3.6.14 DisableStartNormal......................................................................................3816.3.6.15 IsStartMinimized..........................................................................................3816.3.6.16 EnableStartMinimized..................................................................................3816.3.6.17 DisableStartMinimized.................................................................................3816.3.6.18 IsStartHidden...............................................................................................3826.3.6.19 EnableStartHidden........................................................................................3826.3.6.20 DisableStartHidden......................................................................................3826.3.6.21 IsMessagingInterfaceEnabled.......................................................................3826.3.6.22 EnableMessagingInterface............................................................................3826.3.6.23 DisableMessagingInterface...........................................................................383

6.3.7 Functions which aren’t in “preferences” form.............................................3836.3.7.1 GetInterfaceName.........................................................................................3836.3.7.2 SetInterfaceName..........................................................................................3836.3.7.3 GetPaperLength............................................................................................3836.3.7.4 SetPaperLength.............................................................................................3836.3.7.5 IsTiffDllEnabled...........................................................................................3846.3.7.6 EnableTiffDll................................................................................................3846.3.7.7 DisableTiffDll..............................................................................................3846.3.7.8 IsJpegDllEnabled..........................................................................................3846.3.7.9 EnableJpegDll..............................................................................................3846.3.7.10 DisableJpegDll.............................................................................................3856.3.7.11 GetTIFFDLLName.......................................................................................3856.3.7.12 SetTIFFDLLName.......................................................................................3856.3.7.13 GetJPEGDLLName......................................................................................3856.3.7.14 SetJPEGDLLName......................................................................................3866.3.7.15 GetResourceDLLName................................................................................3866.3.7.16 SetResourceDLLName.................................................................................3866.3.7.17 GetBitsPerPixel............................................................................................386

7 C++ Sample - how to modify the printer settings programmatically............................3877.1 How the PrinterSettings program works:.............................................................388

8 The BlackIceDEVMODE.OCX.....................................................................................3888.1 Description of the OCX.......................................................................................3888.2 How to use the BlackIceDEVMODE.ocx............................................................3888.3 Methods of the BlackIceDEVMODE.OCX..........................................................389

8.3.1 The initialization functions.........................................................................3898.3.1.1 LoadBlackIceDEVMODE.............................................................................3908.3.1.2 ReleaseBlackIceDEVMODE.........................................................................3908.3.1.3 SaveBlackIceDEVMODE.............................................................................390

8.3.2 Change the printer settings..........................................................................3908.3.3 The “Device Settings” methods...................................................................391

8.3.3.1 GetPaperSize................................................................................................391

xx294 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 1998 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 25: printer

8.3.3.2 SetPaperSize.................................................................................................3918.3.3.3 GetPageWidthInPixels..................................................................................3918.3.3.4 SetPaperWidthInPixel...................................................................................3918.3.3.5 GetPageHeightInPixels.................................................................................3918.3.3.6 SetPaperHeightInPixel..................................................................................3928.3.3.7 GetFaxHeader...............................................................................................3928.3.3.8 SetFaxHeader...............................................................................................3928.3.3.9 IsFaxOutputEnabled.....................................................................................3928.3.3.10 EnableFaxOutput..........................................................................................3938.3.3.11 DisableFaxOutput........................................................................................3938.3.3.12 IsAdvancedPaperSizeEnabled.......................................................................3938.3.3.13 EnableAdvancedPaperSize...........................................................................3938.3.3.14 DisableAdvancedPaperSize..........................................................................3938.3.3.15 GetOrientation..............................................................................................3938.3.3.16 SetOrientation..............................................................................................3948.3.3.17 IsRotatePaperEnabled...................................................................................3948.3.3.18 EnableRotatePaper.......................................................................................3948.3.3.19 DisableRotatePaper......................................................................................3948.3.3.20 GetXDPI......................................................................................................3958.3.3.21 SetXDPI.......................................................................................................3958.3.3.22 GetYDPI......................................................................................................3958.3.3.23 SetYDPI.......................................................................................................3958.3.3.24 IsFaxLowOutputEnabled..............................................................................3958.3.3.25 EnableLowFaxOutput...................................................................................3968.3.3.26 DisableLowFaxOutput..................................................................................396

8.3.4 The “File Formats” methods.......................................................................3978.3.4.1 GetFileFormat..............................................................................................3978.3.4.2 SetFileFormat...............................................................................................3978.3.4.3 GetLossRatio................................................................................................3978.3.4.4 SetLossRatio................................................................................................3978.3.4.5 GetColorDepth.............................................................................................3988.3.4.6 SetColorDepth..............................................................................................3988.3.4.7 IsMultipageImageEnabled.............................................................................3988.3.4.8 EnableMultipageImage.................................................................................3988.3.4.9 DisableMultipageImage................................................................................3988.3.4.10 IsAppendImageEnabled................................................................................3998.3.4.11 EnableAppendImage....................................................................................3998.3.4.12 DisableAppendImage...................................................................................3998.3.4.13 IsDisableImageEnabled................................................................................3998.3.4.14 EnableDisableImage.....................................................................................3998.3.4.15 DisableDisableImage....................................................................................3998.3.4.16 IsEasternCharSupportEnabled......................................................................4008.3.4.17 EnableEasternCharSupport...........................................................................4008.3.4.18 DisableEasternCharSupport..........................................................................4008.3.4.19 IsWriteTextEnabled......................................................................................4008.3.4.20 EnableWriteText..........................................................................................4008.3.4.21 DisableWriteText.........................................................................................4018.3.4.22 IsMailMergeEnabled....................................................................................401

xxi294 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 1998 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 26: printer

8.3.4.23 EnableMailMerge.........................................................................................4018.3.4.24 DisableMailMerge........................................................................................4018.3.4.25 IsAdvancedTextEnabled...............................................................................4018.3.4.26 EnableAdvancedText....................................................................................4028.3.4.27 DisableAdvancedText...................................................................................4028.3.4.28 IsInternetTiffFormatEnabled.........................................................................4028.3.4.29 EnableInternetTiffFormat.............................................................................4028.3.4.30 DisableInternetTiffFormat............................................................................4028.3.4.31 IsReverseBitOrderEnabled............................................................................4038.3.4.32 EnableReverseBitOrder................................................................................4038.3.4.33 DisableReverseBitOrder...............................................................................4038.3.4.34 IsPageNumberingEnabled.............................................................................4038.3.4.35 EnablePageNumbering.................................................................................4038.3.4.36 DisablePageNumbering................................................................................4048.3.4.37 GetDithering................................................................................................4048.3.4.38 SetDithering.................................................................................................4048.3.4.39 GetBrightness...............................................................................................4048.3.4.40 SetBrightness...............................................................................................404

8.3.5 The “Filename Generation” methods..........................................................4058.3.5.1 GetFileGenerationMethod.............................................................................4058.3.5.2 SetFileGenerationMethod.............................................................................4058.3.5.3 GetFileNamePrefix.......................................................................................4058.3.5.4 SetFileNamePrefix........................................................................................4058.3.5.5 GetFileExtension..........................................................................................4068.3.5.6 SetFileExtension...........................................................................................4068.3.5.7 IsCustomExtensionEnabled...........................................................................4068.3.5.8 EnableCustomExtension...............................................................................4068.3.5.9 DisableCustomExtension..............................................................................4068.3.5.10 GetINIFileName...........................................................................................4078.3.5.11 SetINIFileName...........................................................................................4078.3.5.12 GetImageFileName.......................................................................................4078.3.5.13 SetImageFileName.......................................................................................4078.3.5.14 IsKeepExistingFilesEnabled.........................................................................4078.3.5.15 EnableKeepExistingFiles..............................................................................4088.3.5.16 DisableKeepExistingFiles.............................................................................4088.3.5.17 GetOutputDirectory......................................................................................4088.3.5.18 SetOutputDirectory......................................................................................4088.3.5.19 IsGroupFileDisabled.....................................................................................4088.3.5.20 DisableGroupFile.........................................................................................4098.3.5.21 EnableGroupFile..........................................................................................4098.3.5.22 IsDeleteGroupFileEnabled............................................................................4098.3.5.23 EnableDeleteGroupFile................................................................................4098.3.5.24 DisableDeleteGroupFile...............................................................................409

8.3.6 The “Start Application” method..................................................................4108.3.6.1 IsStartApplicationEnabled............................................................................4108.3.6.2 EnableStartApplication.................................................................................4108.3.6.3 DisableStartApplication................................................................................4108.3.6.4 GetApplicationPath.......................................................................................410

xxii294 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 1998 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 27: printer

8.3.6.5 SetApplicationPath.......................................................................................4108.3.6.6 IsStartBeforePrint.........................................................................................4118.3.6.7 EnableStartBeforePrint.................................................................................4118.3.6.8 DisableStartBeforePrint................................................................................4118.3.6.9 IsPassParametersEnabled..............................................................................4118.3.6.10 EnablePassParameters..................................................................................4118.3.6.11 DisablePassParameters.................................................................................4128.3.6.12 IsStartNormal...............................................................................................4128.3.6.13 EnableStartNormal.......................................................................................4128.3.6.14 DisableStartNormal......................................................................................4128.3.6.15 IsStartMinimized..........................................................................................4128.3.6.16 EnableStartMinimized..................................................................................4138.3.6.17 DisableStartMinimized.................................................................................4138.3.6.18 IsStartHidden...............................................................................................4138.3.6.19 EnableStartHidden........................................................................................4138.3.6.20 DisableStartHidden......................................................................................4138.3.6.21 IsMessagingInterfaceEnabled.......................................................................4148.3.6.22 EnableMessagingInterface............................................................................4148.3.6.23 DisableMessagingInterface...........................................................................414

8.3.7 Miscellaneous methods...............................................................................4148.3.7.1 GetInterfaceName.........................................................................................4148.3.7.2 SetInterfaceName..........................................................................................4158.3.7.3 GetPaperLength............................................................................................4158.3.7.4 SetPaperLength.............................................................................................4158.3.7.5 IsTiffDllEnabled...........................................................................................4158.3.7.6 EnableTiffDll................................................................................................4158.3.7.7 DisableTiffDll..............................................................................................4168.3.7.8 IsJpegDllEnabled..........................................................................................4168.3.7.9 EnableJpegDll..............................................................................................4168.3.7.10 DisableJpegDll.............................................................................................4168.3.7.11 GetTIFFDLLName.......................................................................................4168.3.7.12 SetTIFFDLLName.......................................................................................4178.3.7.13 GetJPEGDLLName......................................................................................4178.3.7.14 SetJPEGDLLName......................................................................................4178.3.7.15 GetResourceDLLName................................................................................4178.3.7.16 SetResourceDLLName.................................................................................4188.3.7.17 GetBitsPerPixel............................................................................................418

9 Visual Basic Sample – how to modify the printer settings.............................................418Differences between Win95/98/ME and XP/W2K/NT Drivers............................................421

TECHNICAL SUPPORT...................................................................................................... 424

PRINTING TIPS.................................................................................................................... 426

How to print a document to a fax compatible image without repaginating the document. 426How to print images with exact size in pixels...................................................................426How to print using very large paper size ?.......................................................................427

TROUBLESHOOTING......................................................................................................... 428

xxiii294 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 1998 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 28: printer

Creating Installations For Users......................................................................................428"Printing Defaults..." button............................................................................................. 428Setting changes when Black Ice is not the default printer.................................................429Why the printed image parameters are different then printer driver settings?..................429Printer driver does not generate any output.....................................................................430How to set file format (Group 3,Group4) in runtime?......................................................430Does the printer driver support Multi-threading?.............................................................430Can Black Ice printer driver handle concurrent requests specifying different file format and resolution?....................................................................................................................... 430Why the printer messages are captured by the administrator account when printing Test Page on Terminal Server?................................................................................................ 431Why the printer generates the output files on the windows directory when printing Test Page on Terminal Server?................................................................................................ 431Why the printer reports the “Invalid printer driver data type” error when printing?.......431Why the printer reports the “Cannot print directly to the printer” error when printing?..432“HKEY_LOCAL_MACHINE\SOFTWARE\Black Ice Software, Inc” Cannot Created message............................................................................................................................ 432Domain users cannot use the launch the application feature on the Terminal Server.......433The default settings are not set for all users after installation on Win2000 and XP..........433The printer is not using the selected DPI settings.............................................................433Distorted images from MS Word and Excel......................................................................434The printer driver does not start the application..............................................................435

INDEX.................................................................................................................................... 437

xxiv294 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 1998 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 29: printer

IntroductionBlack Ice Software, Inc., has been licensing printer drivers since 1992 for software companies, System Integrators, print manufactures, corporate end uses. The printer drivers are available for Windows 95/98, Millennium Windows, NT 4.0, Windows 2000, Windows XP, and Microsoft and Cytrex Terminal Server operating systems. The printer drivers are available in Monochrome or Color. The printer drivers can produce raster images as output such as TIFF or vector output such as Microsoft Meta File Format.

The printer drivers are licensed as:

Monochrome driver for Win 95/98 and Windows Millennium Edition. Monochrome driver for NT 4.0, Windows 2000 and XP. Monochrome driver for NT 4.0, Windows 2000 and Citrix Terminal Servers. Color driver for Win95/98 and Windows Millennium Edition. Color driver for NT 4.0, Windows 2000 and XP Color driver for NT 4.0 , Windows 2000 and Citrix Terminal Servers. MS Meta File printer driver for Win95/98 and Windows Millennium Edition. MS Meta File printer driver for NT 4.0, Windows 2000 and XP. By request only, MS Meta File printer driver for NT 4.0, Windows 2000, XP and Cytrix

Terminal Servers.

Organization of the manualThe manual is split into three parts. Part A covers XP/W2K and NT. Part B covers Win95/98 and ME. Part C covers Terminal Server printer drivers for XP/W2K and NT.

Black Ice Software organized the printer drivers by operating system and the type of driver. For example, Monochrome, Color and Metafile drivers. Each specific type of printer driver has a separate chapter. The monochrome printer driver is almost identical for every operating system, therefore there is only one description of the monochrome printer driver with subtle differences and comments in each section.

The Terminal Server printer drivers are substantially different, therefore they are organized in a separate chapter.

This manual is being completely rewritten, therefore if you find any errors please e-mail them to [email protected].

25292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 30: printer

Part A: Drivers for XP/W2K/NT Standard and Terminal Server versions

26292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 31: printer

Installing the XP/W2K/NT Drivers NOTE:

To correctly install the printer driver on Terminal Server for XP/W2K/NT the Terminal Server should be set to install mode. The best way to do this is to start the installation of the driver from the Control Panel group -> Add/Remove Programs. This will set the Terminal Server to install mode and will exit the install mode at the end of the installation.

The Terminal Server printer driver can be correctly installed only from the server machine. The printer driver cannot be installed from a remote machine, even with administrator privileges. Adding the port monitor or the printer port probably will fail.

To successfully install the driver you must have Terminal Server Service Pack 4.You will also need administrator privileges to install the driver.

Three installation options exist for the Black Ice Printer driver depending on the type of desired output. The driver can automatically be configured for fax applications, non-fax applications (document imaging), or the driver can be custom configured. The settings specified during installation can be changed at any time by accessing the Printers folder and right clicking on the Black Ice Driver and selecting “Printing Preferences” on XP/Win2000 systems or “Document Defaults” on NT systems.

1. Double click on the file that was downloaded to begin the installation.2. Follow the onscreen instructions until you are prompted to select the type of driver installation

you want. Please see the screen shot below:

27292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 32: printer

You will be presented with three installation options:

3. Fax Applications: Selecting this setting will automatically configure the driver for fax output. You can change these settings at any time after installation. See the following sections of the manual for more detail.

4. Non Fax Applications: Selecting this setting will automatically configure the driver for document imaging output. You can change these settings at any time after installation. See the following sections of the manual for more detail.

5. Custom Config: Selecting this setting will bring up the Driver Properties dialog box where you can you manually configure the driver. You can change these settings at any time after installation. See the following sections of the manual for more detail.

Please see the installation section below for each option:

Fax Applications:

Selecting this option will bring up the following screen:

28292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 33: printer

Here you can specify the type of TIFF file that will be outputted. The settings can be based on a specific hardware type or you can go with the default setting. Make your selection and press the Next button to complete the installation. You can change these settings at any time after installation. See the following sections of the manual for more detail.

Non Fax Applications:

Selecting this option automatically configures the driver for document imaging. By default the file format will be set to 24 bit JPEG. Press finish to complete the installation. You can change these settings at any time after installation. See the following sections of the manual for more detail.

Custom Config:

Selecting this option will bring up the following screen:

29292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 34: printer

Press the Printer button to manually configure the driver or press the next button to proceed with the default settings and complete the installation. By default, the image format is set to 24 bit JPEG. Pressing the Printer button will bring up the following dialog box.

30292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 35: printer

Use this dialog box and the various sheets to configure the driver. The following sections of the manual will describe in detail how to configure the properties of the Printer Driver. Make your selections and press OK to complete the installation.

31292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 36: printer

XP/W2K/NT and Terminal Server TIFF Driver

Device Settings sheet

32292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 37: printer

Paper WidthPaper width is shown in the selected unit type of 0.01 inch, 0.1 mm, or a pixel.

Paper HeightPaper height is shown in the selected unit type of 0.01 inch, 0.1 mm, or a pixel.

UnitsThe units are the type of measurement used to describe the paper width and height. The units can be 0.01 inch, 0.1 mm (mm = millimeter), or a pixel.

Specifying the Paper SizeTo change the paper size, select the Paper size list box. The page sizes range from envelopes to large A size pages. Also, included is a user-definable variable page size. The page size can be specified in increments of 0.01 inch, 0.1 mm, or a pixel. There are 45 Standard paper sizes, 36 Advanced paper sizes, as well as 3 Black Ice Software specific paper sizes such as FAX paper size, VARIABLE paper size and VARIABLE paper size specified in pixels. - The “VARIABLE paper size” is specified by 0.01 inch or 0.1 mm. The formula to

compute between mm and pixels is mm = pixel x 254/DPI or pixel = mm x DPI/254. - The “VARIABLE paper size specified in pixels” can be any size in the boundary of the

Microsoft environment with a maximum width and height of 65535 x 65535 pixels. The DPI information will be ignored.

Please Note:

The “VARIABLE paper size specified in pixels” is a special case. Normally, page size times DPI is equal to the image size in pixels. With the “VARIABLE paper size specified in pixels” setting, the image size in pixels is absolute and the DPI can be set arbitrarily. The “VARIABLE paper size specified in pixels” setting can be very useful in web and graphic applications where the physical size of the image is the preeminent factor.

Paper Sizes SupportedThe following page sizes are supported by the driver:

- Letter 8 1/2 x 11 in- Tabloid 11 x 17 in- Ledger 17 x 11 in

33292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 38: printer

- Legal 8 1/2 x 14 in- Statement 5 1/2 x 8 1/2 in- Executive 7 1/4 x 10 1/2 in- A3 297 x 420 mm- A4 210 x 297 mm- A4 Small 210 x 297 mm- A5 148 x 210 mm- B4 250 x 354- B5 182 x 257 mm- Folio 8 1/2 x 13 in- Quarto 215 x 275 mm- 10x14 in- 11x17 in- Note 8 1/2 x 11 in- Envelope #9 3 7/8 x 8 7/8- Envelope #10 4 1/8 x 9 ½- Envelope #11 4 1/2 x 10 3/8- Envelope #12 4 \276 x 11- Envelope #14 5 x 11 ½- C size sheet- D size sheet- E size sheet- Envelope DL 110 x 220mm- Envelope C5 162 x 229 mm- Envelope C3 324 x 458 mm- Envelope C4 229 x 324 mm- Envelope C6 114 x 162 mm- Envelope C65 114 x 229 mm- Envelope B4 250 x 353 mm- Envelope B5 176 x 250 mm- Envelope B6 176 x 125 mm- Envelope 110 x 230 mm- Envelope Monarch 3.875 x 7.5 in- 6 3/4 Envelope 3 5/8 x 6 1/2 in- US Std Fanfold 14 7/8 x 11 in- German Std Fanfold 8 1/2 x 12 in- German Legal Fanfold 8 1/2 x 13 in- Fax paper 8.64 x 11 in or 215 mm

If the ‘Create faxable image’ box is checked, only Fax and Legal paper sizes will be available. As a result, saved images can be faxed.

34292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 39: printer

Add Fax HeaderThe value entered in the edit box will reduce the standard page height by the specified number of pixels. This option can be used to attach private page header information on the top of each page. For example, if the page height is 2200 pixels and the fax header field is set to 100, the generated image height will be 2100 pixels.

Create a Faxable ImageThis check box can be used to set the driver to automatically create images that have fax paper size and resolution. The paper sizes and graphic resolutions are not restricted, but the end result image file will have a fax-able page size and fax-compatible resolution. For example, if the page is Letter paper size and 600 DPI, the generated file width will be 1728 pixels.

Force FAX ResolutionIf the ‘Create Faxable image’ check is selected the driver to automatically create images that have fax paper size and resolution. The user can select the final resolution of the faxable image between 204x98 DPI (Standard Fax Resolution) and 204x196 DPI (Fine Fax Resolution).

What is Fax Paper Size? Many people confuse the US Letter or European A4 paper sizes with fax paper size. According to the ITU T.30 standard, the Fax page width is 215 mm or 1728 pixels, which is slightly different than the US Letter or A4 paper size. There are additional fax paper sizes such as 255 mm and 303 mm; however they are in not in use or there are very limited devices supporting them. If the 255mm or 303 mm paper size is needed, please use the “VARIABLE paper size” setting.

How is Page size computed and image size translated into pixels? Every page is defined in either millimeters or inches. The Microsoft DEVMODE data structure uses millimeters as the base for computation. The formula to compute between mm and pixels is mm = pixel x 254/DPI or pixel = mm x DPI/254.

Advanced Paper sizeEnable/Disable the advanced paper size listing in the “Paper” combo box. There are 35 paper sizes that are not commonly used. There are special circumstances where these paper sizes are useful. For example: Architects for drawing or International such as the Japanese envelope size.

Specifying Page OrientationThe default page orientation (Portrait or Landscape) can be set on this sheet as well. The page orientation set here will be used for fax transmissions.If Landscape orientation is selected the driver will report landscape paper orientation to the printing application, but the image on the page will be rotated 90 degrees so that the actual saved

35292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 40: printer

image will still be in portrait orientation just like when you print in landscape mode. This makes it possible to fax a page printed in landscape orientation.

Rotate a Landscape Image to PortraitWhen landscape mode is selected this will rotate the generated landscape image 90 degrees so it can be printed. Also, this option is selected automatically when the “Create Faxable Image” setting is checked.

Specifying Graphic ResolutionDefault resolution (typically measured in dots per inch, or DPI), for printing graphic images.Available resolutions are listed in the Graphics Resolution window. These modes are as follows:

204 x 98 DPI - Draft resolution (standard fax mode).204 x 196 DPI - Low resolution (fine fax mode).200x200 DPI - If the Fax Output check box is selected the resolution is 200x200 dpi

internally, but the image is stored as 204x196 dpi. This feature is useful when printing from an application that can’t print correctly when the horizontal and vertical resolution values are different. Selecting this setting will print the page correctly and the image can still be faxed.

300 x 300 DPI - Medium resolution. 600 x 600 DPI - High resolution. 1500x1500 DPI - The custom resolution can be set manually up to 1500 DPI in the

“Horizontal Resolution” and “Vertical Resolution” fields. The “Horizontal” and “Vertical” resolution fields are grayed out until you select “CUSTOM Resolution max(1500x1500)”. Warning: When using settings over 600 DPI one should consider memory usage.

The Driver also supports variable dot per inch (DPI) graphic resolution that can range from 50 DPI to 1500 DPI.

Please Note:For faxing, when selecting resolution, remember that increased resolution slows down transmission speed, while lower resolutions increase throughput at the cost of image quality.

36292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 41: printer

Horizontal ResolutionShows the horizontal resolution setting. Also, when Custom resolution is selected, the required value can be entered.

Vertical ResolutionShows the vertical resolution setting. Also, when Custom resolution is selected the required value can be entered.

Generated Image SizeDisplays the uncompressed image size in megabytes based on the current paper size, resolution and color depth.

37292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 42: printer

File Formats sheet

38292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 43: printer

Specifying the File FormatClick on the File Format list box to select the output image file type for the driver. Click on the down arrow to scroll through the available selections.

The current selections are:

TIFF Group 3 1D TIFF Group 3 1D No EOL TIFF Group 3 2D TIFF Group 4 TIFF Packed TIFF LZW TIFF Uncompressed PCX Image Format Intel DCX Image Format Microsoft DIB (BMP) CALS RAW CCITT TIFF Group 3 1D RAW CCITT TIFF Group 3 1D No EOL RAW CCITT TIFF Group 3 2D RAW CCITT TIFF Group 4 IBM MRR

OptionsCreate a multi page imageWhen this button is checked the driver will save every printed page in one image file. If it is unchecked all the pages printed will be generated in separate files. NOTE: This option is only supported by the TIFF (any type of TIFF) and DCX file formats.

Disable imageCheck this option to disable the image file generation setting of the driver. This can be useful when the ‘Write text file’ radio button is checked for text output and the image file is not needed. As a result, the driver will only generate a text file, no image files will be generated.

39292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 44: printer

Eastern Character Support When this option is checked, the driver will interpret the contents of strings printed using the TextOut function as two-byte glyph indexes. This is necessary to correctly print characters of most non-US (Chinese, Japanese, etc.) versions of Windows 95/98/ME. In this case, the characters printed are not valid one-byte ASCII values. The driver cannot save text files of any kind, therefore the Write text file, Position and Style Info, and Mail Merge options will be disabled.

Write Text FileWhen this option is checked, the driver will generate an ASCII text output along with the image file. The file will have the default .txt extension. If you want to change the extension, please refer to the Filename Extension section under the Filename Generation sheet.

The text file will also contain page delimiter information to mark where the new page is started. The page delimiter is an empty line, the ‘Page 1:’ text (where the number is the current page number) and another empty line :

Page 1:

Text on page 1

Page 2:

Text on page 2

Page 3:

Text on page 3

Mail MergeWhen this checkbox is checked, the driver will recognize special character sequences in the printed text to extract some of the information in a text file or to force the driver to start generating a new image file. This feature is useful when generating multi-page TIFF files from a large document using a custom printing application.

The recognized character sequences all start with two ‘#’ characters. Most of these ‘commands’ will cause the driver to remove or alter the printed text and write it in the merged output file in text format. This file will have the same filename as the group file, with the MRG extension. The actual name of this file will be written in the group file in the following format:

40292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 45: printer

Merge Output=c:\aaaa1000.mrg

The recognized command sequences are as follows:

##~~ Lines starting with these four characters and ending with “~~” will not be printed, but written to the merged output file. For example, if the following string is sent to the driver: ##~~ Phone number=6031234321~~there will be an empty line printed in the output image file and the following line will be added to the merged output file:Phone number=6031234321 .

##** Lines starting with these four characters and ending with “**” will be partially printed and also written to the merged output file. If the string enclosed by the “**” marks contains an equation mark, the characters after the equation mark will be printed. Otherwise the whole string between the asterisks will be printed.Every character between the asterisks will be written to the merged output file.For example, if the following string is printed with the driver:##** Adressee=Company Name**the following will be written to the merged output file:Adressee=Company Nameand the following line will be printed to the output image file:Company Name

All of the above command lines must be printed as one continuous string from left to right. If they are printed one part at a time using several separate printing function calls, ( first printing “##~~” and then the rest of the line ) the driver may not be able to correctly recognize them.

The mail merge file will also contain page delimiter information to mark where the new page is started. The page delimiter is an empty line, the ‘Page 1:’ text (where the number is the current page number) and another empty line :

Page 1:

Page 2:

Page 3:

This information will appear in the Mail Merge file even is there is no mail merge information in that particular the page.

41292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 46: printer

Save Position and style info Checking this button will cause the driver to save additional formatting information in the text file. The text output is stored in the “[[X,Y][P][B,U,I]] text” format. The format starts with double brackets and ends with double brackets. The brackets can be used to parse the file. The format information has the following meaning:

X = The horizontal text coordinate.Y = The vertical text coordinate.P = The font size in points. B = The font in the text is bold.U = The font in the text is underlined.I = The font in the text is italic.

TIFF OptionsAll of the following settings are only available for TIFF files.

Internet TIFF formatIf TIFF file format is selected as the output image format and this box is checked, the driver will create a TIFF file that is compatible with the requirements listed in chapter 3 of RFC 2301 (File Format for Internet Fax ). (Not a chapter in this manual.) That chapter lists the required tags for black-and-white faxes. The extra tag the driver will include in the tiff file if this flag is checked is NEWSUBFILETYPE.

Reverse bit order in TIFFThis setting only has an effect on TIFF images.If this box is checked, the driver will save TIFF images with reverse bit order and also set the value of the FILLORDER tag in the image file to Reverse.GammaLink compatible TIFF output requires this setting to be checked, because they can only send TIFF images with reverse bit order.

Add Page Numbering TagThis setting only has an effect on TIFF images.If this box is checked, the driver will set the page number tag of every page in the output TIFF file.

Photo QualityThe Photo Quality option enables or disables the dithering of the Black Ice driver. When Photo Quality is enabled, five high quality filters become accessible. Digital half-toning, also referred to as spatial dithering, produces the illusion of continuous-tone pictures on media that is only capable of displaying binary picture elements, for example: fax machines and most printers. Floyd-Steinberg and Jarvis-Judice-Ninke are the text book filters. The Smooth, Sharp, and

42292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 47: printer

Stucki filters are less known, but produce better quality output. Floyd-Steinberg is the default setting.

IntensityThe photo quality program group also contains a scroll bar that lets you control the intensity of the output image. The lower the Intensity value is, the darker the output image will be.

When should Photo Quality Output be used?

Photo Quality output is designed primarily for faxing or to transmit color pictures on a monochrome device. When a color picture is faxed from a conventional desktop fax machine, the result is unrecognizable in most cases. On computer-generated faxes, the output quality can be increased to picture quality using the Black Ice printer driver.

How is performance affected by the Photo Quality output? The fastest filter is the Floyd-Steinberg, because it requires the least computation. Stucki is the slowest filter, but has the highest quality. The Stucki filter produces the best visible output.

43292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 48: printer

Filename Generation sheet

44292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 49: printer

Name Generation Methods Select how you want the filename to be generated from the options in the combo box. The following options are available:

Use the prefix and extension Prefix and extension from the registry Prefix and extension from the INI file Exact filename Exact filename from the registry Exact filename from the INI file Use the document name

1. Use the prefix and extension: the output filename will be generated from random characters. The first three characters will be the characters specified in the ‘Filename Prefix’ edit box and random numbers will be added. NOTE: Only the first 3 characters from the ‘Filename Prefix’ field will be used, if it is longer the string will be truncated.

2. Prefix and extension from the registry: The file name prefix and the extension will be read from the specified registry key. The registry path must be under the HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER root key. Use the “File Name Prefix” value name for the file prefix and the “File Name extension” value name for the extension.

45292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 50: printer

3. Prefix and extension from the INI file: In this case the filename and the prefix will be read from the specified INI file. The driver will search in the INI file for a section width the printer name. Use the “File Name Prefix” key for the file prefix and the “File Name extension” key for the extension. You can search for an existing INI file, create a new one or edit the selected file using the browse […] and edit [Edit] buttons.

[Black Ice Color Printer]File name prefix=ABCFile name extension=TIFF

4. Exact filename: The printed file will be generated with the same name specified in the ‘Enter the filename’ edit box.

5. Exact filename from the registry: The filename will be read from the specified registry key. The registry path must be under the HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER root key. The value name containing the filename must be "File Name". The file name can be specified with the path or without.

46292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 51: printer

6. Exact filename from the INI file: In this case the filename will be read from the specified INI file. The driver will search the INI file for a section with the printer’s name. Use the “File Name” key for the Filename. The file name can be specified with the path or without.

[Black Ice Color Printer]File name =C:\Output\page.tiff

7. Use the document name: The driver will use the document name the application passes to the driver when generating the name of the output image.

FilenameEnter the INI file name here, the registry path, or the file name depending on the selected file name generation method.

Filename PrefixThis is the prefix for the generated files if the “Use this prefix and extension ” setting is selected for the filename generation method. If the prefix is longer than 3 characters it will be truncated to the first 3 characters.

Filename ExtensionThis shows the current extension of the files. If the ‘Use custom extension’ setting is selected the default extension is changed with the string entered here.

Use custom extensionEnable/disable the custom file extension. If this is checked, the files will be generated with the extension entered in the ‘Filename Extension’ field. If it is unchecked, the default extension for the selected file format will be used.

Keep existing filesWhen the “Fixed filename” or “Use document name” methods are selected for filename generation, the files that exist in the output directory will be overwritten. Check this option to keep the files, so the new images will be added to the file. As a result, multi-page images will be created.

Output directoryIn this edit box you can specify the path where the driver will save the generated image files.The printer driver can handle long directory names like C:\My Documents\Printed Files\NOTE: On Terminal Server each user can use a separate output directory. Setting a separate output directory for each user can be done in two ways:

47292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 52: printer

a. Each user will set their own output directory manually by entering in this field the directory path they want to use. The user must have permission to set the printer.or

b. Specify the environment variable which contains a directory path. The environment variable name must be between “<<” and “>>” marks. I.e.: <<TEMP>>. The printer driver will use the value from the environment variable as the output directory. This environment variable should be specified for each user by the system administrator. The system administrator can add to the autoexec.bat the a SET command which uses the %USER% environment variable so this path will be unique for each user. I.e.:

SET TEMP=C:\Temp\%USER%

I.e. to specify the TEMP environment variable as output directory enter in this field: <<TEMP>>Note: If the specified environment variable is not found the printer driver will use by default the temp directory of the actual user to generate the image files.

Group File OptionsSettings referring to how the group files are handled. Check the Group File Options section for more details about the Group Files.

Disable Group FileIf this option is set, the driver will not generate group files.

Delete group file after printingIf this box is checked, the driver will automatically delete the group file when printing is finished. If the “Start Application” is checked, the printer driver will wait for the application to start and the started application message loop is ready to process messages. Once the application is started the driver will delete the group file.

48292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 53: printer

Start Application sheet

Enable Start ApplicationOn the Start Application tab, you can specify if the driver should launch an application when the user prints a document. The application can capture the printer messages or can manipulate the generated image files. Please refer to the Messaging Interface, Programming Interface and Group Files Description section in this manual for more detail.

Check the “Enable start application’” check box to enable the driver to launch an application or uncheck it to disable the application launching. If the specified application is already running, the printer driver will not start it again.

49292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 54: printer

ApplicationThe name of the application to be started. You must specify a valid application name and the full pathname (location of the application exe) (for example: e:\fax\test.exe). The printer driver can handle long file and directory names.

Start Before PrintingSelect this option to start the specified application before the printer driver starts printing. In this case the application will be able to capture and process the printer messages. Please refer to the Messaging Interface section in this manual for more detail.

Start After PrintingSelect this option to start your application after the printer driver finishes printing. This is the best solution when the application must manipulate the files that were created. For example: copying and processing, etc. Information about the generated files is saved by the driver in the group file. Please refer to the Group Files Description and the Programming Interface section in this manual for more detail.

Pass ParametersIf this is option is checked, the driver will pass parameters to the application that is started. Please refer to the Programming Interface section in this manual for more detail.

Show Application WindowDetermines how the application will be started. The available selections are:

Normal Minimized Hidden

Disable Messaging InterfaceChecking this option will stop the driver from broadcasting messages. Please refer to the Messaging Interface section in this manual for more detail.

50292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 55: printer

XP/W2K/NT and Terminal Server Color Driver

Driver FilesThe following files are needed in order for the driver to operate:- Windows\System\bi_color.drv: This is the driver file itself. It has to reside in the directory

returned by the GetPrinterDriverDirectory() API call, which is usually in the windows\system directory.

- Windows\System\cdrvres.dll: The driver loads the resources from this DLL. It must be in the same directory where the driver file is.

- Windows\System\tiff.dll: This DLL is used by the driver for TIFF file I/O. It has to be in the same directory where the driver file is.

- Windows\System\jpeg.dll: This DLL is used by the driver for TIFF file I/O. It has to be in the same directory where the driver file is.

Configuring the Driver on Windows XP/W2K/NT and Terminal ServerClicking with the right mouse button on the ‘Black Ice Color’ printer and selecting Properties will bring up the printer’s main setup dialog. The following sheets of the property dialog box (Device Setting, File Formats, Filename generation, and Start Application) contain the driver specific settings. The Details tab contains port specific settings.

51292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 56: printer

Device Settings sheet

Paper WidthPaper width is shown in the selected unit type of 0.01 inch, 0.1 mm, or a pixel.

Paper Height52

292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112© 1989 - 2001 Black Ice Software Inc.

Information Contained Is Not For Reproduction Or Distribution

Page 57: printer

Paper height is shown in the selected unit type of 0.01 inch, 0.1 mm, or a pixel.

UnitsThe units are the type of measurement used to describe the paper width and height. The units can be 0.01 inch, 0.1 mm (mm = millimeter), or a pixel.

Specifying the Paper SizeTo change the paper size, select the Paper size list box. The page sizes range from envelopes to large E size pages. Also, included is a user-definable variable page size. The page size can be specified in increments of 0.01 inch, 0.1 mm, or a pixel. There are 45 Standard paper sizes, 36 Advanced paper sizes, as well as 3 Black Ice Software specific paper sizes such as FAX paper size, VARIABLE paper size and VARIABLE paper size specified in pixels. - The “VARIABLE paper size” is specified by 0.01 inch or 0.1 mm. The formula to

compute between mm and pixels is mm = pixel x 254/DPI or pixel = mm x DPI/254. - The “VARIABLE paper size specified in pixels” can be any size in the boundary of the

Microsoft environment with a maximum width and height of 65535 x 65535 pixels. The DPI information will be ignored.

Please Note:

The “VARIABLE paper size specified in pixels” is a special case. Normally, page size times DPI is equal to the image size in pixels. With the “VARIABLE paper size specified in pixels” setting, the image size in pixels is absolute and the DPI can be set arbitrarily. The “VARIABLE paper size specified in pixels” setting can be very useful in web and graphic applications where the physical size of the image is the preeminent factor.

Page Sizes SupportedThe following page sizes are supported by the driver:

- Letter 8 1/2 x 11 in- Tabloid 11 x 17 in- Ledger 17 x 11 in- Legal 8 1/2 x 14 in- Statement 5 1/2 x 8 1/2 in- Executive 7 1/4 x 10 1/2 in- A3 297 x 420 mm- A4 210 x 297 mm- A4 Small 210 x 297 mm- A5 148 x 210 mm- B4 250 x 354- B5 182 x 257 mm

53292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 58: printer

- Folio 8 1/2 x 13 in- Quarto 215 x 275 mm- 10x14 in- 11x17 in- Note 8 1/2 x 11 in- Envelope #9 3 7/8 x 8 7/8- Envelope #10 4 1/8 x 9 ½- Envelope #11 4 1/2 x 10 3/8- Envelope #12 4 \276 x 11- Envelope #14 5 x 11 ½- C size sheet- D size sheet- E size sheet- Envelope DL 110 x 220mm- Envelope C5 162 x 229 mm- Envelope C3 324 x 458 mm- Envelope C4 229 x 324 mm- Envelope C6 114 x 162 mm- Envelope C65 114 x 229 mm- Envelope B4 250 x 353 mm- Envelope B5 176 x 250 mm- Envelope B6 176 x 125 mm- Envelope 110 x 230 mm- Envelope Monarch 3.875 x 7.5 in- 6 3/4 Envelope 3 5/8 x 6 1/2 in- US Std Fanfold 14 7/8 x 11 in- German Std Fanfold 8 1/2 x 12 in- German Legal Fanfold 8 1/2 x 13 in- Fax paper 8.64 x 11 in or 215 mm

If the ‘Create faxable image’ box is checked, only Fax and Legal paper sizes will be available. As a result, saved images can be faxed.

Add Fax HeaderThe value entered in the edit box will reduce the standard page height by the specified number of pixels. This option can be used to attach private page header information on the top of each page. For example, if the page height is 2200 pixels and the fax header field is set to 100, the generated image height will be 2100 pixels.

Create a Faxable ImageThis check box can be used to set the driver to automatically create images that have fax paper size and resolution. The paper sizes and graphic resolutions are not restricted, but the end result

54292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 59: printer

image file will have a fax-able page size and fax-compatible resolution. For example, if the page is Letter paper size and 600 DPI, the generated file width will be 1728 pixels.

Force FAX ResolutionIf the ‘Create Faxable image’ check is selected the driver to automatically create images that have fax paper size and resolution. The user can select the final resolution of the faxable image between 204x98 DPI (Standard Fax Resolution) and 204x196 DPI (Fine Fax Resolution).

What is Fax Paper Size? Many people confuse the US Letter or European A4 paper sizes with fax paper size. According to the ITU T.30 standard, the Fax page width is 215 mm or 1728 pixels, which is slightly different than the US Letter or A4 paper size. There are additional fax paper sizes such as 255 mm and 303 mm; however they are in not in use or there are very limited devices supporting them. If the 255mm or 303 mm paper size is needed, please use the “VARIABLE paper size” setting.

How is Page size computed and image size translated into pixels?Every page is defined in either millimeters or inches. The Microsoft DEVMODE data structure uses millimeters as the base for computation. The formula to compute between mm and pixels is mm = pixel x 254/DPI or pixel = mm x DPI/254.

Advanced Paper sizeEnable/Disable the advanced paper size listing in the “Paper” combo box. There are 35 paper sizes that are not commonly used. There are special circumstances where these paper sizes are useful. For example: Architects for drawing or International such as Japanese envelope size.

Specifying Page OrientationThe default page orientation (Portrait or Landscape) can be set on this sheet as well. The page orientation set here will be used for fax transmissions.If Landscape orientation is selected the driver will report landscape paper orientation to the printing application, but the image on the page will be rotated 90 degrees so that the actual saved image will still be in portrait orientation just like when you print in landscape mode. This makes it possible to fax a page printed in landscape orientation.

Rotate a Landscape Image to PortraitWhen landscape mode is selected this will rotate the generated landscape image 90 degrees so it can be printed. Also, this option is selected automatically when the “Create Faxable Image” setting is checked.

55292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 60: printer

Specifying Graphic ResolutionDefault resolution (typically measured in dots per inch, or DPI), for printing graphic images.Available resolutions are listed in the Graphics Resolution window. These modes are as follows:

204 x 98 DPI - Draft resolution (standard fax mode).204 x 196 DPI - Low resolution (fine fax mode).200x200 DPI - If the Fax Output check box is selected the resolution is 200x200 dpi

internally, but the image is stored as 204x196 dpi. This feature is useful when printing from an application that can’t print correctly when the horizontal and vertical resolution values are different. Selecting this setting will print the page correctly and the image can still be faxed.

300 x 300 DPI - Medium resolution. 600 x 600 DPI - High resolution. 1500x1500 DPI - The custom resolution can be set manually up to 1500 DPI in the

“Horizontal Resolution” and “Vertical Resolution” fields. The “Horizontal” and “Vertical” resolution fields are grayed out until you select “CUSTOM Resolution max(1500x1500)”. Warning: When using settings over 600 DPI one should consider memory usage.

The Driver also supports variable dot per inch (DPI) graphic resolution that can range from 50 DPI to 1500 DPI.

Please Note:For faxing, when selecting resolution, remember that increased resolution slows down transmission speed, while lower resolutions increase throughput at the cost of image quality.

Horizontal ResolutionShows the horizontal resolution setting. Also, when Custom resolution is selected, the required value can be entered.

Vertical ResolutionShows the vertical resolution setting. Also, when Custom resolution is selected the required value can be entered.

56292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 61: printer

Generated Image SizeDisplays the uncompressed image size in megabytes based on the current paper size, resolution and color depth.

57292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 62: printer

File Formats sheet

Specifying the File FormatClick on the File Format list box to select the output image file type for the driver. Click on the down arrow to scroll through the available selections.

The current selections are:

JPEG

58292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 63: printer

JPEG L*a*b Microsoft DIB (BMP) TIFF Uncompressed TIFF Group 3 1D TIFF Group 3 1D No EOL TIFF Group 3 2D TIFF Group 4 TIFF Packed TIFF LZW TIFF JPEG TIFF Group 3 1D PCX Image Format Intel DCX Image Format CALS RAW CCITT TIFF Group 3 1D RAW CCITT TIFF Group 3 1D No EOL RAW CCITT TIFF Group 3 2D RAW CCITT TIFF Group 4 Extended Metafile IBM MRR

JPEG Loss RatioThe quality of the JPEG file that is generated. This is only used for JPEG and JPEG Lab type files. A higher value equals higher quality; however the file size will be larger. Conversely, a lower value equals lower quality, but the file size will be smaller.

Color DepthThe color depth setting for the generated image. The value can be 1 bit, 8 bits, 8 bits grayscale and 24 bits.

The file types shown in the File Format combo box depends on this value. The user can only select from file types compatible with the current color depth setting. For example: if 1 bit is selected, the JPEG file type will not be shown.

Options

Create a multi page imageWhen this button is checked the driver will save every printed page in one image file. If it is unchecked all the pages printed will be generated in separate files. NOTE: This option is only supported by the TIFF (any type of TIFF) and DCX file formats.

59292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 64: printer

Disable imageCheck this option to disable the image file generation setting of the driver. This can be useful when the ‘Write text file’ is checked for text output and the image file is not needed. As a result, the driver will only generate a text file, no image files will be generated.

Eastern Character Support When this option is checked, the driver will interpret the contents of strings printed using the TextOut function as two-byte glyph indexes. This is necessary to correctly print characters of most non-US (Chinese, Japanese, etc.) versions of Windows 95. In this case, the characters printed are not valid one-byte ASCII values. The driver cannot save text files of any kind, therefore the Write text file, Position and Style Info, and Mail Merge options will be disabled.

Write Text FileWhen this option is checked, the driver will generate an ASCII text output along with the image file. The file will have the default .txt extension. If you want to change the extension, please refer to the Filename Extension section under the Filename Generation sheet.

The text file will also contain page delimiter information to mark where the new page is started. The page delimiter is an empty line, the ‘Page 1:’ text (where the number is the current page number) and another empty line :

Page 1:

Text on page 1

Page 2:

Text on page 2

Page 3:

Text on page 3

Mail MergeWhen this checkbox is checked, the driver will recognize special character sequences in the printed text to extract some of the information in a text file or to force the driver to start generating a new image file. This feature is useful when generating multi-page TIFF files from a large document using a custom printing application.

60292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 65: printer

The recognized character sequences all start with two ‘#’ characters. Most of these ‘commands’ will cause the driver to remove or alter the printed text and write it in the merged output file in text format. This file will have the same filename as the group file, with the MRG extension. The actual name of this file will be written in the group file in the following format:Merge Output=c:\aaaa1000.mrg

The recognized command sequences are as follows:

##~~ Lines starting with these four characters and ending with “~~” will not be printed, but written to the merged output file. For example, if the following string is sent to the driver: ##~~ Phone number=6031234321~~there will be an empty line printed in the output image file and the following line will be added to the merged output file:Phone number=6031234321 .

##** Lines starting with these four characters and ending with “**” will be partially printed and also written to the merged output file. If the string enclosed by the “**” marks contains an equation mark, the characters after the equation mark will be printed. Otherwise the whole string between the asterisks will be printed.Every character between the asterisks will be written to the merged output file.For example, if the following string is printed with the driver:##** Adressee=Company Name**the following will be written to the merged output file:Adressee=Company Nameand the following line will be printed to the output image file:Company Name

All of the above command lines must be printed as one continuous string from left to right. If they are printed one part at a time using several separate printing function calls, ( first printing “##~~” and then the rest of the line ) the driver may not be able to correctly recognize them.

The mail merge file will also contain page delimiter information to mark where the new page is started. The page delimiter is an empty line, the ‘Page 1:’ text (where the number is the current page number) and another empty line :

Page 1:

Page 2:

Page 3:

61292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 66: printer

This information will appear in the Mail Merge file even is there is no mail merge information in that particular the page.

Save Position and style info Checking this button will cause the driver to save additional formatting information in the text file. The text output is stored in the “[[X,Y][P][B,U,I]] text” format. The format starts with double brackets and ends with double brackets. The brackets can be used to parse the file. The format information has the following meaning:

X = The horizontal text coordinate.Y = The vertical text coordinate.P = The font size in points. B = The font in the text is bold.U = The font in the text is underlined.I = The font in the text is italic.

TIFF OptionsAll of the following settings are only available for TIFF files.

Internet TIFF formatIf TIFF file format is selected as the output image format and this box is checked, the driver will create a TIFF file that is compatible with the requirements listed in chapter 3 of RFC 2301 (File Format for Internet Fax ). (Not a chapter in this manual.) That chapter lists the required tags for black-and-white faxes. The extra tag the driver will include in the tiff file if this flag is checked is NEWSUBFILETYPE.

Reverse bit order in TIFFThis setting only has an effect on TIFF images.If this box is checked, the driver will save TIFF images with reverse bit order and also set the value of the FILLORDER tag in the image file to Reverse.GammaLink compatible TIFF output requires this setting to be checked, because they can only send TIFF images with reverse bit order.

Add Page Numbering TagThis setting only has an effect on TIFF images.If this box is checked, the driver will set the page number tag of every page in the output TIFF file.

62292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 67: printer

Photo QualityThe Photo Quality option enables or disables the dithering of the Black Ice driver. When Photo Quality is enabled, five high quality filters become accessible. Digital half-toning, also referred to as spatial dithering, produces the illusion of continuous-tone pictures on media that is only capable of displaying binary picture elements, for example: fax machines and most printers. Floyd-Steinberg and Jarvis-Judice-Ninke are the text book filters. The Smooth, Sharp, and Stucki filters are less known, but produce better quality output. Floyd-Steinberg is the default setting.

IntesityThe photo quality program group also contains a scroll bar that lets you control the intensity of the output image. The lower the Intensity value is, the darker the output image will be.

When should Photo Quality Output be used?Photo Quality output is designed primarily for faxing or to transmit color pictures on a monochrome device. When a color picture is faxed from a conventional desktop fax machine, the result is unrecognizable in most cases. On computer-generated faxes, the output quality can be increased to picture quality using the Black Ice printer driver.

How is performance affected by the Photo Quality output?The fastest filter is the Floyd-Steinberg, because it requires the least computation. Stucki is the slowest filter, but has the highest quality. The Stucki filter produces the best visible output.

63292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 68: printer

Filename Generation sheet

64292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 69: printer

Name Generation Method Select how you want the filename to be generated from the options in the combo box. The following options are available:

Use this prefix and extension Prefix and extension from the registry Prefix and extension from the INI file Exact filename Exact filename from the registry Exact filename from the INI file Use the document name

8. Use this prefix and extension: the output filename will be generated from random characters. The first three characters will be the characters specified in the ‘Filename Prefix’ edit box and random numbers will be added. NOTE: Only the first 3 characters from the ‘Filename Prefix’ field will be used, if it is longer the string will be truncated.

9. Prefix and extension from the registry: The file name prefix and the extension will be read from the specified registry key. The registry path must be under the HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER root key. Use the “File Name Prefix” value name for the file prefix and the “File Name extension” value name for the extension.

65292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 70: printer

10. Prefix and extension from the INI file: In this case the filename and the prefix will be read from the specified INI file. The driver will search in the INI file for a section width the printer name. Use the “File Name Prefix” key for the file prefix and the “File Name extension” key for the extension. You can search for an existing INI file, create a new one or edit the selected file using the browse […] and edit [Edit] buttons.

[Black Ice Color Printer]File name prefix=ABCFile name extension=TIFF

11. Exact filename: The printed file will be generated with the same name specified in the ‘Enter the filename’ edit box.

12. Exact filename from the registry: The filename will be read from the specified registry key. The registry path must be under the HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER root key. The value name containing the filename must be "File Name". The file name can be specified with the path or without.

66292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 71: printer

13. Exact filename from the INI file: In this case the filename will be read from the specified INI file. The driver will search the INI file for a section with the printer’s name. Use the “File Name” key for the Filename. The file name can be specified with the path or without.

[Black Ice Color Printer]File name =C:\Output\page.tiff

14. Use the document name: The driver will use the document name the application passes to the driver when generating the name of the output image.

FilenameEnter the INI file name here, the registry path, or the file name depending on the selected file name generation method.

Filename PrefixThis is the prefix for the generated files if the “Use this prefix and extension ” setting is selected for the filename generation method. If the prefix is longer than 3 characters it will be truncated to the first 3 characters.

Filename ExtensionThis shows the current extension of the files. If the ‘Use custom extension’ setting is selected the default extension is changed with the string entered here.

Use custom extensionEnable/disable the custom file extension. If this is checked, the files will be generated with the extension entered in the ‘Filename Extension’ field. If it is unchecked, the default extension for the selected file format will be used.

Keep existing filesWhen the “Fixed filename” or “Use document name” methods are selected for filename generation, the files that exist in the output directory will be overwritten. Check this option to keep the files, so the new images will be added to the file. As a result, multi-page images will be created.

Output directoryIn this edit box you can specify the path where the driver will save the generated image files.The printer driver can handle long directory names like C:\My Documents\Printed Files\NOTE: On Terminal Server each user can use a separate output directory. Setting a separate output directory for each user can be done in two ways:

67292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 72: printer

a. Each user will set their own output directory manually by entering in this field the directory path they want to use. The user must have permission to set the printer.or

b. Specify the environment variable which contains a directory path. The environment variable name must be between “<<” and “>>” marks. I.e.: <<TEMP>>. The printer driver will use the value from the environment variable as the output directory. This environment variable should be specified for each user by the system administrator. The system administrator can add to the autoexec.bat the a SET command which uses the %USER% environment variable so this path will be unique for each user. I.e.:

SET TEMP=C:\Temp\%USER%

I.e. to specify the TEMP environment variable as output directory enter in this field: <<TEMP>>Note: If the specified environment variable is not found the printer driver will use by default the temp directory of the actual user to generate the image files.

Group File OptionsSettings referring to how the group files are handled. Check the Group File Options section for more details about the Group Files.

Disable Group FileIf this option is set, the driver will not generate the group files.

Delete group file after printingIf this box is checked, the driver will automatically delete the group file when printing is finished. If the “Start Application” is checked, the printer driver will wait for the application to start and will then delete the group file.

68292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 73: printer

Start Application sheet

Enable Start ApplicationOn the Start Application tab, you can specify if the driver should launch an application when the user prints a document. The application can capture the printer messages or can manipulate the generated image files. Please refer to the Messaging Interface, Programming Interface and Group Files Description section in this manual for more detail.

69292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 74: printer

Check the “Enable start application’” check box to enable the driver to launch an application or uncheck it to disable the application launching. If the specified application is already running, the printer driver will not start it again.

ApplicationThe name of the application to be started. You must specify a valid application name and the full pathname (location of the application exe) (for example: e:\fax\test.exe). The printer driver can handle long file and directory names.

Start Before PrintingSelect this option to start the specified application before the printer driver starts printing. In this case the application will be able to capture and process the printer messages. Please refer to the Messaging Interface section in this manual for more detail.

Start After PrintingSelect this option to start your application after the printer driver finishes printing. This is the best solution when the application must manipulate the files that were created. For example: copying and processing, etc. Information about the generated files is saved by the driver in the group file. Please refer to the Group Files Description and the Programming Interface section in this manual for more detail.

Pass ParametersIf this is option is checked, the driver will pass parameters to the application that is started. Please refer to the Programming Interface section in this manual for more detail.

Show Application WindowDetermines how the application will be started. The available selections are:

Normal Minimized Hidden

Disable Messaging InterfaceChecking this option will stop the driver from broadcasting messages. Please refer to the Messaging Interface section in this manual for more detail.

70292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 75: printer

XP/W2K/NT and Terminal Server Metafile DriverDriver FilesThe following files are needed in order for the driver to operate:- Windows\System\metafile.drv: This is the driver file itself. It must reside in the directory

returned by the GetPrinterDriverDirectory() API call, which is usually in the windows\system directory.

Configuring the EMF (Metafile) Driver on Windows XP/W2K and NTClicking with the right mouse button on the ‘Black Ice Color’ printer and selecting Properties will bring up the printer’s main setup dialog. The following sheets of the property dialog box (Device Setting, Filename generation, and Start Application) contain the driver specific settings. The Details tab contains port specific settings.

71292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 76: printer

Device Settings sheet

Paper WidthPaper width is shown in the selected unit type of 0.01 inch, 0.1 mm, or a pixel.

Paper Height72

292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112© 1989 - 2001 Black Ice Software Inc.

Information Contained Is Not For Reproduction Or Distribution

Page 77: printer

Paper height is shown in the selected unit type of 0.01 inch, 0.1 mm, or a pixel.

UnitsThe units are the type of measurement used to describe the paper width and height. The units can be 0.01 inch, 0.1 mm (mm = millimeter), or a pixel.

Specifying the Paper SizeTo change the paper size, select the Paper size list box. The page sizes range from envelopes to large E size pages. Also, included is a user-definable variable page size. The page size can be specified in increments of 0.01 inch, 0.1 mm, or a pixel. There are 45 Standard paper sizes, 36 Advanced paper sizes, as well as 3 Black Ice Software specific paper sizes such as FAX paper size, VARIABLE paper size and VARIABLE paper size specified in pixels. - The “VARIABLE paper size” is specified by 0.01 inch or 0.1 mm. The formula to

compute between mm and pixels is mm = pixel x 254/DPI or pixel = mm x DPI/254. - The “VARIABLE paper size specified in pixels” can be any size in the boundary of the

Microsoft environment with a maximum width and height of 65535 x 65535 pixels. The DPI information will be ignored.

Please Note:

The “VARIABLE paper size specified in pixels” is a special case. Normally, page size times DPI is equal to the image size in pixels. With the “VARIABLE paper size specified in pixels” setting, the image size in pixels is absolute and the DPI can be set arbitrarily. The “VARIABLE paper size specified in pixels” setting can be very useful in web and graphic applications where the physical size of the image is the preeminent factor.

Page Sizes SupportedThe following page sizes are supported by the driver:

- Letter 8 1/2 x 11 in- Tabloid 11 x 17 in- Ledger 17 x 11 in- Legal 8 1/2 x 14 in- Statement 5 1/2 x 8 1/2 in- Executive 7 1/4 x 10 1/2 in- A3 297 x 420 mm- A4 210 x 297 mm- A4 Small 210 x 297 mm- A5 148 x 210 mm- B4 250 x 354- B5 182 x 257 mm- Folio 8 1/2 x 13 in

73292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 78: printer

- Quarto 215 x 275 mm- 10x14 in- 11x17 in- Note 8 1/2 x 11 in- Envelope #9 3 7/8 x 8 7/8- Envelope #10 4 1/8 x 9 ½- Envelope #11 4 1/2 x 10 3/8- Envelope #12 4 \276 x 11- Envelope #14 5 x 11 ½- C size sheet- D size sheet- E size sheet- Envelope DL 110 x 220mm- Envelope C5 162 x 229 mm- Envelope C3 324 x 458 mm- Envelope C4 229 x 324 mm- Envelope C6 114 x 162 mm- Envelope C65 114 x 229 mm- Envelope B4 250 x 353 mm- Envelope B5 176 x 250 mm- Envelope B6 176 x 125 mm- Envelope 110 x 230 mm- Envelope Monarch 3.875 x 7.5 in- 6 3/4 Envelope 3 5/8 x 6 1/2 in- US Std Fanfold 14 7/8 x 11 in- German Std Fanfold 8 1/2 x 12 in- German Legal Fanfold 8 1/2 x 13 in- Fax paper 8.64 x 11 in or 215 mm

If the ‘Create faxable image’ box is checked, only Fax and Legal paper sizes will be available. As a result, saved images can be faxed.

Add Fax HeaderThe value entered in the edit box will reduce the standard page height by the specified number of pixels. This option can be used to attach private page header information on the top of each page. For example, if the page height is 2200 pixels and the fax header field is set to 100, the generated image height will be 2100 pixels.

Create a Faxable ImageThis option is not available in the EMF printer driver.

74292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 79: printer

Force FAX ResolutionThis option is not available in the EMF printer driver.

What is Fax Paper Size? Many people confuse the US Letter or European A4 paper sizes with fax paper size. According to the ITU T.30 standard, the Fax page width is 215 mm or 1728 pixels, which is slightly different than the US Letter or A4 paper size. There are additional fax paper sizes such as 255 mm and 303 mm; however they are in not in use or there are very limited devices supporting them. If the 255mm or 303 mm paper size is needed, please use the “VARIABLE paper size” setting.

How is Page size computed and image size translated into pixels? Every page is defined in either millimeters or inches. The Microsoft DEVMODE data structure uses millimeters as the base for computation. The formula to compute between mm and pixels is mm = pixel x 254/DPI or pixel = mm x DPI/254.

Advanced Paper sizeEnable/Disable the advanced paper size listing in the “Paper” combo box. There are 35 paper sizes that are not commonly used. There are special circumstances where these paper sizes are useful. For example: Architects for drawing or International such as Japanese envelope size.

Specifying Page OrientationThe default page orientation (Portrait or Landscape) can be set on this sheet as well. The page orientation set here will be used for fax transmissions.If Landscape orientation is selected the driver will report landscape paper orientation to the printing application, but the image on the page will be rotated 90 degrees so that the actual saved image will still be in portrait orientation just like when you print in landscape mode. This makes it possible to fax a page printed in landscape orientation.

Rotate a Landscape Image to PortraitWhen landscape mode is selected this will rotate the generated landscape image 90 degrees so it can be printed. Also, this option is selected automatically when the “Create Faxable Image” setting is checked.

Specifying Graphic ResolutionDefault resolution (typically measured in dots per inch, or DPI), for printing graphic images.Available resolutions are listed in the Graphics Resolution window. These modes are as follows:

75292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 80: printer

204 x 98 DPI - Draft resolution (standard fax mode).204 x 196 DPI - Low resolution (fine fax mode).200x200 DPI - If the Fax Output check box is selected the resolution is 200x200 dpi

internally, but the image is stored as 204x196 dpi. This feature is useful when printing from an application that can’t print correctly when the horizontal and vertical resolution values are different. Selecting this setting will print the page correctly and the image can still be faxed.

300 x 300 DPI - Medium resolution. 600 x 600 DPI - High resolution. 1500x1500 DPI - The custom resolution can be set manually up to 1500 DPI in the

“Horizontal Resolution” and “Vertical Resolution” fields. The “Horizontal” and “Vertical” resolution fields are grayed out until you select “CUSTOM Resolution max(1500x1500)”. Warning: When using settings over 600 DPI one should consider memory usage.

The Driver also supports variable dot per inch (DPI) graphic resolution that can range from 50 DPI to 1500 DPI.

Please Note:For faxing, when selecting resolution, remember that increased resolution slows down transmission speed, while lower resolutions increase throughput at the cost of image quality.

Horizontal ResolutionShows the horizontal resolution setting. Also, when Custom resolution is selected, the required value can be entered.

Vertical ResolutionShows the vertical resolution setting. Also, when Custom resolution is selected the required value can be entered.

Generated Image SizeDisplays the uncompressed image size in megabytes based on the current paper size, resolution and color depth.

76292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 81: printer

File Formats sheet

Specifying the File FormatThe only file formats available are EMF and Text output.

Options

77292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 82: printer

Disable imageCheck this option to disable the image file generation setting of the driver. This can be useful when the ‘Write text file’ radio button is checked for text output and the image file is not needed. As a result, the driver will only generate a text file, no image files will be generated.

Eastern Character Support When this option is checked, the driver will interpret the contents of strings printed using the TextOut function as two-byte glyph indexes. This is necessary to correctly print characters of most non-US (Chinese, Japanese, etc.) versions of Windows 95/98/ME. In this case, the characters printed are not valid one-byte ASCII values. The driver cannot save text files of any kind, therefore the Write text file, Position and Style Info, and Mail Merge options will be disabled.

Write Text FileWhen this option is checked, the driver will generate an ASCII text output along with the image file. The file will have the default .txt extension. If you want to change the extension, please refer to the Filename Extension section under the Filename Generation sheet.

The text file will also contain page delimiter information to mark where the new page is started. The page delimiter is an empty line, the ‘Page 1:’ text (where the number is the current page number) and another empty line :

Page 1:

Text on page 1

Page 2:

Text on page 2

Page 3:

Text on page 3

Mail MergeWhen this checkbox is checked, the driver will recognize special character sequences in the printed text to extract some of the information in a text file or to force the driver to start generating a new image file. This feature is useful when generating multi-page TIFF files from a large document using a custom printing application.

78292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 83: printer

The recognized character sequences all start with two ‘#’ characters. Most of these ‘commands’ will cause the driver to remove or alter the printed text and write it in the merged output file in text format. This file will have the same filename as the group file, with the MRG extension. The actual name of this file will be written in the group file in the following format:Merge Output=c:\aaaa1000.mrg

The recognized command sequences are as follows:

##~~ Lines starting with these four characters and ending with “~~” will not be printed, but written to the merged output file. For example, if the following string is sent to the driver: ##~~ Phone number=6031234321~~there will be an empty line printed in the output image file and the following line will be added to the merged output file:Phone number=6031234321 .

##** Lines starting with these four characters and ending with “**” will be partially printed and also written to the merged output file. If the string enclosed by the “**” marks contains an equation mark, the characters after the equation mark will be printed. Otherwise the whole string between the asterisks will be printed.Every character between the asterisks will be written to the merged output file.For example, if the following string is printed with the driver:##** Adressee=Company Name**the following will be written to the merged output file:Adressee=Company Nameand the following line will be printed to the output image file:Company Name

All of the above command lines must be printed as one continuous string from left to right. If they are printed one part at a time using several separate printing function calls, ( first printing “##~~” and then the rest of the line ) the driver may not be able to correctly recognize them.

The mail merge file will also contain page delimiter information to mark where the new page is started. The page delimiter is an empty line, the ‘Page 1:’ text (where the number is the current page number) and another empty line :

Page 1:

Page 2:

Page 3:

79292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 84: printer

This information will appear in the Mail Merge file even is there is no mail merge information in that particular the page.

Save Position and style info Checking this button will cause the driver to save additional formatting information in the text file. The text output is stored in the “[[X,Y][P][B,U,I]] text” format. The format starts with double brackets and ends with double brackets. The brackets can be used to parse the file. The format information has the following meaning:

X = The horizontal text coordinate.Y = The vertical text coordinate.P = The font size in points. B = The font in the text is bold.U = The font in the text is underlined.I = The font in the text is italic.

80292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 85: printer

Filename Generation sheet

81292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 86: printer

Name Generation Method Select how you want the filename to be generated from the options in the combo box. The following options are available:

Use this prefix and extension Prefix and extension from the registry Prefix and extension from the INI file Exact filename Exact filename from the registry Exact filename from the INI file Use the document name

15. Use this prefix and extension: the output filename will be generated from random characters. The first three characters will be the characters specified in the ‘Filename Prefix’ edit box and random numbers will be added. NOTE: Only the first 3 characters from the ‘Filename Prefix’ field will be used, if it is longer the string will be truncated.

16. Prefix and extension from the registry: The file name prefix and the extension will be read from the specified registry key. The registry path must be under the HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER root key. Use the “File Name Prefix” value name for the file prefix and the “File Name extension” value name for the extension.

82292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 87: printer

17. Prefix and extension from the INI file: In this case the filename and the prefix will be read from the specified INI file. The driver will search in the INI file for a section width the printer name. Use the “File Name Prefix” key for the file prefix and the “File Name extension” key for the extension. You can search for an existing INI file, create a new one or edit the selected file using the browse […] and edit [Edit] buttons.

[Black Ice Color Printer]File name prefix=ABCFile name extension=TIFF

18. Exact filename: The printed file will be generated with the same name specified in the ‘Enter the filename’ edit box.

19. Exact filename from the registry: The filename will be read from the specified registry key. The registry path must be under the HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER root key. The value name containing the filename must be "File Name". The file name can be specified with the path or without.

83292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 88: printer

20. Exact filename from the INI file: In this case the filename will be read from the specified INI file. The driver will search the INI file for a section with the printer’s name. Use the “File Name” key for the Filename. The file name can be specified with the path or without.

[Black Ice Color Printer]File name =C:\Output\page.tiff

21. Use the document name: The driver will use the document name the application passes to the driver when generating the name of the output image.

FilenameEnter the INI file name here, the registry path, or the file name depending on the selected file name generation method.

Filename PrefixThis is the prefix for the generated files if the “Use this prefix and extension ” setting is selected for the filename generation method. If the prefix is longer than 3 characters it will be truncated to the first 3 characters.

Filename ExtensionThis shows the current extension of the files. If the ‘Use custom extension’ setting is selected the default extension is changed with the string entered here.

Use custom extensionEnable/disable the custom file extension. If this is checked, the files will be generated with the extension entered in the ‘Filename Extension’ field. If it is unchecked, the default extension for the selected file format will be used.

Keep existing filesWhen the “Fixed filename” or “Use document name” methods are selected for filename generation, the files that exist in the output directory will be overwritten. Check this option to keep the files, so the new images will be added to the file. As a result, multi-page images will be created.

Output directoryIn this edit box you can specify the path where the driver will save the generated image files.The printer driver can handle long directory names like C:\My Documents\Printed Files\NOTE: On Terminal Server each user can use a separate output directory. Setting a separate output directory for each user can be done in two ways:

84292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 89: printer

a. Each user will set their own output directory manually by entering in this field the directory path they want to use. The user must have permission to set the printer.or

b. Specify the environment variable which contains a directory path. The environment variable name must be between “<<” and “>>” marks. I.e.: <<TEMP>>. The printer driver will use the value from the environment variable as the output directory. This environment variable should be specified for each user by the system administrator. The system administrator can add to the autoexec.bat the a SET command which uses the %USER% environment variable so this path will be unique for each user. I.e.:

SET TEMP=C:\Temp\%USER%

I.e. to specify the TEMP environment variable as output directory enter in this field: <<TEMP>>Note: If the specified environment variable is not found the printer driver will use by default the temp directory of the actual user to generate the image files.

Group File OptionsSettings referring to how the group files are handled. Check the Group File Options section for more details about the Group Files.

Disable Group FileIf this option is set, the driver will not generate the group files.

Delete group file after printingIf this box is checked, the driver will automatically delete the group file when printing is finished. If the “Start Application” is checked, the printer driver will wait for the application to start and will then delete the group file.

85292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 90: printer

Start Application sheet

Enable Start ApplicationOn the Start Application tab, you can specify if the driver should launch an application when the user prints a document. The application can capture the printer messages, or can manipulate

86292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 91: printer

the generated image files. Please refer to the Messaging Interface, Programming Interface and Group Files Description section in this manual for more detail.

Check the “Enable start application’” check box to enable the driver to launch an application or uncheck it to disable the application launching. If the specified application is already running, the printer driver will not start it again.

ApplicationThe name of the application to be started. You must specify a valid application name and the full pathname (location of the application exe) (for example: e:\fax\test.exe). The printer driver can handle long file and directory names.

Start Before PrintingSelect this option to start the specified application before the printer driver starts printing. In this case the application will be able to capture and process the printer messages. Please refer to the Messaging Interface section in this manual for more detail.

Start After PrintingSelect this option to start your application after the printer driver finishes printing. This is the best solution when the application must manipulate the files that were created. For example: copying and processing, etc. Information about the generated files is saved by the driver in the group file. Please refer to the Group Files Description and the Programming Interface section in this manual for more detail.

Pass ParametersIf this is option is checked, the driver will pass parameters to the application that is started. Please refer to the Programming Interface section in this manual for more detail.

Show Application WindowDetermines how the application will be started. The available selections are:

Normal Minimized Hidden

Disable Messaging InterfaceChecking this option will stop the driver from broadcasting messages. Please refer to the Messaging Interface section in this manual for more detail.

87292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 92: printer

The Programming Interface Programming Interface The Black Ice printer driver has a programming interface. Through this interface all the printer settings can be read, changed and written programmatically, however they should never be accessed directly, just through the designated functions. All these functions are declared in the devmode.h file and are implemented in the devmode.cpp file.The printer driver settings are stored in a data structure named BlackIceDEVMODE. The BlackIceDEVMODE data structure contains information about the device initialization and environment of a printer.

On Windows XP/W2K and NT, the string members of the BlackIceDEVMODE structure are UNICODE strings. When the application reads or writes these members it is very important to use UNICODE strings.

Project settings for the XP/W2k/NT and Terminal Server To correctly handle the BlackIceDEVMODE the project must have the following settings:

1. The Structure Member Alignment must be 1 byte

2. The following preprocessor definitions must be used: _UNICODE, UNICODE, _WIN32_WINNT=0x0400

To open the Project Settings in the Visual C++ 6.0 environment the go to the ‘Project” menu, ‘Settings’ menu item or press ALT+F7. On the window which appears select the C/C++ tab.

To set the Structure Member Alignment, from the ‘Category’ drop down list select the ‘Code Generation’ option. Set the ‘Structure Member Alignment’ to 1 byte.

To set the preprocessor definitions, from the ‘Category’ drop down list select the ‘General’ option. Enter the _UNICODE, UNICODE, _WIN32_WINNT=0x0400 defines into the ‘preprocessor definitions:’ field.

88292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 93: printer

How printers store their settings on Windows NT, Windows 2000 and Windows XP?Every printer stores all of it’s settings in the DEVMODE structure and stores the DEVMODE structure in the registry. The DEVMODE structure consists of a standard section and a printer specific section. The standard section or Windows DEVMODE contains all the common printer settings like paper size and orientation. The printer specific section contains all the manufacturer specific settings. For the Black Ice printers both the standard and the printer specific DEVMODE sturcture is defined in the BlackIceDEVMODE structure. All the members of this structure are described in this chapter.

There is a difference on how the different operating systems handle the DEVMODE structure, therefore each operating system is described separately.

Windows NT:

Windows NT only stores one copy of the DEVMODE structure in the registry. This DEVMODE structure describes all the printer settings used by every user and every application. These settings can be changed only by a User with administrative privileges or by a User whom the Administrator gave rights to change the printer settings.

Every time an application wants to print to the printer, it will read the printer’s default settings and depending on how the application wants to print, can use the default settings or it can change some of the settings. Changes made in the printer settings by using an application’s Printer properties dialog will not change the printer settings globally. The changes will be made for that given instance of the application only.

Windows 2000/XP

Windows 2000/XP stores more than one copy of the DEVMODE structure in the registry. There are default printer settings and User specific printer settings.

To set the printer’s default parameters, the Administrator has to select the printer’s Properties in the Printers window, select the Advanced tab and click the Printing Defaults button.

The User specific settings are stored separately for each User in the User’s HKEY_CURRENT_USER registry key.

By default, the User specific settings are inherited from the printer’s default settings. To change the User specific printer settings the User has to select Printing preferences or Properties-> Printing

89292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 94: printer

preferences and modify the settings he wants to change. All the modifications will affect the given User only. On Windows XP User’s have to have rights to modify User specific printer settings.

Every time an application wants to print to the printer, it will read the User specific printer settings and depending on how the application wants to print, can use these settings or it can change some of the settings. Changes made in the printer settings by using an application’s Printer properties dialog will not change the printer settings globally. The changes will be made for that given instance of the application only.

Windows DEVMODEThe Black Ice Printer Drivers are using a BlackIceDEVMODE data structure based on the default Windows DEVMODE data structure:

typedef struct _devicemode { BCHAR dmDeviceName[CCHDEVICENAME]; WORD dmSpecVersion; WORD dmDriverVersion; WORD dmSize; WORD dmDriverExtra; DWORD dmFields; union { struct { short dmOrientation; short dmPaperSize; short dmPaperLength; short dmPaperWidth; }; POINTL dmPosition; }; short dmScale; short dmCopies; short dmDefaultSource; short dmPrintQuality; short dmColor; short dmDuplex; short dmYResolution; short dmTTOption; short dmCollate; BCHAR dmFormName[CCHFORMNAME]; WORD dmLogPixels; DWORD dmBitsPerPel; DWORD dmPelsWidth; DWORD dmPelsHeight; union { DWORD dmDisplayFlags; DWORD dmNup; } DWORD dmDisplayFrequency; DWORD dmICMMethod;

90292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 95: printer

DWORD dmICMIntent; DWORD dmMediaType; DWORD dmDitherType; DWORD dmReserved1; DWORD dmReserved2;} DEVMODE;

Members OF THE WINDOWS DEVMODE

dmDeviceName Specifies the the "friendly" name of the printer; for example, "PCL/HP LaserJet" in the case of a PCL/HP LaserJet®. This string is unique among device drivers. Note that this name may be truncated to fit in the dmDeviceName array.

dmSpecVersion Specifies the version number of the initialization data specification on which the structure is based. To ensure the correct version is used for any operating system, use DM_SPECVERSION.

dmDriverVersion Specifies the printer driver version number assigned by the printer driver developer.

dmSize Specifies the size, in bytes, of the DEVMODE structure, not including any private driver-specific data that might follow the structure's public members. Set this member to sizeof(DEVMODE) to indicate the version of the DEVMODE structure being used.

dmDriverExtra Contains the number of bytes of private driver-data that follow this structure. If a device driver does not use device-specific information, set this member to zero.

dmFields Specifies whether certain members of the DEVMODE structure have been initialized. If a member is initialized, it’s corresponding bit is set, otherwise the bit is clear. A printer driver supports only those DEVMODE members that are appropriate for the printer technology.

The following values are defined, and are listed here with the corresponding structure members.

Value Structure memberDM_ORIENTATION dmOrientationDM_PAPERSIZE dmPaperSizeDM_PAPERLENGTH dmPaperLengthDM_PAPERWIDTH dmPaperWidthDM_POSITION dmPositionDM_SCALE dmScaleDM_COPIES dmCopies

91292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 96: printer

DM_DEFAULTSOURCE dmDefaultSourceDM_PRINTQUALITY dmPrintQualityDM_COLOR dmColorDM_DUPLEX dmDuplexDM_YRESOLUTION dmYResolutionDM_TTOPTION dmTTOptionDM_COLLATE dmCollateDM_FORMNAME dmFormNameDM_LOGPIXELS dmLogPixelsDM_BITSPERPEL dmBitsPerPelDM_PELSWIDTH dmPelsWidthDM_PELSHEIGHT dmPelsHeightDM_DISPLAYFLAGS dmDisplayFlagsDM_NUP dmNupDM_DISPLAYFREQUENCY dmDisplayFrequencyDM_ICMMETHOD dmICMMethodDM_ICMINTENT dmICMIntentDM_MEDIATYPE dmMediaTypeDM_DITHERTYPE dmDitherTypeDM_PANNINGWIDTH Windows 2000 or later: dmPanningWidthDM_PANNINGHEIGHT Windows 2000 or later: dmPanningHeight

dmOrientation For printer devices only, selects the orientation of the paper. This member can be either DMORIENT_PORTRAIT (1) or DMORIENT_LANDSCAPE (2).

dmPaperSize For printer devices only, selects the size of the paper to print on. This member can be set to zero if the length and width of the paper are both set by the dmPaperLength and dmPaperWidth members. Otherwise, the dmPaperSize member can be set to one of the following predefined values.

#define DMPAPER_FAX DMPAPER_USER+1 #define DMPAPER_VARIABLE DMPAPER_USER+2#define DMPAPER_VARIABLE_PIXEL DMPAPER_USER+3

#define DMPAPER_LETTER 1 /* Letter 8 1/2 x 11 in */#define DMPAPER_LETTERSMALL 2 /* Letter Small 8 1/2 x 11 in */#define DMPAPER_TABLOID 3 /* Tabloid 11 x 17 in */#define DMPAPER_LEDGER 4 /* Ledger 17 x 11 in */#define DMPAPER_LEGAL 5 /* Legal 8 1/2 x 14 in */#define DMPAPER_STATEMENT 6 /* Statement 5 1/2 x 8 1/2 in */#define DMPAPER_EXECUTIVE 7 /* Executive 7 1/4 x 10 1/2 in */#define DMPAPER_A3 8 /* A3 297 x 420 mm */#define DMPAPER_A4 9 /* A4 210 x 297 mm */

92292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 97: printer

#define DMPAPER_A4SMALL 10 /* A4 Small 210 x 297 mm */#define DMPAPER_A5 11 /* A5 148 x 210 mm */#define DMPAPER_B4 12 /* B4 (JIS) 257 x 364 mm */#define DMPAPER_B5 13 /* B5 (JIS) 182 x 257 mm */#define DMPAPER_FOLIO 14 /* Folio 8 1/2 x 13 in */#define DMPAPER_QUARTO 15 /* Quarto 215 x 275 mm */#define DMPAPER_10X14 16 /* 10 x 14 in */#define DMPAPER_11X17 17 /* 11 x 17 in */#define DMPAPER_NOTE 18 /* Note 8 1/2 x 11 in */#define DMPAPER_ENV_9 19 /* Envelope #9 3 7/8 x 8 7/8 in */#define DMPAPER_ENV_10 20 /* Envelope #10 4 1/8 x 9 1/2 in */#define DMPAPER_ENV_11 21 /* Envelope #11 4 1/2 x 10 3/8 in */#define DMPAPER_ENV_12 22 /* Envelope #12 4 3/4 x 11 in */#define DMPAPER_ENV_14 23 /* Envelope #14 5 x 11 1/2 in */#define DMPAPER_CSHEET 24 /* C size sheet */#define DMPAPER_DSHEET 25 /* D size sheet */#define DMPAPER_ESHEET 26 /* E size sheet */#define DMPAPER_ENV_DL 27 /* Envelope DL 110 x 220 mm */#define DMPAPER_ENV_C5 28 /* Envelope C5 162 x 229 mm */#define DMPAPER_ENV_C3 29 /* Envelope C3 324 x 458 mm */#define DMPAPER_ENV_C4 30 /* Envelope C4 229 x 324 mm */#define DMPAPER_ENV_C6 31 /* Envelope C6 114 x 162 mm */#define DMPAPER_ENV_C65 32 /* Envelope C65 114 x 229 mm */#define DMPAPER_ENV_B4 33 /* Envelope B4 250 x 353 mm */#define DMPAPER_ENV_B5 34 /* Envelope B5 176 x 250 mm */#define DMPAPER_ENV_B6 35 /* Envelope B6 176 x 125 mm */#define DMPAPER_ENV_ITALY 36 /* Envelope 110 x 230 mm */#define DMPAPER_ENV_MONARCH 37 /* Envelope Monarch 3 7/8 x 7 1/2 in */#define DMPAPER_ENV_PERSONAL 38 /* 6 3/4 Envelope 3 5/8 x 6 1/2 in */#define DMPAPER_FANFOLD_US 39 /* US Standard Fanfold 14 7/8 x 11 in */#define DMPAPER_FANFOLD_STD_GERMAN 40 /* German Standard Fanfold 8 1/2 x 12 in */#define DMPAPER_FANFOLD_LGL_GERMAN 41 /* German Legal Fanfold 8 1/2 x 13 in */#define DMPAPER_ISO_B4 42 /* B4 (ISO) 250 x 353 mm */#define DMPAPER_JAPANESE_POSTCARD 43 /* Japanese Postcard 100 x 148 mm */#define DMPAPER_9X11 44 /* 9 x 11 in */#define DMPAPER_10X11 45 /* 10 x 11 in */#define DMPAPER_15X11 46 /* 15 x 11 in */#define DMPAPER_ENV_INVITE 47 /* Envelope Invite 220 x 220 mm */#define DMPAPER_RESERVED_48 48 /* RESERVED--DO NOT USE */#define DMPAPER_RESERVED_49 49 /* RESERVED--DO NOT USE */#define DMPAPER_LETTER_EXTRA 50 /* Letter Extra 9 1/2 x 12 in */#define DMPAPER_LEGAL_EXTRA 51 /* Legal Extra 9 1/2 x 15 in */#define DMPAPER_TABLOID_EXTRA 52 /* Tabloid Extra 11.69 x 18 in */#define DMPAPER_A4_EXTRA 53 /* A4 Extra 9.27 x 12.69 in */#define DMPAPER_LETTER_TRANSVERSE 54 /* Letter Transverse 8 1/2 x 11 in */#define DMPAPER_A4_TRANSVERSE 55 /* A4 Transverse 210 x 297 mm */#define DMPAPER_LETTER_EXTRA_TRANSVERSE 56 /*Letter Extra Transverse 9 1/2x12 in*/#define DMPAPER_A_PLUS 57 /* SuperA/SuperA/A4 227 x 356 mm */#define DMPAPER_B_PLUS 58 /* SuperB/SuperB/A3 305 x 487 mm */#define DMPAPER_LETTER_PLUS 59 /* Letter Plus 8.5 x 12.69 in */#define DMPAPER_A4_PLUS 60 /* A4 Plus 210 x 330 mm */#define DMPAPER_A5_TRANSVERSE 61 /* A5 Transverse 148 x 210 mm */#define DMPAPER_B5_TRANSVERSE 62 /* B5 (JIS) Transverse 182 x 257 mm */#define DMPAPER_A3_EXTRA 63 /* A3 Extra 322 x 445 mm */#define DMPAPER_A5_EXTRA 64 /* A5 Extra 174 x 235 mm */

#define DMPAPER_A0 DMPAPER_USER+4 /* A0 840 x 1180 mm */#define DMPAPER_A1 DMPAPER_USER+5 /* A0 594 x 840 mm */ #define DMPAPER_ASHEET DMPAPER_USER+6 /* A Sheet 215 x 279 mm */

93292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 98: printer

#define DMPAPER_BSHEET DMPAPER_USER+7 /* B Sheet 239 x 431 mm */#define DMPAPER_FSHEET DMPAPER_USER+8 /* F Sheet 711 x 1016 mm */#define DMPAPER_GSHEET DMPAPER_USER+9 /* G Sheet 279 x 571 mm */#define DMPAPER_HSHEET DMPAPER_USER+11 /* H Sheet 711 x 1117 mm */#define DMPAPER_JSHEET DMPAPER_USER+12 /* J Sheet 863 x 1397 mm */#define DMPAPER_KSHEET DMPAPER_USER+13 /* K Sheet 1016 x 1592 mm */#define DMPAPER_AASHEET DMPAPER_USER+14 /* AA Sheet 228 x 304 mm */#define DMPAPER_BASHEET DMPAPER_USER+15 /* BA Sheet 304 x 457 mm */#define DMPAPER_CASHEET DMPAPER_USER+16 /* CA Sheet 457 x 609 mm */#define DMPAPER_DASHEET DMPAPER_USER+17 /* DA Sheet 609 x 965 mm */#define DMPAPER_EASHEET DMPAPER_USER+18 /* EA Sheet 965 x 1219 mm */

dmPaperLength For printer devices only, this overrides the length of the paper specified by the dmPaperSize member, either for custom paper sizes or for devices such as dot-matrix printers that can print on a page of arbitrary length. These values, along with all other values in this structure that specify a physical length, are in tenths of a millimeter.

dmPaperWidth For printer devices only, this overrides the width of the paper specified by the dmPaperSize member.

dmPosition Windows 95/98/ME, Windows 2000/XP or later: For display devices only, a POINTL structure that indicates the positional coordinates of the display device in reference to the desktop area. The primary display device is always located at coordinates (0,0).

dmScale Specifies the factor by which the printed output is to be scaled. The apparent page size is scaled from the physical page size by a factor of dmScale/100. For example, a letter-sized page with a dmScale value of 50 will contain as much data as a 17 by 22 inch page, because the output text and graphics would be half their original height and width.

dmCopies Selects the number of copies printed if the device supports multiple-page copies.

dmDefaultSource Specifies the paper source. To retrieve a list of the available paper sources for a printer, use the DeviceCapabilities function with the DC_BINS flag.

This member can be one of the following values, or it can be a device-specific value greater than or equal to DMBIN_USER.

DMBIN_ONLYONEDMBIN_LOWERDMBIN_MIDDLEDMBIN_MANUALDMBIN_ENVELOPEDMBIN_ENVMANUALDMBIN_AUTO DMBIN_TRACTORDMBIN_SMALLFMT

94292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 99: printer

DMBIN_LARGEFMT DMBIN_LARGECAPACITYDMBIN_CASSETTEDMBIN_FORMSOURCE

dmPrintQuality Specifies the printer resolution. There are four predefined device-independent values:

DMRES_HIGHDMRES_MEDIUMDMRES_LOWDMRES_DRAFT

If a positive value is specified, it specifies the number of dots per inch (DPI) and is therefore device dependent.

dmColor Switches between color and monochrome on color printers. The following values are possible:

DMCOLOR_COLORDMCOLOR_MONOCHROME

dmDuplex Selects duplex or double-sided printing for printers capable of duplex printing. The following values are possible:

Value MeaningDMDUP_SIMPLEX Normal (non-duplex) printing.DMDUP_HORIZONTAL Short-edge binding, that is, the long edge of

the page is horizontal. DMDUP_VERTICAL Long-edge binding, that is, the long edge of

the page is vertical.

dmYResolution Specifies the y-resolution, in dots per inch, of the printer. If the printer initializes this member, the dmPrintQuality member specifies the x-resolution, in dots per inch of the printer.

dmTTOption Specifies how TrueType® fonts should be printed. This member can be one of the following values.

Value Meaning

95292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 100: printer

DMTT_BITMAP Prints TrueType fonts as graphics. This is the default action for dot-matrix printers.

DMTT_DOWNLOAD Downloads TrueType fonts as soft fonts. This is the default action for Hewlett-Packard printers that use Printer Control Language (PCL).

DMTT_DOWNLOAD_OUTLINE Window 95/98, Windows NT 4.0, and later: Downloads TrueType fonts as outline soft fonts.

DMTT_SUBDEV Substitutes device fonts for TrueType fonts. This is the default action for PostScript® printers.

dmUnusedPadding Used to align the structure to a DWORD boundary. This should not be used or referenced. It’s name and usage is reserved and can change in future releases.

dmCollate Specifies whether collation should be used when printing multiple copies. (This member is ignored unless the printer driver indicates support for collation by setting the dmFields member to DM_COLLATE.) This member can be be one of the following values.

Value MeaningDMCOLLATE_TRUE Collate when printing multiple copies.DMCOLLATE_FALSE Do not collate when printing multiple copies.

Using DMCOLLATE_TRUE provides faster, more efficient output for collation, since the data is sent to the device driver just once, no matter how many copies are required. The printer is told to simply print the page again.

dmFormName Windows XP/W2K and NT or later: Specifies the name of the form to use; for example, "Letter" or "Legal". A complete set of names can be retrieved by using the EnumForms function.

Windows 95: Printer drivers do not use this member.

dmLogPixels Specifies the number of pixels per logical inch. Printer drivers do not use this member.

dmBitsPerPel Specifies the color resolution, in bits per pixel, of the display device (for example: 4 bits for 16 colors, 8 bits for 256 colors, or 16 bits for 65,536 colors). For example, display drivers use this member in the ChangeDisplaySettings function. Printer drivers do not use this member.

dmPelsWidth

96292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 101: printer

Specifies the width, in pixels, of the visible device surface. For example, display drivers use this member in the ChangeDisplaySettings function. Printer drivers do not use this member.

dmPelsHeight Specifies the height, in pixels, of the visible device surface. For example, display drivers use this member in the ChangeDisplaySettings function. Printer drivers do not use this member.

dmDisplayFlags Specifies the device's display mode. This member can be a combination of the following values.

Value MeaningDM_GRAYSCALE Specifies that the display is a non-color device. If this flag is not

set, color is assumed.DM_INTERLACED Specifies that the display mode is interlaced. If the flag is not

set, non-interlaced is assumed.

For example, display drivers use this member in the ChangeDisplaySettings function. Printer drivers do not use this member.

dmNup Specifies where the NUP is done. It can be one of the following.

Value MeaningDMNUP_SYSTEM The print spooler does the NUP. DMNUP_ONEUP The application does the NUP.

dmDisplayFrequency Specifies the frequency, in hertz (cycles per second), of the display device in a particular mode. This value is also known as the display device's vertical refresh rate. Display drivers use this member. For example, it is used in the ChangeDisplaySettings function. Printer drivers do not use this member.

When you call the EnumDisplaySettings function, the dmDisplayFrequency member may return with a value of 0 or 1. These values represent the display hardware's default refresh rate. This default rate is typically set by switches on a display card or computer motherboard or by a configuration program that does not use Win32 display functions such as ChangeDisplaySettings.

dmICMMethod Windows 95/98/ME and later; Windows XP/W2K and NT or later: Specifies how ICM is handled. For a non-ICM application, this member determines if ICM is enabled or disabled. For ICM applications, the system examines this member to

97292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 102: printer

determine how to handle ICM support. This member can be one of the following predefined values, or a driver-defined value greater than or equal to the value of DMICMMETHOD_USER.

Value MeaningDMICMMETHOD_NONE Specifies that ICM is disabled.DMICMMETHOD_SYSTEM Specifies that ICM is handled by Windows.DMICMMETHOD_DRIVER Specifies that ICM is handled by the device driver.DMICMMETHOD_DEVICE Specifies that ICM is handled by the destination

device.

The printer driver must provide a user interface for setting this member. Most printer drivers support only the DMICMMETHOD_SYSTEM or DMICMMETHOD_NONE value. Drivers for PostScript printers support all values.

dmICMIntent Windows 95/98/ME, Windows XP/W2K and NT or later: Specifies which color matching method or intent should be used by default. This member is primarily for non-ICM applications. ICM applications can establish intents by using the ICM functions. This member can be one of the following predefined values or a driver defined value greater than or equal to the value of DMICM_USER.

Value MeaningDMICM_ABS_COLORIMETRIC Color matching should optimize to match the exact

color requested without white point mapping. This value is most appropriate for use with proofing.

DMICM_COLORMETRIC Color matching should optimize to match the exact color requested. This value is most appropriate for use with business logos or other images when an exact color match is desired.

DMICM_CONTRAST Color matching should optimize for color contrast. This value is the most appropriate choice for scanned or photographic images when dithering is desired.

DMICM_SATURATE Color matching should optimize for color saturation. This value is the most appropriate choice for business graphs when dithering is not desired.

dmMediaType Windows 95/98/ME, Windows XP/W2K and NT or later: Specifies the type of media being printed on. The member can be one of the following predefined values or a driver-defined value greater than or equal to the value of DMMEDIA_USER.

98292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 103: printer

Value MeaningDMMEDIA_STANDARD Plain paper.DMMEDIA_GLOSSY Glossy paper.DMMEDIA_TRANSPARENCY Transparent film.

Whistler: To retrieve a list of the available media types for a printer, use the DeviceCapabilities function with the DC_MEDIATYPES flag.

dmDitherType Windows 95/98/ME, Windows XP/W2K and NT or later: Specifies how dithering is to be done. The member can be one of the following predefined values, or a driver-defined value greater than or equal to the value of DMDITHER_USER.

Value MeaningDMDITHER_NONE No dithering.DMDITHER_COARSE Dithering with a coarse brush.DMDITHER_FINE Dithering with a fine brush.DMDITHER_LINEART Line art dithering, a special dithering method that

produces well defined borders between black, white, and gray scalings. It is not suitable for images that include continuous graduations in intensisty and hue, such as scanned photographs.

DMDITHER_ERRORDIFFUSION Windows 95/98/ME: Dithering in which an algorithm is used to spread, or diffuse, the error of approximating a specified color over adjacent pixels. In contrast, DMDITHER_COARSE, DMDITHER_FINE, and DMDITHER_LINEART use patterned half toning to approximate a color..

DMDITHER_GRAYSCALE Device does gray scaling.

dmReserved1 Windows 95/98/ME, Windows XP/W2K and NT or later: Not used; must be zero.

dmReserved2 Windows 95/98/ME, Windows XP/W2K and NT or later: Not used; must be zero.

99292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 104: printer

Black Ice DEVMODEThe BlackIceDEVMODE data structure contains the Windows DEVMODE and additional members:

On Windows XP/W2K and NT, the application that uses this structure should set the structure member alignment to 1 in the project settings and the following value should be defined in the project: UNICODE, _UNICODE, _WIN32_WINNT=0x0400. Without this, the size of the of the BlackIceDEVMODE structure will not be correct and some structure members will be shifted.Also, on Windows XP/W2K and XP, the string members of the BlackIceDEVMODE structure are UNICODE strings. When the application reads or writes these members it is very important to use UNICODE strings.

The BlackIceDEVMODE is defined in the 'devmode.h' file located in the Resource Toolkit under the Install\InstallDll\ directory. (by default C:\Program Files\Black Ice Software, Inc\TIFF Printer Driver Resource Toolkit\Install\InstallDLL\devmode.h)

Access the members of the BlackIceDEVMODE through the functions defined in the devmode.cpp file, located in the RTK in the Install\InstallDll\ directory.

Example:

The InterfaceName member of the devmode can be accessed through the DEVMODE_GetInterfaceName(BlackIceDEVMODE* pDevMode) and DEVMODE_SetInterfaceName(BlackIceDEVMODE* pDevMode, LPCTSTR InterfaceName);

TCHAR InterfaceName[MAX_PATH]:A TCHAR string type member. The InterfaceName member stores the name of the messaging interface. For Windows 95/98/ME is the name of the Windows Message broadcasted by the driver. Access functions: LPCTSTR DEVMODE_GetInterfaceName(BlackIceDEVMODE* pDevMode);void DEVMODE_SetInterfaceName(BlackIceDEVMODE* pDevMode, LPCTSTR InterfaceName);

The definition of the BlackIceDEVMODE structure:typedef struct{ DEVMODE DM; DWORD BliceMode; DWORD Format; DWORD ColorMode; DWORD FAXheader; DWORD LossRatio; DWORD Dithering;

100292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 105: printer

DWORD Brightness; DWORD PaperWidthInPixels;

DWORD PaperHeightInPixels;TCHAR ApplicationPath[MAX_PATH];DWORD LaunchFlags;

DWORD FileNameGenerationFlags; TCHAR OutputDirectory[MAX_PATH]; TCHAR ImageFileName[MAX_PATH]; TCHAR FileNamePrefix[MAX_PREFIX_LENGTH+1]; TCHAR FileExtension[MAX_FILE_EXTENSION_LENGTH+1]; TCHAR InterfaceName[MAX_PATH]; TCHAR INIFileName[MAX_PATH]; TCHAR TIFFDLLName[MAX_PATH]; TCHAR JPEGDLLName[MAX_PATH]; TCHAR ResourceDLLName[MAX_PATH]; DWORD SessionID; DWORD UserFlags; TCHAR szUser1[128]; TCHAR szUser2[128];}BlackIceDEVMODE, *LPBlackIceDEVMODE;

MEMBERS OF THE BlackIceDEVMODE STRUCTUREAll the members can be read, changed or set programmatically; however they should never be accessed directly, only through the designated functions. All these functions are declared in the devmode.h file and are implemented in the devmode.cpp file.

DEVMODE DM : The Windows DEVMODE data structure.

DWORD BliceMode :A DWORD type member. Each bit of BliceMode represents a flag used by the printer driver. If the bit is set the valueis TRUE, if it is not the value is FALSE. The flags and their values are the following:

BLF_INTERNETTIFF 0x00000004BLF_PAGENUMBERING 0x00000008BLF_REVERSEFILLORDER 0x00000010BLF_MULTIIMAGE 0x00000020BLF_WRITETEXT 0x00000040BLF_UNICODETEXT 0x00000080BLF_MAILMERGE 0x00000100BLF_ADVANCEDTEXT 0x00000200BLF_DISABLEIMAGE 0x00000400BLF_DISABLEGROUPFILE 0x00000800BLF_ADOBEDETECT 0x00001000BLF_SENDMESSAGE 0x00002000BLF_ENABLETIFFDLL 0x00004000

101292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 106: printer

BLF_ENABLEJPEGDLL 0x00008000BLF_FAXOUTPUT 0x00010000BLF_GLYPHSUPPORT 0x00020000BLF_ROTATEPAPER 0x00040000BLF_DELETEGROUPFILE 0x00080000BLF_KEEPFILES 0x00100000BLF_ADVANCEDPAPERSIZE 0x00200000BLF_CUSTOMEXT 0x00400000

Description of the flags:

BLF_INTERNETTIFF : The value of the ‘Internet TIFF format’ checkbox. Access functions: BOOL DEVMODE_IsInternetTiffFormatEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableInternetTiffFormat(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableInternetTiffFormat(BlackIceDEVMODE* pDevMode);

BLF_PAGENUMBERING: The value of the ‘Add Page Numbering Tag’ checkbox. Access functions: BOOL DEVMODE_IsPageNumberingEnabled(BlackIceDEVMODE* pDevMode); void DEVMODE_EnablePageNumbering(BlackIceDEVMODE* pDevMode);void DEVMODE_DisablePageNumbering(BlackIceDEVMODE* pDevMode);

BLF_REVERSEFILLORDER: The value of the ‘Reverse Bit Order in TIFF’ checkbox. Access functions: BOOL DEVMODE_IsReverseBitOrderEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableReverseBitOrder(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableReverseBitOrder(BlackIceDEVMODE* pDevMode);

BLF_MULTIIMAGE: The value of the ‘Create Multipage Image’ checkbox. Access functions: BOOL DEVMODE_IsAppendImageEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableAppendImage(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableAppendImage(BlackIceDEVMODE* pDevMode);

BLF_WRITETEXT: The value of the ‘WriteText File’ checkbox. Access functions: BOOL DEVMODE_IsWriteTextEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableWriteText(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableWriteText(BlackIceDEVMODE* pDevMode);

BLF_UNICODETEXT: Used only by the NT driver.

BLF_MAILMERGE: The value of the ‘Mail Merge’ checkbox. Access functions: BOOL DEVMODE_IsMailMergeEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableMailMerge(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableMailMerge(BlackIceDEVMODE* pDevMode);

BLF_ADVANCEDTEXT: The value of the ‘Save position and style’ checkbox. Access functions:

102292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 107: printer

BOOL DEVMODE_IsAdvancedTextEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableAdvancedText(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableAdvancedText(BlackIceDEVMODE* pDevMode);

BLF_DISABLEIMAGE: The value of the ‘Disable Image’ checkbox. Access functions: BOOL DEVMODE_IsImageDisabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableDisableImage(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableDisableImage(BlackIceDEVMODE* pDevMode);

BLF_DISABLEGROUPFILE: The value of the ‘Disable Group File’ checkbox. Access functions: BOOL DEVMODE_IsGroupFileDisabled(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableGroupFile(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableGroupFile(BlackIceDEVMODE* pDevMode);

BLF_SENDMESSAGE: The value of the ‘Disable the Messaging Interface’ checkbox. Access functions: BOOL DEVMODE_IsMessagingInterfaceEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableMessagingInterface(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableMessagingInterface(BlackIceDEVMODE* pDevMode);

BLF_ENABLETIFFDLL: If set the using of the TIFF32.DLL is enabled. Can be set only programmatically.Access functions: BOOL DEVMODE_IsTiffDllEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableTiffDll(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableTiffDll(BlackIceDEVMODE* pDevMode);

BLF_FAXOUTPUT: The value of the ‘Create Faxable Image’ checkboxAccess functions: BOOL DEVMODE_IsFaxOutputEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableFaxOutput(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableFaxOutput(BlackIceDEVMODE* pDevMode);

BLF_GLYPHSUPPORT: The value of the ‘Eastern Character Support’ checkboxAccess functions: BOOL DEVMODE_IsEasternCharSupportEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableEasternCharSupport(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableEasternCharSupport(BlackIceDEVMODE* pDevMode);

BLF_ROTATEPAPER: The value of the ‘Rotate Landscape image to Portrait’ checkboxAccess functions: BOOL DEVMODE_IsRotatePaperEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableRotatePaper(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableRotatePaper(BlackIceDEVMODE* pDevMode);

103292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 108: printer

BLF_DELETEGROUPFILE: The value of the ‘Delete Group File After Printing’ checkboxAccess functions: BOOL DEVMODE_IsDeleteGroupFileEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableDeleteGroupFile(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableDeleteGroupFile(BlackIceDEVMODE* pDevMode);

BLF_KEEPFILES: The value of the ‘Keep existing files’ checkboxAccess functions: BOOL DEVMODE_IsKeepExistingFilesEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableKeepExistingFiles(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableKeepExistingFiles(BlackIceDEVMODE* pDevMode) ;

BLF_ADVANCEDPAPERSIZE: The value of the ‘Advanced Papersize’ checkboxAccess functions: BOOL DEVMODE_IsAdvancedPaperSizeEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableAdvancedPaperSize(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableAdvancedPaperSize(BlackIceDEVMODE* pDevMode);

BLF_CUSTOMEXT: The value of the ‘Use Custom Extension’ checkboxAccess functions: BOOL DEVMODE_IsCustomExtensionEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableCustomExtension(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableCustomExtension(BlackIceDEVMODE* pDevMode)

DWORD Format :A DWORD type member. Specifies the file format used by the driver. The available file formats are enumerated in the devmode.h

enum TEFileFormats{ FFR_BMP, FFR_PCX, FFR_DCX, FFR_TIFF_UNC, FFR_TIFF_G31D,FFR_TIFF_G31DNOEOL, FFR_TIFF_G32D, FFR_TIFF_G4, FFR_TIFF_PACK,FFR_TIFF_LZW, FFR_TIFF_JPEG, FFR_CALS, FFR_RAW_G31D, FFR_RAW_G31DNOEOL,FFR_RAW_G32D, FFR_RAW_G4, FFR_JPEG, FFR_JPEG_LAB, FFR_EMF, FFR_MMR, FFR_END

};

104292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 109: printer

Access functions: DWORD DEVMODE_GetFileFormat(BlackIceDEVMODE* pDevMode);void DEVMODE_SetFileFormat(BlackIceDEVMODE* pDevMode, DWORD Format);

NOTE: In the Monochrome driver only the monochrome file formats are available, such as TIFF. The Metafile driver creates only Enhanced Metafile Format (EMF).

DWORD ColorMode:A DWORD type member.Specifies the color depth used by the printer. The values are enumerated in the

devmode.h

enum ColorMode { BITS_1, BITS_8GRAY, BITS_8, BITS_24, BITS_END

};

Access functions: DWORD DEVMODE_GetColorDepth(BlackIceDEVMODE* pDevMode);void DEVMODE_SetColorDepth(BlackIceDEVMODE* pDevMode, DWORD ColorDepth);

NOTE: In the Monochrome driver only the BITS_1 ColorMode is available. The Metafile driver accepts only the BITS_24 value..

DWORD FAXheader: A DWORD type member.Specifies the height in pixels of the fax header.

Access functions: DWORD DEVMODE_GetFaxHeader(BlackIceDEVMODE* pDevMode);void DEVMODE_SetFaxHeader(BlackIceDEVMODE* pDevMode, DWORD nPixels);

DWORD LossRatio: A DWORD type member.Specifies the loss ratio of the jpeg image.

Access functions: DWORD DEVMODE_GetLossRatio(BlackIceDEVMODE* pDevMode);void DEVMODE_SetLossRatio(BlackIceDEVMODE* pDevMode, DWORD dwLossRatio);

DWORD Dithering: A DWORD type member.Specifies the dithering method for the monochrome image. The available values are defined in the devmode.h

105292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 110: printer

#define DITHER_NONE 0#define DITHER_FS4 1#define DITHER_JJN 2#define DITHER_SMOOTH 3#define DITHER_SHARP 4#define DITHER_STUCKI 5

Access functions: DWORD DEVMODE_GetDithering(BlackIceDEVMODE* pDevMode);void DEVMODE_SetDithering(BlackIceDEVMODE* pDevMode, DWORD dwDithering);

DWORD Brightness: A DWORD type member.Specifies the brightness value.

Access functions: DWORD DEVMODE_GetBrightness(BlackIceDEVMODE* pDevMode);void DEVMODE_SetBrightness(BlackIceDEVMODE* pDevMode, DWORD dwBrightness);

DWORD PaperWidthInPixels: A DWORD type member.Specifies the Paper Width value in pixels.

Access functions: DWORD DEVMODE_GetPageWidthInPixels(BlackIceDEVMODE* pDevMode);void DEVMODE_SetPaperWidthInPixel(BlackIceDEVMODE* pDevMode, DWORD nPixels);

DWORD PaperHeightInPixels: A DWORD type member.Specifies the Paper Width value in pixels.

Access functions: DWORD DEVMODE_GetPageHeightInPixels(BlackIceDEVMODE* pDevMode);void DEVMODE_SetPaperHeightInPixel(BlackIceDEVMODE* pDevMode, DWORD nPixels);

TCHAR ApplicationPath[MAX_PATH]: A string type member.Specifies the name and the path of the application to be started after printing.

Access functions: LPCTSTR DEVMODE_GetApplicationPath(BlackIceDEVMODE* pDevMode);void DEVMODE_SetApplicationPath(BlackIceDEVMODE* pDevMode, LPCTSTR

ApplicationPath);

DWORD LaunchFlags :A DWORD type member. Each bit of LaunchFlags represents a flag used by the printer driver. If the bit is set the value is TRUE, if it is not the value is FALSE. The flags and their values are the following:

106292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 111: printer

BLF_LAUNCHAPP 0x00000001BLF_STARTBEFOREPRINT 0x00000002BLF_PASSPARAMETERS 0x00000004BLF_STARTNORMAL 0x00000008BLF_STARTMINIMIZED 0x00000010BLF_STARTHIDDEN 0x00000020

BLF_LAUNCHAPP: The value of the ‘Enable Start Application’ checkbox. Access functions: BOOL DEVMODE_IsStartApplicationEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableStartApplication(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableStartApplication(BlackIceDEVMODE* pDevMode);

BLF_STARTBEFOREPRINT: The value of the ‘Start Before Printing’ and ‘Start After Printing’ radio button. If TRUE the ‘Start Before Printing’ radio button is selected, otherwise the ‘Start After Printing’ radio button is selected.Access functions: BOOL DEVMODE_IsStartBeforePrint(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableStartBeforePrint(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableStartBeforePrint(BlackIceDEVMODE* pDevMode) ;

BLF_PASSPARAMETERS: The value of the ‘Pass Parameters’ checkbox. Access functions: BOOL DEVMODE_IsPassParametersEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnablePassParameters(BlackIceDEVMODE* pDevMode);void DEVMODE_DisablePassParameters(BlackIceDEVMODE* pDevMode) ;

BLF_STARTNORMAL: The value of the ‘Normal’ radio button. Access functions: BOOL DEVMODE_IsStartNormal(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableStartNormal(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableStartNormal(BlackIceDEVMODE* pDevMode) ;

BLF_STARTMINIMIZED: The value of the ‘Minimized’ radio button. Access functions: BOOL DEVMODE_IsStartMinimized(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableStartMinimized(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableStartMinimized(BlackIceDEVMODE* pDevMode) ;

BLF_STARTHIDDEN: The value of the ‘Hidden’ radio button. Access functions: BOOL DEVMODE_IsStartHidden(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableStartHidden(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableStartHidden(BlackIceDEVMODE* pDevMode) ;

DWORD FileNameGenerationFlags :A DWORD type member. The FileNameGenerationFlags member represents the method used by the printer driver to generate the files. This setting is in the ‘Name generation Method’ combo. The available values are defined in the devmode.h and must be one of the followings:

107292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 112: printer

enum { FILENAME_PREFIX_DEVMODE, FILENAME_PREFIX_REGISTRY,FILENAME_PREFIX_INI, FILENAME_EXACT_DEVMODE, FILENAME_EXACT_REGISTRY,

FILENAME_EXACT_INI, FILENAME_DOCUMENT_NAME,

FILENAME_LAST };

Access functions: DWORD DEVMODE_GetFileGenerationMethod(BlackIceDEVMODE* pDevMode);void DEVMODE_SetFileGenerationMethod(BlackIceDEVMODE* pDevMode, DWORD dwGenMethod);

TCHAR OutputDirectory[MAX_PATH]:A TCHAR string type member. The OutputDirectory member stores the path where the printer driver generates the

files.

Access functions: void DEVMODE_SetOutputDirectory(BlackIceDEVMODE* pDevMode, LPCTSTR OutputDir);LPCTSTR DEVMODE_GetOutputDirectory(BlackIceDEVMODE* pDevMode);

TCHAR FileImageName[MAX_PATH]:A TCHAR string type member. The FileImageName member stores the file name if the file generation method is “Exact Filename”.

Access functions: LPCTSTR DEVMODE_GetImageFileName(BlackIceDEVMODE* pDevMode);void DEVMODE_SetImageFileName(BlackIceDEVMODE* pDevMode, LPCTSTR ImageFileName);

TCHAR FileNamePrefix[MAX_PREFIX_LENGTH +1]:A TCHAR string type member. The FileNamePrefix member stores the prefix of the generated file name if the file generation method is FILENAME_PREFIX_DEVMODE. The max length of the prefix is 3 characters, if it is longer, it will be truncated to the first 3 characters.

Access functions: LPCTSTR DEVMODE_GetFileNamePrefix(BlackIceDEVMODE* pDevMode);void DEVMODE_SetFileNamePrefix(BlackIceDEVMODE* pDevMode, LPCTSTR FileNamePrefix);

TCHAR FileExtension[MAX_FILE_EXTENSION_LENGTH +1]:A TCHAR string type member.

108292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 113: printer

The FileExtension member stores the extension of the generated file name if the file generation method is FILENAME_PREFIX_DEVMODE. The max length of the extension is 3 characters, if it is longer, it will be truncated to the first 3 characters.

Access functions: LPCTSTR DEVMODE_GetFileExtension(BlackIceDEVMODE* pDevMode);void DEVMODE_SetFileExtension(BlackIceDEVMODE* pDevMode, LPCTSTR FileExtension);

TCHAR InterfaceName[MAX_PATH]:A TCHAR string type member. The InterfaceName member stores the name of the messaging interface. For Windows 95/98/ME is the name of the Windows Message broadcasted by the driver. Each driver has an unique Messaging Interface Name. You can create your own Messaging Interface Name by changing the default Messaging Interface Name in the printer’s DEVMODE InterfaceName member. To do this use the following functions:

Access functions: LPCTSTR DEVMODE_GetInterfaceName(BlackIceDEVMODE* pDevMode);void DEVMODE_SetInterfaceName(BlackIceDEVMODE* pDevMode, LPCTSTR InterfaceName);

TCHAR INIFileName[MAX_PATH]:A TCHAR string type member. The INIFileName member stores the name of the INI file which contains the information depending on the filename generation information.

For FILENAME_PREFIX_INI, the content of the INI file should be like:

[Black Ice Color Printer]File name prefix=ABCFile name extension=TIFF

Access functions: LPCTSTR DEVMODE_GetINIFileName(BlackIceDEVMODE* pDevMode);Void DEVMODE_SetINIFileName(BlackIceDEVMODE* pDevMode, LPCTSTR INIFileName);

TCHAR TIFFDLLName[MAX_PATH]:A TCHAR string type member. The TIFFDLLName member stores the name and path of the TIFF32.DLL. This DLL

encodes the TIFF files. The file is needed for TIFF output. Access functions: LPCTSTR DEVMODE_GetTIFFDLLName(BlackIceDEVMODE* pDevMode);

109292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 114: printer

void DEVMODE_SetTIFFDLLName (BlackIceDEVMODE* pDevMode, LPCTSTR TIFFDLLName);

TCHAR JPEGDLLName[MAX_PATH]:A TCHAR string type member. The JPEGDLLName member stores the name and path of the JPEG32.DLL. This DLL encodes the Jpeg files. The file is needed for Jpeg output. Access functions: LPCTSTR DEVMODE_GetJPEGDLLName(BlackIceDEVMODE* pDevMode);void DEVMODE_SetJPEGDLLName (BlackIceDEVMODE* pDevMode, LPCTSTR JPEGDLLName);

TCHAR ResourceDLLName[MAX_PATH]:A TCHAR string type member. The resources of the driver – such as the driver property dialogs - are stored in a separate DLL file. The look of the property sheets of the printer driver can be modified by moving or hiding controls. Also, all the names of the paper formats, DPI setting and file name generation methods are stored in this DLL and can be changed as well.The ResourceDLLName member stores the name and path of the driver resource DLL. Access functions: LPCTSTR DEVMODE_GetResourceDLLName(BlackIceDEVMODE* pDevMode);void DEVMODE_SetResourceDLLName(BlackIceDEVMODE* pDevMode, LPCTSTR ResourceDLLName);

DWORD SessionID:Reserverd.

DWORD UserFlags::A DWORD value.Reserved for extra programming possibilities.

TCHAR szUser1[128]:A TCHAR string type member. Reserved for extra programming possibilities.

TCHAR szUser2[128]:A TCHAR string type member. Reserved for extra programming possibilities.

110292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 115: printer

Messaging Interface All the Black Ice Printer Drivers have a messaging interface. The printer driver can communicate with applications through this interface. The applications capture and process the messages sent by the driver. The driver can communicate with an application three different ways.

1. Method I: Through the WM_COPYDATA Windows message. This method is NOT supported on Terminal Server.

The WM_COPYDATA message is sent by the driver to a specific window. The driver has to know the application’s window handle. To pass the window handle to the driver, the application, when it starts, should write it’s window handle using the WritePrinterData() function to the PRINTER_DATA_WINDOW_HANDLE_KEY key.The driver sends a WM_COPYDATA message to the application’s window. The application extracts the information from the data structure arrived with the message. Before the application exits, it should overwrite the window handle in the registry to 0 by setting the PRINTER_DATA_WINDOW_HANDLE_KEY to 0.

2. Method II. Through a windows message registered with RegisterWindowMessage ().This method is NOT supported on Terminal Server.

The driver registers a message with the RegisterWindowMessage () function and then starts broadcasting the message. The application has to register the same message as the driver. To accomplish this, use the string from the InterfaceName member of the BlackIceDEVMODE structure. The application will then capture and process the messages. The data will be written to an ini file by the driver defined in devmode.h.

#define BLACK_ICE_DEFAULT_INIFILE TEXT("bi_group.ini")

The application will read the ini file when the BLACKICE_MESSAGE_STARTDOC message arrives in order to get the name of the group file.. The driver writes all the information about the generated images in the group file. See the ‘Description of the Black Ice Printer Messages’ and the “Group File Description” sections in this manual for more detail.

3. Method III. Through a pipe interface. This method is supported on Terminal Server.

This method was included for compatibility reasons only. The printer drivers uses a named pipe interface to communicate with the application. The BLICECTR.DLL captures the pipe messages sent by the printer driver and converts

111292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 116: printer

them to window messages. The application captures the window messages and extracts information from the message parameters.The name of the pipe should be specified in the InterfaceName member of the BlackIceDEVMODE structure. The pipe name in the InterfaceName member should not contain the \\.\pipe\ prefix, the printer driver will insert this prefix when it tries to write the named pipe. NOTE: On Terminal Server the printer driver will add the Session ID to the InterfaceName.The application should create a window and should register a window message. After that the application should start waiting for printer driver messages by calling the WaitForPrnPipe function from the BLICECTR.DLL. The parameters of these functions are the following:LPWSTR pszPipeName – pointer to a NULL terminated UNICODE string that contains the pipe name, including the \\.\pipe\ prefix.HWND hMsgWnd – A Window handle. The BLICECTR.DLL will send window messages to this window.DWORD dwMessageNum – Message number. The message number of the registered window message.When a document is being printed on the printer, the BLICECTR.DLL will capture the pipe messages sent by the printer, will convert the pipe messages into window messages and forward them to the application. The parameter of each message will be a TSPrnMessage structure:

typedef struct tagTSPrnMessage{

DWORD dwMessage;WCHAR szDocName[MAX_PATH];WCHAR szFileName[MAX_PATH];WCHAR szPrinterName[MAX_PATH];INT nPageNumber;BOOL fAppendPage;BOOL fPortrait;

} TSPrnMessage;

To stop waiting for messages the application should call the EndWaitPrnPipe function from the BLICECTR.DLL. The function takes the following parameter:PWCHAR pszPipeName – pointer to a NULL terminated UNICODE string that contains the pipe name, including the \\.\pipe\ prefix.

Applications already written to work with the older versions of the printer driver should make the following changes to support the new driver(version 6.0 or newer):1. Replace the old BLICECTR.DLL with the new one.2. The parameters of some BLICECTR.DLL functions have been changed, please modify the code to call these function with the right parameters.

112292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 117: printer

3.The name and the definition of the messages sent by the BLICECTR.DLL have been changed. The new messages are the following:

#define BLACKICE_MESSAGE_STARTDOC 0x00000001#define BLACKICE_MESSAGE_STARTPAGE 0x00000002#define BLACKICE_MESSAGE_ENDPAGE 0x00000003#define BLACKICE_MESSAGE_ENDDOC 0x00000004#define BLACKICE_MESSAGE_ABORT 0x00000005

4. The TSPrnMessage structure did change since previous versions. Please update the code to use the new structure.

NOTE: On Terminal Server when a Windows Test Page is printed, the test page is printed by the spooler. In that particular case the messages will be captured on the server machine by the administrator account, not by the user who prints.

The WM_COPYDATA Windows MessageAn application sends the WM_COPYDATA message to pass data to another

application. To send this message, call the SendMessage function with the following parameters (do not call the PostMessage function).

SendMessage( (HWND) hWnd, // handle to destination window WM_COPYDATA, // message to send (WPARAM) wParam, // handle to window (HWND) (LPARAM) lParam // data (PCOPYDATASTRUCT));

ParameterswParam

Handle to the window passing the data. lParam

Pointer to a COPYDATASTRUCT structure that contains the data to be passed.

Return Values

If the receiving application processes this message, it should return TRUE; otherwise, it should return FALSE.

Remarks

113292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 118: printer

The data being passed must not contain pointers or other references to objects not accessible to the application receiving the data.

While this message is being sent, the referenced data must not be changed by another thread of the sending process.

The receiving application should consider the data read-only. The lParam parameter is valid only during the processing of the message. The receiving application should not free the memory referenced by lParam. If the receiving application must access the data after SendMessage returns, it must copy the data into a local buffer.

When you send a WM_COPYDATA message, SendMessage allocates a block of memory cbData bytes in size and copies the data from the caller's address space to this block. It then sends the message to the destination window. When the receiving window procedure processes this message, the lParam parameter is a pointer to a COPYDATASTRUCT structure that exists in the address space of the receiving process. The lpData member is a pointer to the copied block of memory and the address reflects the memory location in the receiving process's address space.

The COPYDATASTRUCT structure The COPYDATASTRUCT structure contains data to be passed to another application by the WM_COPYDATA message.

typedef struct tagCOPYDATASTRUCT { ULONG_PTR dwData; DWORD cbData; PVOID lpData; } COPYDATASTRUCT, *PCOPYDATASTRUCT;

MembersdwData

Specifies data to be passed to the receiving application. cbData

Specifies the size, in bytes, of the data pointed to by the lpData member. lpData

Pointer to data to be passed to the receiving application. This member can be NULL.

The BLACKICE_PRINTER_MESSAGE structure The BLACKICE_PRINTER_MESSAGE structure contains data to be passed to another application. The data is passed by the WM_COPYDATA message. The dwData member of the

114292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 119: printer

COPYDATASTRUCT structure is a pointer to a BLACKICE_PRINTER_MESSAGE structure.

The BLACKICE_PRINTER_MESSAGE structure is defined in the devmode.h header file.

typedef struct _BLACKICE_PRINTER_MESSAGE{

DWORD dwBlackIceFlag; DWORD dwSize;DWORD dwMessage;TCHAR szFileName[MAX_PATH];TCHAR szInterfaceName[MAX_PATH];

}BLACKICE_PRINTER_MESSAGE;

Members DWORD dwBlackIceFlag:

This constant value identifies the message. The value of this member should be BLACK_ICE_FLAG (defined in devmode.h).

DWORD dwSize:The size of the BLACKICE_PRINTER_MESSAGE structure.

DWORD dwMessage:The ID of the message. The messages are defined in the devmode.h.

#define BLACKICE_MESSAGE_STARTDOC 0x00000001 #define BLACKICE_MESSAGE_STARTPAGE 0x00000002 #define BLACKICE_MESSAGE_ENDPAGE 0x00000003#define BLACKICE_MESSAGE_ENDDOC 0x00000004#define BLACKICE_MESSAGE_ABORT 0x00000005

TCHAR szFileName[MAX_PATH]:A string passed with the message. The string content depends on the message. It can be the group file name, the image name, or an error code.

TCHAR szInterfaceName[MAX_PATH]:This string identifies a printer driver (can be than more than one printer driver). The printer driver fills the szInterfaceName[MAX_PATH] member with the value of the InterfaceName member of the BlackIceDEVMODE structure. When the application captures the WM_COPYDATA message, the application should compare the InterfaceName member of the designated printer driver’s devmode data structure with the szInterfaceName.

Description of the Black Ice Printer Messages

The BLACKICE_MESSAGE_STARTDOC message: The driver sends this message when it starts to print a new document.

115292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 120: printer

Method I. When this message arrives the driver writes the name of the group file in the bi_group.ini file defined in the devmode.h. When this message arrives, the application can read the name of the group file. The driver will write all other information into this group file. #define BLACK_ICE_DEFAULT_INIFILE TEXT("bi_group.ini")Method II. With this message the driver sends the name of the group file in the szFileName member of the BLACKICE_PRINTER_MESSAGE structure.Method III. The dwMessage, szDocName, szPrinterName, fAppendPage, fPortrait member of the TSPrnMessage structure is valid.

The BLACKICE_MESSAGE_STARTPAGE message: The driver sends this message at the beginning of each new page.

Method I. Nothing is written to the group file now. The application can increment the number of pages here.Method II.With this message the driver sends the name of the image file in the szFileName member of the BLACKICE_PRINTER_MESSAGE structure.Method III. The dwMessage, szDocName, szPrinterName, fAppendPage, fPortrait, szFileName member of the TSPrnMessage structure is valid. The szFileName member contains the name of the group file.

The BLACKICE_MESSAGE_ENDPAGE message: The driver sends this message when it is finished printing a page. Method I. The name of the image file is already written to the group file. The application can read the name of the generated image from the group file.Method II. With this message the driver sends the name of the image file in the szFileName member of the BLACKICE_PRINTER_MESSAGE structure.Method III. The dwMessage, szDocName, szPrinterName, fAppendPage, fPortrait, szFileName member of the TSPrnMessage structure is valid. The szFileName member contains the name of the group file.

The BLACKICE_MESSAGE_ENDDOC message: The driver sends this message when it finishes printing a document.

Method I. When this message arrives the driver is finished printing. If the “Delete Group File after printing” option is checked, the group file will be deleted. Method II. With this message the driver sends the name of the group file in the szFileName member of the BLACKICE_PRINTER_MESSAGE structure.Method III. The dwMessage, szDocName, szPrinterName, fAppendPage, fPortrait member of the TSPrnMessage structure is valid.

116292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 121: printer

The BLACKICE_MESSAGE_ABORT message: The driver sends this message when an error occurs or the user cancels the document printing.

Method I. The driver writes the error code into the group file to the GROUPFILE_ERROR_KEY section, defined in the devmode.h.#define GROUPFILE_ERROR_KEY TEXT("Print status")Method II. With this message the driver sends the error code as a string in the szFileName member of the BLACKICE_PRINTER_MESSAGE structure.Method III. The dwMessage, szDocName, szPrinterName, fAppendPage, fPortrait member of the TSPrnMessage structure is valid.

117292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 122: printer

Command Line ParametersThe printer driver can start an application before or after printing. This can be set by

checking the “Start Application” checkbox, or programmatically set the the BLF_LAUNCHAPP flag in the LaunchFlags member of the devmode of the printer.

If the driver is configured to launch the application after the printing and the ‘Pass Parameters’ checkbox is checked. the parameters are passed in the command line to the application.

The passed parameters are separated by a space character. The string type parameters are between quotes. The following parameters are passed by the driver:

Document name - STRINGGroup file name - STRINGPrinter name - STRING Numer of pages - NUMBERMultipage - NUMBER, the value is 1 of 0. The 1 means the image is

multipage, 0 the image is not multipageOrientation - NUMBER, the value is 1 of 0. The 1 means the image

orientation is portrait, 0 the image orientation is landscape.

Examlpe:

MyApp.exe “Cutomer.doc” “customer.grp” “Black Ice Color” 4 0 1

118292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 123: printer

Group File DescriptionGroup files are generated for every document printed unless the “Disable Group File” option is set on the “File Name Generation” sheet of the properties. The group file contains critical information about the printed images and it offers an easy, simple way to communicate with the driver. The group file may be created for temporary if the “Delete group file after printing” option is set on the “File Name Generation” sheet of the properties. Please read “Delete group file after printing” section for details.

Group File Content. The following listing is a typical group file.

[Color Printer]

Image Format=JPEG

Append Image Enabled=No

Bits Per Pixel=24

Print status=Printing finished successfully

Total number of pages=3Document Name=Document1

[Page 1]

FileName=c:\temp\AAA13340001.JPG

TextFileName=c:\temp\AAA13340001.TXT

[Page 2]

FileName=c:\temp\AAA43840002.JPG

TextFileName=c:\temp\AAA43840002.TXT

[Page 3]

FileName=c:\temp\AAA60D30003.JPG

TextFileName=c:\temp\AAA60D30003.TXT

Group file header section

[Color Printer]

The printer driver type. The printer driver type can be Monochrome, Color, or Metafile.

119292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 124: printer

Image Format=JPEG

Image format can be

Microsoft Bitmap format - “BMP"Paint Brush format - "PCX"Intel format - "DCX"

- "TIFF Group 3 1D No EOL"- "TIFF Uncompressed"- "TIFF Group 3 2D"- "TIFF Group 4"- "TIFF Packed"- "TIFF LZW"- "TIFF JPEG"- "TIFF Group 3 1D"- "CALS"- "RAW TIFF Group 3 1D"- "RAW TIFF Group 3 1D No EOL"- "RAW TIFF Group 3 2D"- "RAW TIFF Group 4"- "JPEG"

Color Fax Format - "JPEG L*a*b"- "Extended Metafile"

Append Image Enabled=No

The “Append Image Enabled” field shows that the printer driver generated a single files with multiple images in it, or a separate file for every page. If a single file is generated with multiple images then there would be a single image per page. Also the file name will be repeated for every page in the Page section of the group file. See detail below.

Bits Per Pixel=24

The “Bits Per Pixel” field shows the generated image color depth. The values can be 1 for monochrome, 8 and 24 for color images.

Print status=Printing finished successfully

The printed job status. In case of failed printing and error message will appear in the status field.

The message "Printing finished successfully" shown on successful printing.The message "Internal error 99" followed by two numbers shown when an internal error occurs. Please contact technical support with error number for details.

120292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 125: printer

The message "Out of memory" shown when the driver fail to allocate memory. Resolution is to add more physical memory and make sure that there is enough disk space for virtual memory.The message "TIFF32.DLL cannot be loaded" shown if driver failed to load the TIFF3 DLL.The message "JPEG32.DLL cannot be loaded" shown f driver failed to load the JPEG DLL.

Total number of pages=3

The total number of pages printed in the print job.

Group file body

For every page printed in the document a page number section is created.

[Page 1]

The page number.

FileName=c:\temp\AAA13340001.JPG

The “FileName” is the generated raster image file name with full path. If “Create a multi page image” is selected on the File Formats sheet, the file name will be the same for every page.

TextFileName=c:\temp\AAA13340001.TXT

The “TextFileName” is the generated text file name with full path. If “Create a multi page image” is selected on the File Formats sheet, the file name will be the same for every page. The driver will create “TextFileName” section entry only if “Write Text File” is selected on the File Formats sheet.

[Page 2]

FileName=c:\temp\AAA43840002.JPG

TextFileName=c:\temp\AAA43840002.TXT

[Page 3]

FileName=c:\temp\AAA60D30003.JPG

TextFileName=c:\temp\AAA60D30003.TXT

121292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 126: printer

122292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 127: printer

Message Capture OCX ControlThe Message Capture OCX control is provided to help VB, Delphi, Visual FoxPro programmers handle printer driver messages easily from their application. The name of the OCX control is BiPrnDrv.ocx and it should be installed into the SYSTEM directory.

The Capture OCX can be found in the OCX directory in your RTK installation folder.To redistribute the OCX, you have to register the OCX with regsvr32.exe or with your installation package.

The OCX does not have any Black Ice DLL or OCX file dependency.

The BiPrnDrv.ocx file loads the following system DLLs:

-MFC42.DLL-MSVCRT.DLL-ADVAPI32.DLL-OLEAUT32.DLL-KERNEL32.DLL-GDI32.DLL-USER32.DLL-WINSPOOL.DRV-OLE32.DLL

If any of the above DLL is missing, the BiPrnDrv.ocx will not register correctly.

The Message Capture OCX control does not require a license file.

The OCX control exports the following Properties and Events:

PrinterName PropertyThis property contains the name of the printer the application wants to capture messages from.

StartDoc eventThe StartDoc event is fired when the selected printer starts to print a document. The parameter of this event is the name (with the full path) of the generated group file.

StartPage eventThe StartPage event is fired when the selected printer starts to print a new page. The parameter of this event is the actual page number.

EndPage eventThe EndPage event is fired when the selected printer finishes printing a page. The parameter of this event is the name (with the full path) of the generated image file.

123292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 128: printer

EndDoc eventThe EndDoc event is fired when the selected printer finishes printing a document. The parameter of this event is the name (with the full path) of the generated group file.

124292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 129: printer

The BLICECTR.DLL message capture DLL. The BLICECTR.DLL exports a set of functions which can help developers capture printer driver pipe messages. The DLL captures pipe messages sent by the printer driver and converts them into window messages. This way the developer does not have to write his own pipe handling code (which can be very tricky and time consuming).

The name of the pipe should be specified in the InterfaceName member of the BlackIceDEVMODE structure. The pipe name in the InterfaceName member should not contain the \\.\pipe\ prefix, the printer driver will insert this prefix when it tries to write the named pipe. The application should create a window and register a window message. Afterwards, the application should start waiting for printer driver messages by calling the WaitForPrnPipe function from the BLICECTR.DLL.

NOTE: On Terminal Server the printer driver will add the Session ID to the InterfaceName.

When a document is being printed on the printer, the BLICECTR.DLL will capture the pipe messages sent by the printer, convert the pipe messages into window messages and forward them to the application. The parameter of each message will be a TSPrnMessage structure:

typedef struct tagTSPrnMessage{

DWORD dwMessage;WCHAR szDocName[MAX_PATH];WCHAR szFileName[MAX_PATH];WCHAR szPrinterName[MAX_PATH];INT nPageNumber;BOOL fAppendPage;BOOL fPortrait;

} TSPrnMessage;

To stop waiting for messages, the application should call the EndWaitPrnPipe function from the BLICECTR.DLL. Applications already written to work with the older versions of the printer driver should make the following changes to support the new driver (version 6.0 or newer):

1. Replace the old BLICECTR.DLL with the new one.2. The parameters of some BLICECTR.DLL functions have been changed, please modify the code to call these functions with the right parameters.3.The name and the definition of the messages sent by the BLICECTR.DLL have been changed. The new messages are the following:

125292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 130: printer

#define BLACKICE_MESSAGE_STARTDOC 0x00000001#define BLACKICE_MESSAGE_STARTPAGE 0x00000002#define BLACKICE_MESSAGE_ENDPAGE 0x00000003#define BLACKICE_MESSAGE_ENDDOC 0x00000004#define BLACKICE_MESSAGE_ABORT 0x00000005

4. The TSPrnMessage structure did change from previous versions. Please update the code to use the new structure.

The BLICECTR.DLL exports the following three functions:

WaitForPrnPipe

BOOL PASCAL WaitForPrnPipe( LPWSTR pszPipeName, HWND hMsgWnd, DWORD dwMessageNum )

The function has the following parameters:

LPWSTR pszPipeName – pointer to a NULL terminated UNICODE string that contains the pipe name, including the \\.\pipe\ prefix.HWND hMsgWnd – A Window handle. The BLICECTR.DLL will send window messages to this window.DWORD dwMessageNum – Message number. The message number of the registered window message.

EndWaitPrnPipe

BOOL PASCAL EndWaitPrnPipe(PWCHAR pszPipeName)

The function has the following parameter:

PWCHAR pszPipeName – pointer to a NULL terminated UNICODE string that contains the pipe name, including the \\.\pipe\ prefix.

SetListeningPriorityBOOL PASCAL SetListeningPriority( int nPri )

The function has the following parameters:

INT nPri – sets the priority of the thread which waits for pipe messages. Valid values are the following:

126292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 131: printer

THREAD_PRIORITY_LOWESTTHREAD_PRIORITY_BELOW_NORMALTHREAD_PRIORITY_NORMALTHREAD_PRIORITY_HIGHESTTHREAD_PRIORITY_ABOVE_NORMALTHREAD_PRIORITY_ERROR_RETURNTHREAD_PRIORITY_TIME_CRITICALTHREAD_PRIORITY_IDLE

Sample code for changing the printer settings programmatically Changing the DEVMODE structure under Windows XP/W2K/NT

The following sample code demonstrates how to change the printer settings under Windows XP/W2K and XP. The preferred way to do this is by using the DocumentProperties() Win32 API call.

// MySetPrinter// // Demonstrates how to use the SetPrinter API. This particular function changes the orienation// for the printer specified in pPrinterName to the orientation specified in dmOrientation.// // Valid values for dmOrientation are:// DMORIENT_PORTRAIT (1)// or// DMORIENT_LANDSCAPE (2)BOOL MySetPrinter(LPTSTR pPrinterName, short dmOrientation){

HANDLE hPrinter = NULL;DWORD dwNeeded = 0;PRINTER_INFO_2 *pi2 = NULL;BlackIceDEVMODE *pDevMode = NULL;

//The BlackIceDEVMODE structure is defined in the “devmode.h” file in the //Resource Toolkit. The ‘devmode.h’ file is located in the Install Dll’s //folder in the Install Shield project sample directory.

PRINTER_DEFAULTS pd;BOOL bFlag;LONG lFlag;

// Open printer handle (on Windows NT, you need full-access because you// will eventually use SetPrinter)...ZeroMemory(&pd, sizeof(pd));pd.DesiredAccess = PRINTER_ALL_ACCESS;bFlag = OpenPrinter(pPrinterName, &hPrinter, &pd);if (!bFlag || (hPrinter == NULL))

127292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 132: printer

return FALSE;

// The first GetPrinter tells you how big the buffer should be in // order to hold all of PRINTER_INFO_2. Note that this should fail with // ERROR_INSUFFICIENT_BUFFER. If GetPrinter fails for any other reason // or dwNeeded isn't set for some reason, then there is a problem...SetLastError(0);bFlag = GetPrinter(hPrinter, 2, 0, 0, &dwNeeded);

if ((!bFlag) && (GetLastError() != ERROR_INSUFFICIENT_BUFFER) || (dwNeeded == 0))

{ClosePrinter(hPrinter);return FALSE;

}

// Allocate enough space for PRINTER_INFO_2...pi2 = (PRINTER_INFO_2 *)GlobalAlloc(GPTR, dwNeeded);if (pi2 == NULL){

ClosePrinter(hPrinter);return FALSE;

}

// The second GetPrinter fills in all the current settings, so all you// need to do is modify what you're interested in...bFlag = GetPrinter(hPrinter, 2, (LPBYTE)pi2, dwNeeded, &dwNeeded);if (!bFlag){

GlobalFree(pi2);ClosePrinter(hPrinter);return FALSE;

}

// If GetPrinter didn't fill in the DEVMODE, try to get it by calling// DocumentProperties...if (pi2->pDevMode == NULL){

dwNeeded = DocumentProperties(NULL, hPrinter,pPrinterName,NULL, NULL, 0);

if (dwNeeded <= 0){

GlobalFree(pi2);ClosePrinter(hPrinter);return FALSE;

}

pDevMode = (BlackIceDEVMODE *)GlobalAlloc(GPTR, dwNeeded);if (pDevMode == NULL){

GlobalFree(pi2);ClosePrinter(hPrinter);return FALSE;

128292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 133: printer

}

lFlag = DocumentProperties(NULL, hPrinter,pPrinterName,(PDEVMODE)pDevMode, NULL,DM_OUT_BUFFER);

if (lFlag != IDOK || pDevMode == NULL){

GlobalFree(pDevMode);GlobalFree(pi2);ClosePrinter(hPrinter);return FALSE;

}

pi2->pDevMode = (PDEVMODE)pDevMode;}

// Driver is reporting that it doesn't support this change...if (!(pi2->pDevMode->dmFields & DM_ORIENTATION)){

GlobalFree(pi2);ClosePrinter(hPrinter);if (pDevMode)

GlobalFree(pDevMode);return FALSE;

}

// Specify exactly what we are attempting to change...pi2->pDevMode->dmFields = DM_ORIENTATION;pi2->pDevMode->dmOrientation = dmOrientation;

// Do not attempt to set security descriptor...pi2->pSecurityDescriptor = NULL;

// Make sure the driver-dependent part of devmode is updated...lFlag = DocumentProperties(NULL, hPrinter,

pPrinterName, pi2->pDevMode, pi2->pDevMode, DM_IN_BUFFER | DM_OUT_BUFFER);

if (lFlag != IDOK){

GlobalFree(pi2);ClosePrinter(hPrinter);if (pDevMode)

GlobalFree(pDevMode);return FALSE;

}

// Update printer information...bFlag = SetPrinter(hPrinter, 2, (LPBYTE)pi2, 0);if (!bFlag)// The driver doesn't support, or it is unable to make the change...

129292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 134: printer

{GlobalFree(pi2);ClosePrinter(hPrinter);if (pDevMode)

GlobalFree(pDevMode);return FALSE;

}

// Tell other apps that there was a change...SendMessageTimeout(HWND_BROADCAST, WM_DEVMODECHANGE, 0L,

(LPARAM)(LPCSTR)pPrinterName, SMTO_NORMAL, 1000, NULL);

// Clean up...if (pi2)

GlobalFree(pi2);if (hPrinter)

ClosePrinter(hPrinter);if (pDevMode)

GlobalFree(pDevMode);

return TRUE;}

NOTES:

1. The first call of the DocumentProperties() function will return the size needed for the devmode. The returned size should be the same as the size of the BlackIceDEVMODE structure. If the returned size is not the same as the size of the BlackIceDEVMODE structure, please check the following:

a. Make sure that the printer handle you specified as the second parameter in the DocumentProperties function call was obtained by calling the OpenPrinter function with a Black Ice printer. Non Black Ice printers will have a different DEVMODE structure and this is the reason why the size is not correct.

b. Make sure that the structure member alignment in your project is set to 1 and the following values have been defined: UNICODE, _UNICODE, _WIN32_WINNT=0x0400.

c. The correct size of the BlackIceDEVMODE structure is 0x136A.

2. Modify the printer settings by modifying members of the BlackIceDEVMODE structure. The devmode.h and devmode.cpp file provides a set of functions that access and modify members of the structure. It is not recommended modifying any structure member directly, but through the functions from the devmode.h file. On Windows XP/W2K and XP all the string members of the structure are UNICODE. When you modify these members, please make sure that the new value is a UNICODE string.The following code sample sets the output directory to “c:\temp” and sets the printer to

130292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 135: printer

use the “image.tif” file name as image file name for the printed document.

DEVMODE_SetOutputDirectory(pDevMode, TEXT("C:\\TEMP"));DEVMODE_SetFileGenerationMethod(pDevMode, FILENAME_EXACT_DEVMODE);DEVMODE_SetImageFileName(pDevMode, TEXT(“IMAGE.TIF”));

131292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 136: printer

Fax BoardsGammaLink Fax BoardsIn order to generate images for the GammaFax board use the following settings:

File Format = “Tiff Group 3. 1 Dimension with Fillbits”

Paper Size =“Fax Paper” or “Create faxable Image” checkbox checked.

Graphic Resolution = “Fine FAX Resolution” or “Standard FAX Resolution”

At this point the DPI setting has to be 204 x 98 or 204 x 196.

The “Reverse Bit Order” checkbox should be checked.

Dialogic VFX Fax BoardsThe driver settings for Dialogic fax boards are the same as the GammaLink settings above.

Bicom Fax BoardThe Win95 printer driver settings must be the following:

File Format = “Tiff Group 3 1 Dimension with Fillbits”

Paper Size =“Fax Paper” or “Create faxable Image” checkbox checked.

Graphic Resolution = “Fine FAX Resolution” or “Standard FAX Resolution”

At this point the DPI setting has to be 204 x 98 or 204 x 196.

The “Reverse Bit Order” checkbox should be unchecked.

Commetrex Fax BoardSame as Bicom Fax Boards.

Natural Micro Systems Fax BoardSame as Bicom Fax Boards.

132292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 137: printer

XP/W2K and NT Resource ToolkitDirectory structure of the Resource ToolkitRun Setup.exe on the installation CD to install the Resource Toolkit. In the specified destination directory you will have the following subdirectories (see the ‘Components of the Resource Toolkit’ chapter below for a detailed description about the contents of the individual directories):

Install\IIS6: Sample InstallShield project that demonstrates how to install the printer driver.

Install\InstallDLL: Sample installation DLL that is used by InstallShield to install the printer driver.

Install\UninstallDLL: Sample un-installation DLL that is used by InstallShield to remove the printer driver.

OCX The BiPrnDrv.ocx file. This OCX is used to capture printer driver messages.

Message Capture Sample: Visual C++ application that demonstrates how to capture printer driver messages.

ResourceDLL: The source code for the resource DLL used by the driver.VB Message Capture Sample: VB 6 application that demonstrates how to capture printer

driver messages.

133292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 138: printer

Components of the Resource Toolkit1. InstallThe Install directory contains samples that demonstrate how to install the printer driver. There is an Install DLL, Uninstall DLL and an Install Shield 6.2 project.The Install Shield project calls functions that are implemented in the Install DLL. The DLL can be compiled with Visual C++ and it should be placed into the “Setup Files\Compressed Files\Language Independent\OS Independent” folder in the Install Shield projects directory structure.1.1 The Install DLL

The Install DLL (MyDll_NT.dll) is used by the Install Shield project. The Install DLL contains functions to add and remove components of the driver like the Port Monitor, Print Processor, Driver and Printer. The functions of the Install DLL can also be used to change the DEVMODE members’ values and set the printer driver settings at install time.

NOTE: In the XP/W2k/NT driver, the DEVMODE is handled as UNICODE. The Install DLL has to be compiled with the following project settings:

The Structure Alignment must be 1 byte.

The following defines must be defined in the project: UNICODE, _UNICODE, _WIN32_WINNT=0x0400

To change a member of the DEVMODE at install time follow the steps below:

1. Call the dSetParameter() function from the Install DLL to set a member of the DEVMODE structure.

2. Repeat step 1 for each member of the DEVMODE you wish to set.When all of the members are set to the required value, call the dDocumentProperties() function from the Install DLL to write the new settings to the printer.

1.2 The dSetParameter() functionCall the dSetParameter() function from the Install DLL to set a member of the DEVMODE.

dSetParameter(HWND MainWnd, LPLONG lpLong, LPSTR lpStringTmp)

The parameters of the function are:

134292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 139: printer

HWND MainWnd - a window handle (can be NULL)LPLONG lpLong - a pointer to a long value. Represents the member of the DEVMODE to be changed. The valid values are defined in the ‘setup.h’ file

// Parameters to call dSetParameter()

#define PAR_INIC_PARAMETERS 0 // clear ALL parameters & set default values.#define PAR_DRIVER_VERZIO 1 // numeric#define PAR_DRIVER_NAME 2 // string#define PAR_DRIVER_DRIVERFILE 3 // string#define PAR_DRIVER_DATAFILE 4 // string#define PAR_DRIVER_CONFIGFILE 5 // string#define PAR_PRINTER_NAME 101 // string#define PAR_PRINTER_PORT 102 // string#define PAR_PRINTER_PROCESS 103 // string#define PAR_PRINTER_DATATYPE 104 // string

// members of the Windows DEVMODE (BlackIceDEVMODE.DM)#define PAR_DEVMODE_ORIENT 201 // numeric (VAL_LANDSCAPE or VAL_PORTRAIT)#define PAR_DEVMODE_PAPERSIZE 202 // numeric (VAL_PAPER_xxx)#define PAR_DEVMODE_PAPERLENGTH 203 // numeric#define PAR_DEVMODE_PAPERWIDTH 204 // numeric#define PAR_DEVMODE_DITHER 205 // numeric (VAL_DITHER_xx)#define PAR_DEVMODE_XDPI 206 // numeric#define PAR_DEVMODE_YDPI 207 // numeric

// members of the BlackIceDEVMODE#define PAR_DEVMODE_FILEFORMAT 301 // mumeric (VAL_xxx_INDX(_xxx))#define PAR_DEVMODE_RENAMEDLGBOX 302 // VAL_YES or VAL_NO#define PAR_DEVMODE_OUTDIR 303 // string#define PAR_DEVMODE_FAXHEADER 304 // numeric#define PAR_DEVMODE_APPENDIMAGE 305 // VAL_YES or VAL_NO#define PAR_DEVMODE_STARTAPPLICATION 306 // VAL_YES or VAL_NO#define PAR_DEVMODE_APPLICATIONPATH 307 // string#define PAR_DEVMODE_SERVERKEY 308 // string#define PAR_DEVMODE_PAGENUMBERING 309 // VAL_YES or VAL_NO#define PAR_DEVMODE_WRITETEXT 310 // VAL_YES or VAL_NO#define PAR_DEVMODE_ADVTEXT 311 // VAL_YES or VAL_NO#define PAR_DEVMODE_REVERSEFILLORDER 312 // VAL_YES or VAL_NO#define PAR_DEVMODE_CREATEFAXABLEIMAGE 313 // VAL_YES or VAL_NO#define PAR_DEVMODE_FILENAMEGEN 314 // numeric#define PAR_DEVMODE_GLYPHSUPPORT 315 // numeric#define PAR_DEVMODE_DITHERING 316 // numeric#define PAR_DEVMODE_BRIGHTNESS 317 // numeric#define PAR_DEVMODE_COLORDEPTH 318 // numeric#define PAR_DEVMODE_RESOURCEDLLNAME 319 // string#define PAR_DEVMODE_APPLICATION_STARTBEFOREPRINT 320 // VAL_YES or VAL_NO#define PAR_DEVMODE_PASSPARAMETERS 321 // VAL_YES or VAL_NO#define PAR_DEVMODE_SHOWAPPLICATIONWINDOW 322 // numeric VAL_START_NORMAL

135292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 140: printer

#define PAR_DEVMODE_DISABLE_MESSAGING_INTERFACE 323 // VAL_YES or VAL_NO#define PAR_DEVMODE_EXTENSION 324 // string#define PAR_DEVMODE_INTERFACENAME 325 // string

LPSTR lpStringTmp - Represents the new value of the DEVMODE member specified in the lpLong parameter.

Return ValueThe dSetParameter() will return FALSE if the value passed in the lpLong parameter is not valid (code to set the specified DEVMODE member is not present in the dSetParameter() function) , otherwise TRUE. Check the ‘How to add code to set a member of the DEVMODE’ section of the manual for information on implementing your own code to set the DEVMODE members.

1.3 The dDocumentProperties() function

The dDocumentProperties() function is called from the Install DLL by the Install Shield project to write the changes in the devmode to the printer.

dDocumentProperties(HWND MainWnd, LPLONG lpLong, LPTSTR lpString)

HWND MainWnd - handle to a window (can be NULL)LPLONG lpLong - pointer to a long value. A handle to the printer to set. By default the value can be NULL. In this case the currently installed printer settings will be chanced.LPTSTR lpString - pointer to a string value. The value is not used, can be NULL;

All of these parameters are only necessary, because of the Install Shield DLL calling format.

If an error occurs return GetLastError(), or 0 on success.

1.4 Example to set a member of the DEVMODE at install timeFor example, we will set the horizontal DPI for the printer driver in the Install Shield RUL file to 300 DPI.:

STRING G_DllFileName;STRING DllProc;STRING ParamValue;LONG tmpLong;NUMBER nResult;

G_DllFileName = SUPPORTDIR ^ "MYDLL_NT.DLL";

DllProc = "dSetParameter";tmpLong = PAR_DEVMODE_XDPI;

ParamValue = "300"; CallDLLFx( G_DllFileName, DllProc, tmpLong, ParamValue);

136292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 141: printer

DllProc = "dDocumentProperties"; tmpLong = 0; ParamValue = ""; CallDLLFx( G_DllFileName, DllProc, tmpLong, ParamValue );

1.5 How to add code to set a member of the DEVMODEYou can add code to the Install DLL and/or to your Install Shield project to set any member of the DEVMODE.

For example, set the printer at install time to enable text output. To enable text output we have to set the BLF_WRITETEXT flag of the BliceMode member of the BlackIceDEVMODE structure.

The BlackIceDEVMODE structure is defined in the ‘devmode.h’ file in the Install DLL project.In the devmode.cpp file, there are several functions defined to access the members of the BlackIceDEVMODE structure. To access the BliceMode member, you can use the following functions:

BOOL DEVMODE_IsWriteTextEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableWriteText(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableWriteText(BlackIceDEVMODE* pDevMode)

1. Define a new value in the ‘setup.h’ file in the Install DLL project for each member you want to access:

#define PAR_DEVMODE_ADVTEXT 311

2. Modify the dSetParameter() function in the ‘setupdll.cpp’ file in the Install DLL project. Add the following to the ‘switch’ statement:

case PAR_DEVMODE_ADVTEXT: if ( _ttoi(lpString))

DEVMODE_ EnableWriteText (&DefDevMode);else

DEVMODE_ DisableWriteText (&DefDevMode);break;

3. Modify the dDocumentProperties() function in the ‘setupdll.cpp’ file in the Install DLL project. Add the following code to the dDocumentProperties(), before the last call of the DocumentProperties() function:

Modify the flag only if it was set.

if (DEVMODE_IsWriteTextEnabled(&DefDevMode))DEVMODE_EnableWriteText (pBlackIceDevmode);

elseDEVMODE_DisableWriteText (pBlackIceDevmode);

137292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 142: printer

4. Rebuild the Install DLL and copy the file to the Install Shield project “Setup Files\Compressed Files\Language Independent\OS Independent” folder.

Open the Install Shield project. Open the script file. Add the following code to the RUL file:

STRING G_DllFileName;STRING DllProc;STRING ParamValue;LONG tmpLong;NUMBER nResult;

G_DllFileName = SUPPORTDIR ^ "MYDLL_NT.DLL";

DllProc = "dSetParameter";tmpLong = PAR_DEVMODE_ADVTEXT;

ParamValue = VAL_YES; CallDLLFx( G_DllFileName, DllProc, tmpLong, ParamValue);

DllProc = "dDocumentProperties"; tmpLong = 0; ParamValue = ""; CallDLLFx( G_DllFileName, DllProc, tmpLong, ParamValue );

NOTE: Important ! The printer must be installed correctly before you call the dSetParameter() and dDocumentProprieties() functions to change the settings.

1.6 Functions of the Install DLLThe Install directory contains samples that demonstrate how to install the printer driver. There is an Install DLL, Uninstall DLL and an Install Shield 6.2 project.The Install Shield project calls functions that are implemented in the Install DLL. The Install DLL can be compiled with Visual C++ and it should be placed into the “Setup Files\Compressed Files\Language Independent\OS Independent” folder in the Install Shield projects directory structure.The Install DLL (MyDll_NT.dll) is used by the Install Shield project. The Install DLL contains functions to add and remove components of the driver like the Port Monitor, Print Processor, Driver and Printer. The functions of the Install DLL can also be used to change the DEVMODE members’ values and set the printer driver settings at install time.

dIsInstalledPrinterDriver(LPSTR szDriverName) -Returns TRUE if the printer driver is already installed.

dDeletePrinterDriver(HWND MainWnd, LPLONG lpLong, LPSTR lpStringTmp)) – deletes the specified printer driver– MainWnd - windows handle– LpLong - not used, the value can be NULL;

138292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 143: printer

– lpStringTmp - Specifies the name of the printer driver to be deleted.– Returns FALSE if the printer driver could not be deleted.

dIsPrintProcessorInstalled(LPSTR lpPrintProcessorName)- Returns TRUE if the specified print processor is already installed

dDeletePrintProcessor(LPSTR lpPrintProcessor)- Deletes the specified print processor.- Returns TRUE if the print processor was deleted, otherwise returns the GetLastError()

value.

dAddPrintProcessor(LPSTR lpProcessorDllName, LPSTR lpProcessorName)- Adds the specified print processor to the system.- lpProcessorDllName - the name of the print processor dll- lpProcessorName - the name of the print processor- Returns 0 on success, otherwise GetLastError().

dIsPortMonitorInstalled(LPSTR lpMonitorName)- Returns TRUE if the specified port monitor is installed

dAddPortMonitor(LPSTR lpMonitorDllName, LPSTR lpMonitorName)- adds the specified port monitor to the system- lpMonitorDllName - the dll file name- lpMonitorName - the name of the port monitor- Returns 0 if the port monitor was successfully added, otherwise returns the GetLastError();

dIsPortInstalled(LPSTR lpPortName, LPSTR lpMonitorName)- Returns TRUE if the port is already installed, otherwise FALSE- lpPortName - the name of the port - lpMonitorName - the name of the port monitor

dAddPort(LPSTR lpPortName, LPSTR lpMonitorName)- Adds the specified port to the specified port monitor- lpPortName - the name of the port to be added- lpMonitorName - the name of the port monitor to add the port to

dAddPrinterDriver(HWND MainWnd, LPLONG lpLong, LPSTR lpStrTemp)- Adds the specified printer driver to the system- MainWnd - handle to a window- lpLong - pointer to a long value. Not used, the value can be 0.- lpStrTemp - the name of the driver to be installed- Returns 1 if the driver is already installed. Returns GetLastError() if adding the driver

failed. Returns 0 on success.

dAddPrinter( LPSTR szPrinterNameTmp, LPSTR szPrinterPortTmp,

139292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 144: printer

LPSTR szDriverNameTmp, LPSTR szPrintProcessorTmp )

- Adds the specified printer to the system- szPrinterName - the name of the printer to be added- szPrinterPort - specifies the name of the port the printer will be connected to- szDriverName - the name of the printer driver- szPrintProcessor - the name of the print processorNOTE: The printer driver, the port and the print processor must be installed before calling the dAddprinter() function.

dDocumentProperties(HWND MainWnd, LPLONG lpLong, LPTSTR lpString)- writes the settings modified by the dSetParameters() function to the installed printer- MainWnd - handle to a window. Not used. - lpLong - pointer to a value A handle to the printer to set. By default the value can be NULL. In this case the currently installed printer settings will be chanced.- lpString - a string value. Not used.

If an error occurs function return the GetLastError() error code, otherwise 0.

dSetParameter(HWND MainWnd, LPLONG lpLong, LPSTR lpStringTmp)- Modifies the settings of the printer one at a time. After calling this function for all the

required settings, the dDocumentProperties() must be called to write the settings to the printer.

- MainWnd - handle to a window- lpLong - pointer to a long value. Represents the member of the DEVMODE to be

changed. The valid values are defined in the ‘setup.h’ file. See “1.2 The dSetParameter()” for details

- lpStringTmp - Represents the new value of the DEVMODE member specified in the lpLong parameter.

- Return Value - The dSetParameter() will return FALSE if the value passed in the lpLong parameter is not valid (code to set the specified DEVMODE member is not present in the dSetParameter() function) , otherwise TRUE. Please see the ‘How to add code to set a member of the DEVMODE’ section for information on implementing your own code to set the DEVMODE members.

CreateRegistryKeyForApplicationStarting(DWORD PrinterType); This function will create the required entries in the registry for the “Start Application” feature.The registry key will be created under the “HKEY_LOCAL_MACHINE\Black Ice Software, Inc.\” key. The registry key is different for each printer driver.- DWORD PrinterType – the printer to create the registry keys for.

The values of the PrinterType can be one of the followings:0 = Color NT1 = Monocrome NT

140292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 145: printer

2 = Emf NT3 = Color Terminal Server4 = Mono Terminal Server5 = Emf Terminal Server

The function will also grant full access to the “Everyone” and “Administrator” groups to this key in the registry. The system administrator can change the access rights for these registry keys and can add or remove access rights for different groups and users after installation.NOTE: To be able to launch an application after printing, using the printer driver’s “Start Application” feature, the user must have read/write permission to these registry keys! If the read/write process fails, the application will not be launched by the printer driver.

CreateRegistryKeyForApplicationStarting_ColorNT()CreateRegistryKeyForApplicationStarting_MonoNT()CreateRegistryKeyForApplicationStarting_EmfNT()CreateRegistryKeyForApplicationStarting_ColorTS()CreateRegistryKeyForApplicationStarting_MonoTS()CreateRegistryKeyForApplicationStarting_EmfTS()

- Each of these functions will create a registry entry for the printer driver. They will call the “CreateRegistryKeyForApplicationStarting” function and will pass the required parameter.

Where to find the most recent driver files ? In order to build a new installation for the driver use the Install Shiled sample project

shipped with the driver located in the Resource Toolkit. Please remember that the Install Shield project is only a sample to show how to install the printer driver. The sample project may NOT contain the most recent version of the driver files. The most recent version of the driver files are always installed with the printer driver. They are located by default in the "C:\Program Files\Black Ice Software, Inc\Black Ice Color Printer Driver\Distribution" folder. (for the color driver for example) Replace the driver files from the Install Shield sample project with the most recent driver files from the "Distribution" folder.

Warning: Please note that the print processor for NT is different than for W2K and XP. Description of the files for the color driver:

...\Distribution\ BiCDrvNT.dll - Driver file for NT/W2K/XP ...\Distribution\ BiCiniNT.ini - Initialization file for NT/W2K/XP ...\Distribution\ BiCMonNT.dll - Port Monitor file for NT/W2K/XP ...\Distribution\ BiCRmvNT.dll - Resource file for NT/W2K/XP ...\Distribution\ BiCRmvNT.dll - Library for the driver uninstall for NT/W2K/XP ...\Distribution\ BiCUifNT.dll - User Interface file for NT/W2K/XP ...\Distribution\ BiCProNT.dll - Print processor file for NT

141292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 146: printer

...\Distribution\Process.2k\BiCProNT.dll - Print processor file for Win2000 and XP ...\Distribution\ BiImg.dll - file for NT/W2K/XP ...\Distribution\ JPEG32.DLL - file for NT/W2K/XP ...\Distribution\ TIFF32.DLL - file for NT/W2K/XP ...\Distribution\ BiCAppNT.exe - Application starter file for NT

Description of the files for the TIFF (monochrome) driver:

...\Distribution\ BiMDrvNT.dll - Driver file for NT/W2K/XP ...\Distribution\ BiMiniNT.ini - Initialization file for NT/W2K/XP ...\Distribution\ BiMMonNT.dll - Port Monitor file for NT/W2K/XP ...\Distribution\ BiMRmvNT.dll - Resource file for NT/W2K/XP ...\Distribution\ BiMRmvNT.dll - Library for the driver uninstall for NT/W2K/XP ...\Distribution\ BiMUifNT.dll - User Interface file for NT/W2K/XP ...\Distribution\ BiMProNT.dll - Print processor file for NT ...\Distribution\Process.2k\BiMProNT.dll - Print processor file for Win2000 and XP ...\Distribution\ BiImg.dll - file for NT/W2K/XP ...\Distribution\ JPEG32.DLL - file for NT/W2K/XP ...\Distribution\ TIFF32.DLL - file for NT/W2K/XP ...\Distribution\ BiMAppNT.exe - Application starter file for NT

Description of the files for the EMF (Enhanced metafile) driver:

...\Distribution\ BiEDrvNT.dll - Driver file for NT/W2K/XP ...\Distribution\ BiEiniNT.ini - Initialization file for NT/W2K/XP ...\Distribution\ BiEMonNT.dll - Port Monitor file for NT/W2K/XP ...\Distribution\ BiERmvNT.dll - Resource file for NT/W2K/XP ...\Distribution\ BiERmvNT.dll - Library for the driver uninstall for NT/W2K/XP ...\Distribution\ BiEUifNT.dll - User Interface file for NT/W2K/XP ...\Distribution\ BiEProNT.dll - Print processor file for NT ...\Distribution\Process.2k\BiEProNT.dll - Print processor file for Win2000 and XP ...\Distribution\ BiImg.dll - file for NT/W2K/XP ...\Distribution\ JPEG32.DLL - file for NT/W2K/XP ...\Distribution\ TIFF32.DLL - file for NT/W2K/XP ...\Distribution\ BiEAppNT.exe - Application starter file for NT

Terminal Server Driver files

142292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 147: printer

Warning: Please note that the print processor for NT Terminal Server is different than for W2K Terminal Server and XP Terminal Server Description of the files for the color driver:

...\Distribution\ BiCDrvTS.dll - Driver file for NT/W2K/XP Terminal Server ...\Distribution\ BiCiniTS.ini - Initialization file for NT/W2K/XP Terminal Server ...\Distribution\ BiCMonTS.dll - Port Monitor file for NT/W2K/XP Terminal Server ...\Distribution\ BiCRmvTS.dll - Resource file for NT/W2K/XP Terminal Server ...\Distribution\ BiCRmvTS.dll - Library for the driver uninstall for NT/W2K/XP Terminal Server ...\Distribution\ BiCUifTS.dll - User Interface file for NT/W2K/XP Terminal Server ...\Distribution\ BiCProTS.dll - Print processor file for NT Terminal Server ...\Distribution\Process.2k\BiCProTS.dll - Print processor file for Win2000 and XP Terminal Server ...\Distribution\BiCAppTS.exe - program launcher for NT/W2K/XP Terminal Server ...\Distribution\ BiImg.dll - file for NT/W2K/XP Terminal Server ...\Distribution\ JPEG32.DLL - file for NT/W2K/XP Terminal Server ...\Distribution\ TIFF32.DLL - file for NT/W2K/XP Terminal Server

- file for NT/W2K/XP Terminal Server

Description of the files for the TIFF (monochrome) driver:

...\Distribution\ BiMDrvTS.dll - Driver file for NT/W2K/XP Terminal Server ...\Distribution\ BiMiniTS.ini - Initialization file for NT/W2K/XP Terminal Server ...\Distribution\ BiMMonTS.dll - Port Monitor file for NT/W2K/XP Terminal Server ...\Distribution\ BiMRmvTS.dll - Resource file for NT/W2K/XP Terminal Server ...\Distribution\ BiMRmvTS.dll - Library for the driver uninstall for NT/W2K/XP Terminal Server ...\Distribution\ BiMUifTS.dll - User Interface file for NT/W2K/XP Terminal Server ...\Distribution\ BiMProTS.dll - Print processor file for NT Terminal Server ...\Distribution\Process.2k\BiMProTS.dll - Print processor file for Win2000 and XP Terminal Server ...\Distribution\BiMAppTS.exe - program launcher for NT/W2K/XP Terminal Server ...\Distribution\ BiImg.dll - file for NT/W2K/XP Terminal Server ...\Distribution\ JPEG32.DLL - file for NT/W2K/XP Terminal Server ...\Distribution\ TIFF32.DLL - file for NT/W2K/XP Terminal Server

Description of the files for the EMF (Enhanced metafile) driver:

...\Distribution\ BiEDrvTS.dll - Driver file for NT/W2K/XP Terminal Server143

292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112© 1989 – 2001 Black Ice Software Inc.

Information Contained Is Not For Reproduction Or Distribution

Page 148: printer

...\Distribution\ BiEiniTS.ini - Initialization file for NT/W2K/XP Terminal Server ...\Distribution\ BiEMonTS.dll - Port Monitor file for NT/W2K/XP Terminal Server ...\Distribution\ BiERmvTS.dll - Resource file for NT/W2K/XP Terminal Server ...\Distribution\ BiERmvTS.dll - Library for the driver uninstall for NT/W2K/XP Terminal Server ...\Distribution\ BiEUifTS.dll - User Interface file for NT/W2K/XP Terminal Server ...\Distribution\ BiEProTS.dll - Print processor file for NT Terminal Server ...\Distribution\Process.2k\BiEProTS.dll - Print processor file for Win2000 and XP Terminal Server ...\Distribution\BiEAppTS.exe - program launcher for NT/W2K/XP Terminal Server ...\Distribution\ BiImg.dll - file for NT/W2K/XP Terminal Server ...\Distribution\ JPEG32.DLL - file for NT/W2K/XP Terminal Server ...\Distribution\ TIFF32.DLL - file for NT/W2K/XP Terminal Server

How to install the printer driver with a different package other than Install Shield?To install the printer driver with another installation building package other than Install Shield, please follow the steps below:

1. Make sure that the installation builder you are using can call functions from external DLLs. In order to install and configure the printer driver, you will need to call functions from the Install DLL.

2. Before trying to install the printer driver, make sure that the driver is not currently installed. To check, call the dIsInstalledPrinterDriver function from the Install DLL. If the driver is currently installed you need to delete the printer driver by calling the dDeletePrinterDriver function. Copy the printer driver files to the right location. The following table shows the files needed by each printer driver and the location where the files should be copied.

144292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 149: printer

Printer driver File description Filename Target locationMonochrome printer driver for Windows NT/2000/XP

Driver file BiMDrvNT.dll < DRIVERDIR >Print processor file BiMProNT.dll < PROCESSORDIR

>Port monitor file BiMMonNT.dll <SYSTEM>User Interface DLL BiMUifNT.dll < DRIVERDIR >Resource DLL BiMResNT.dll < SYSTEM >Driver Remove DLL BiMRmvNT.dll < SYSTEM >Driver initialization file BiMIniNT.ini < DRIVERDIR >TIFF DLL Tiff32.dll <SYSTEM>,

<WINDOWS>JPEG DLL JPEG32.dll <SYSTEM>,

<WINDOWS>Port monitor utility DLL

BiImg.dll <SYSTEM>, <WINDOWS>

Application Starter BiMAppNT.exe < SYSTEM >Color printer driver for Windows NT/2000/XP

Driver file BiCDrvNT.dll < DRIVERDIR >Print processor file BiCProNT.dll < PROCESSORDIR

>Port monitor file BiCMonNT.dll <SYSTEM>User Interface DLL BiCUifNT.dll < DRIVERDIR >Resource DLL BiCResNT.dll < SYSTEM >Driver Remove DLL BiCRmvNT.dll < SYSTEM >Driver initialization file BiCIniNT.ini < DRIVERDIR >TIFF DLL Tiff32.dll <SYSTEM>,

<WINDOWS>JPEG DLL JPEG32.dll <SYSTEM>,

<WINDOWS>Port monitor utility DLL

BiImg.dll <SYSTEM>, <WINDOWS>

Application Starter BiCAppNT.exe < SYSTEM >Metafile printer driver for Windows NT/2000/XP

Driver file BiEDrvNT.dll < DRIVERDIR >Print processor file BiEProcNT.dll < PROCESSORDIR

>Port monitor file BiEMonNT.dll <SYSTEM>User Interface DLL BiEUifNT.dll < DRIVERDIR >Resource DLL BiEResNT.dll <SYSTEM>Driver Remove DLL BiERmvNT.dll < SYSTEM >Driver initialization file BiECIniNT.ini < DRIVERDIR >

145292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 150: printer

TIFF DLL Tiff32.dll <SYSTEM>, <WINDOWS>

JPEG DLL JPEG32.dll <SYSTEM>, <WINDOWS>

Port monitor utility DLL

BiImg.dll <SYSTEM>, <WINDOWS>

Application Starter BiCAppNT.exe < SYSTEM >

146292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 151: printer

Printer driver File description Filename Target locationMonochrome printer driver for Windows NT/2000/XP Terminal Server

Driver file BiMDrvTS.dll < DRIVERDIR >Print processor file BiMProTS.dll < PROCESSORDIR

>Port monitor file BiMMonTS.dll <SYSTEM>User Interface DLL BiMUifTS.dll < DRIVERDIR >Resource DLL BiMResTS.dll < SYSTEM >Driver Remove DLL BiMRmvTS.dll < SYSTEM >Driver initialization file BiMIniTS.ini < DRIVERDIR >TIFF DLL Tiff32.dll <SYSTEM>,

<WINDOWS>JPEG DLL JPEG32.dll <SYSTEM>,

<WINDOWS>Port monitor utility DLL

BiImg.dll <SYSTEM>, <WINDOWS>

Application launcher for Terminal Server only

BiMAppTS.exe <SYSTEM>,

Color printer driver for Windows NT/2000/XP Terminal Server

Driver file BiCDrvTS.dll < DRIVERDIR >Print processor file BiCProTS.dll < PROCESSORDIR

>Port monitor file BiCMonTS.dll <SYSTEM>User Interface DLL BiCUifTS.dll < DRIVERDIR >Resource DLL BiCResTS.dll < SYSTEM >Driver Remove DLL BiCRmvTS.dll < SYSTEM >Driver initialization file BiCIniTS.ini < DRIVERDIR >TIFF DLL Tiff32.dll <SYSTEM>,

<WINDOWS>JPEG DLL JPEG32.dll <SYSTEM>,

<WINDOWS>Port monitor utility DLL

BiImg.dll <SYSTEM>, <WINDOWS>

Application launcher for Terminal Server only

BiMAppTS.exe <SYSTEM>,

Metafile printer driver for Windows NT/2000/XP and Terminal Server

Driver file BiEDrvTS.dll < DRIVERDIR >Print processor file BiEProcTS.dll < PROCESSORDIR

>Port monitor file BiEMonTS.dll <SYSTEM>User Interface DLL BiEUifTS.dll < DRIVERDIR >Resource DLL BiEResTS.dll <SYSTEM>

147292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 152: printer

Driver Remove DLL BiERmvTS.dll <SYSTEM>Driver initialization file BiECIniTS.ini <SYSTEM>TIFF DLL Tiff32.dll <SYSTEM>,

<WINDOWS>JPEG DLL JPEG32.dll <SYSTEM>,

<WINDOWS>Port monitor utility DLL

BiImg.dll <SYSTEM>, <WINDOWS>

Application launcher for Terminal Server only

BiEAppTS.exe <SYSTEM>,

<SYSTEM> The default location for the driver files is the \WINDOWS\system directory. <WINDOWS>The Windows directory.<DRIVERDIR> - For NT / Windows 2000, the default location for the driver files is the \

WINNT\system32\spool\drivers\w32x86 and the \WINNT\system32\spool\drivers\w32x86\2 directory (the files should be copied in both these directories). To retrieve the location of this folder, use the “dGetPrinterDriverDirectory” function from the InstallDLL.

<PROCESSORDIR> - For NT / Windows 2000, the default location for the print processor files is the \WINNT\system32\spool\prtprocs\w32x86 directory. To retrieve the location of this folder, use the "dGetPrintProcessorDirectory” function from the InstallDLL.

1. Set the printer driver installation parameters by using the dSetParameters function from the InstallDLL. The following parameters should be set: - Initialize default values by calling dSetParameter with PAR_INIC_PARAMETERS and VAL_INIC_BLICENT.- Set the name of the printer driver user interface DLL file by calling dSetParameter with PAR_DRIVER_CONFIGFILE and specify the name of the DLL.- Set the name of the driver file by calling dSetParameter with PAR_DRIVER_FILE and specify the name of the driver file.- Set the name of the driver config file by calling dSetParameter PAR_DRIVER_DRIVERFILE. - Set the print processor name by calling dSetParameter with PAR_PRINTER_PROCESS- Set the port name by calling dSetParameter with PAR_PRINTER_PORT- Set the name of the driver INI file by calling dSetParameter PAR_DRIVER_DATAFILE.

2. Check if the port monitor is already installed by calling dIsPortMonitorInstalled. If the port monitor is already installed, you do not need to install

148292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 153: printer

the port monitor again. Otherwise, use the dAddPortMonitor function to install the port monitor. Specify the name of the port monitor DLL and the name of the port monitor as a parameter.

3. Check if the printer port is already installed or not by calling the dIsPortInstalled function. If the port is already installed, it is not needed to add a new port, otherwise call the dAddPort function to add a new port. The dAddPort function takes a port name and a monitor name as a parameter.

4. Install the printer driver by calling the "dAddPrinterDriver" function with the name of the Printer driver you want to use.

5. Check if the print processor is already installed by calling the dIsPrintProcessorInstalled function. If the print processor is not installed, install the Black Ice print processor by calling the dAddPrintProcessor function from the InstallDLL.

6. Install the printer by calling the "dAddPrinter" function with the name of the printer you want to install.

7. To modify values in the DEVMODE structure and make changes in the printer driver settings, call the dSetParameter function. The different values that can be changed are listed in the devmode.h file in the InstallDLL project.

8. After modifying the printer driver settings, call "dDocumentProperties" to store the modified settings.

9. Close the printer by calling dClosePrinter.

Which are the correct parameters to call the dSetParameter() function to install the printer driverTo correctly install the XP/Win2000/NT and terminal Server driver from an Install Shield script call the dSetParameter() function from the install DLL with the following parameters. Use the install dll (mydll_NT.dll) from the XP/NT/Win2000 Resource toolkit.

DllProc = "dSetParameter"; tmpLong = PAR_INIC_PARAMETERS; ParamValue = VAL_INIC_BLICENT; nResult = CallDLLFx(G_DllFileName, DllProc, tmpLong, ParamValue); DriverFiles = @PRINTER_NAME; // the name of the printer tmpLong = PAR_PRINTER_NAME; nResult = CallDLLFx(G_DllFileName, DllProc, tmpLong, DriverFiles);

DriverFiles = G_DriverDir ^ @USER_INTERFACE_NAME; // the name and full path of the user interface dll (i.e. BiCuifNT.dll for the NT Color driver) tmpLong = PAR_DRIVER_CONFIGFILE; nResult = CallDLLFx(G_DllFileName, DllProc, tmpLong, DriverFiles); DriverFiles = G_DriverDir ^ @DRIVER_FILE; // the name and full path of the driver dll (i.e. BiCDrvNT.dll for the NT Color driver)

149292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 154: printer

tmpLong = PAR_DRIVER_DRIVERFILE; nResult = CallDLLFx(G_DllFileName, DllProc, tmpLong, DriverFiles);

DriverFiles = G_DriverDir ^ @DRIVER_CONFIG_INI; // the name and full path of the INI configuration file (i.e. BiCIniNT.ini for the NT Color driver) tmpLong = PAR_DRIVER_DATAFILE; nResult = CallDLLFx(G_DllFileName, DllProc, tmpLong, DriverFiles);

DriverFiles = @PROCESSOR_NAME; // The name of the print processor (i.e. “Color Print Processor” for the NT Color driver) tmpLong = PAR_PRINTER_PROCESS; nResult = CallDLLFx(G_DllFileName, DllProc, tmpLong, DriverFiles); DriverFiles = @PORT_NAME; //The name of the port to install the printer to. (i.e. “IcePortCR:” for the NT Color driver) tmpLong = PAR_PRINTER_PORT; nResult = CallDLLFx(G_DllFileName, DllProc, tmpLong, DriverFiles);

How to set the printer setting at install time using an INI file?

To set the printer driver settings at install time a specific INI file can be used. The INI file is located by default in the "C:\Program Files\Black Ice Software, Inc\Black Ice Color Printer Driver\Distribution" folder. (for the color driver for example)The “Distribution” folder is installed with the Printer Driver.The INI file name is:

BiCIniNT.ini - for the Color driver BiEIniNT.ini - for the EMF (metafile) driver BiMIniNT.ini - for the TIFF (monochrome) driver

Modify the contents of this INI file to match your requirements.Replace the INI file located in the “Driver Files” folder of the Install Shield project with the new modified INI file.Rebuild the Install Shield project.In this case if the Install Shield project doesn’t set the printer default settings, the settings from the INI file will be used.

The structure of the INI file (for the monochrome driver):

[Default Settings]Paper Size =1;Specify this for Variable Paper SizePaper Width = Paper Length =X DPI =300

150292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 155: printer

Y DPI =300Orientation =1File Format =3BitsPerPixel =1Flags =188448Brightness =100;Specify this for Variable Paper Size In PixelsPaperWidthInPixels =PaperHeightInPixels =FAXheader = 0LossRatio = 54Dithering = 0FileNameGenerationFlags = 0FileNamePrefix=AAAFileExtension =TIFINIFileName=FixedFileName=ApplicationPath=C:\windows\notepad.exeLaunchFlags=10InterfaceName=MonoMessageInterfaceResourceDLLName =TIFFDLLName =JPEGDLLName =OutputDirectory =

Description of the values

Paper Size=<number>

Specifies the paper format used by the printer.

Paper Type <number> Description

LETTER 1 /* Letter 8 1/2 x 11 in */LETTERSMALL 2 /* Letter Small 8 1/2 x 11 in */TABLOID 3 /* Tabloid 11 x 17 in */LEDGER 4 /* Ledger 17 x 11 in */LEGAL 5 /* Legal 8 1/2 x 14 in */STATEMENT 6 /* Statement 5 1/2 x 8 1/2 in */EXECUTIVE 7 /* Executive 7 1/4 x 10 1/2 in */A3 8 /* A3 297 x 420 mm */A4 9 /* A4 210 x 297 mm */A4SMALL 10 /* A4 Small 210 x 297 mm */A5 11 /* A5 148 x 210 mm */B4 12 /* B4 (JIS) 250 x 354 */B5 13 /* B5 (JIS) 182 x 257 mm */

151292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 156: printer

FOLIO 14 /* Folio 8 1/2 x 13 in */QUARTO 15 /* Quarto 215 x 275 mm */10X14 16 /* 10x14 in */11X17 17 /* 11x17 in */NOTE 18 /* Note 8 1/2 x 11 in */ENV_9 19 /* Envelope #9 3 7/8 x 8 7/8 */ENV_10 20 /* Envelope #10 4 1/8 x 9 1/2 */ENV_11 21 /* Envelope #11 4 1/2 x 10 3/8 */ENV_12 22 /* Envelope #12 4 \276 x 11 */ENV_14 23 /* Envelope #14 5 x 11 1/2 */CSHEET 24 /* C size sheet */DSHEET 25 /* D size sheet */ESHEET 26 /* E size sheet */ENV_DL 27 /* Envelope DL 110 x 220mm */ENV_C5 28 /* Envelope C5 162 x 229 mm */ENV_C3 29 /* Envelope C3 324 x 458 mm */ENV_C4 30 /* Envelope C4 229 x 324 mm */C6 31 /* Envelope C6 114 x 162 mm */ENV_C65 32 /* Envelope C65 114 x 229 mm */ENV_B4 33 /* Envelope B4 250 x 353 mm */ENV_B5 34 /* Envelope B5 176 x 250 mm */ENV_B6 35 /* Envelope B6 176 x 125 mm */ENV_ITALY 36 /* Envelope 110 x 230 mm */ENV_MONARCH 37 /* Envelope Monarch 3.875 x 7.5 in */ENV_PERSONAL 38 /* 6 3/4 Envelope 3 5/8 x 6 1/2 in */FANFOLD_US 39 /* US Std Fanfold 14 7/8 x 11 in */FANFOLD_STD_GERMAN 40 /* German Std Fanfold 8 1/2 x 12 in */FANFOLD_LGL_GERMAN 41 /* German Legal Fanfold 8 1/2 x 13 in ISO_B4 42 /* B4 (ISO) 250 x 353 mm */JAPANESE_POSTCARD 43 /* Japanese Postcard 100 x 148 mm */9X11 44 /* 9 x 11 in */10X11 45 /* 10 x 11 in */15X11 46 /* 15 x 11 in */ENV_INVITE 47 /* Envelope Invite 220 x 220 mm */RESERVED_48 48 /* RESERVED--DO NOT USE */RESERVED_49 49 /* RESERVED--DO NOT USE */LETTER_EXTRA 50 /* Letter Extra 9 \275 x 12 in */LEGAL_EXTRA 51 /* Legal Extra 9 \275 x 15 in */TABLOID_EXTRA 52 /* Tabloid Extra 11.69 x 18 in */A4_EXTRA 53 /* A4 Extra 9.27 x 12.69 in */LETTER_TRANSVERSE 54 /* Letter Transverse 8 \275 x 11 in */A4_TRANSVERSE 55 /* A4 Transverse 210 x 297 mm */LETTER_EXTRA_TRANSVERSE 56 /* Letter Extra Transverse 9\275 x 12 in */A_PLUS 57 /* SuperA/SuperA/A4 227 x 356 mm */B_PLUS 58 /* SuperB/SuperB/A3 305 x 487 mm */LETTER_PLUS 59 /* Letter Plus 8.5 x 12.69 in */A4_PLUS 60 /* A4 Plus 210 x 330 mm */A5_TRANSVERSE 61 /* A5 Transverse 148 x 210 mm */B5_TRANSVERSE 62 /* B5 (JIS) Transverse 182 x 257 mm */A3_EXTRA 63 /* A3 Extra 322 x 445 mm */A5_EXTRA 64 /* A5 Extra 174 x 235 mm */

FAX 257VARIABLE 258

152292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 157: printer

VARIABLE_PIXEL 259

A0 260A1 261ASHEET 262BSHEET 263FSHEET 264GSHEET 265HSHEET 266JSHEET 267KSHEET 268AASHEET 269BASHEET 270CASHEET 271DASHEET 272EASHEET 273

NOTE: If you want to specify Variable Paper size, Variable Paper In Pixels the paper width and paper height must be set.

Paper Width=<number>The width of the paper in tents of milimeter. Must be specified if Variable Paper size selected. Value can be between 1 and 65535.

Paper Length=<number>The length of the paper in tents of milimeter . Must be specified if Variable Paper size selected. Value can be between 1 and 65535.

X DPI =<number>The horizontal DPI of the image. Can be a value between 1 and 1500.

Y DPI =<number>The vertical DPI of the image. Can be a value between 1 and 1500.

File Format=<number>The output file format for the printer.The value can be one of the following:

File format <number> Available only in printer

BMP 0 Color, MonochromePCX 1 Color, MonochromeDCX 2 Color, MonochromeTIFF uncompressed 3 Color, MonochromeTIFF Group 3 1 D 4 Color, MonochromeTIFF Group 3 1 D NOEOL 5 Color, MonochromeTIFF Group 3 2 D 6 Color, Monochrome

153292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 158: printer

TIFF Group 4 7 Color, MonochromeTIFF Packed 8 Color, MonochromeTIFF LZW 9 Color, MonochromeTIFF Jpeg 10 Color, MonochromeCALS 11 Color, MonochromeRAW CCITT TIFF Group 3 1 D 12 Color, MonochromeRAW CCITT TIFF Group 3 1 D NOEOL 13 Color, MonochromeTIFF CCITT Group 3 2 D 14 Color, MonochromeTIFF CCITT Group 4 15 Color, MonochromeJPEG 16 ColorJPEG l*a*b 17 ColorEMF 18 EMF IBM MMR IOCA 19 Color, Monochrome

Orientation =<number>The orientation of the paper. Set <number> to 1 for portrait or 2 for landscape.

BitsPerPixel =<number>The bits per pixel in the image. Can be 1, 8 or 24

Flags=<number>To set the enable or disable features of the printer at install time simply add or remove the value of the required flag. The values of the flags are defined in the ‘devmode.h’ file located in the Resource Toolkit. The value of the flag can be one or a combination of the following values:

Flag Name Value Sets Available for Printer

BLF_INTERNETTIFF 0x00000004 Internet TIFF Format Color, MonochromeBLF_PAGENUMBERING 0x00000008 Add Page Numbering Tag Color, MonochromeBLF_REVERSEFILLORDER 0x00000010 Reverse Bit Order in TIFF Color, MonochromeBLF_MULTIIMAGE 0x00000020 Generates Multi page image TIFF, DCX filesBLF_WRITETEXT 0x00000040 Write Text File AllBLF_MAILMERGE 0x00000100 Mail Merge AllBLF_ADVANCEDTEXT 0x00000200 Save position and style (Text) AllBLF_DISABLEIMAGE 0x00000400 Disable Image AllBLF_DISABLEGROUPFILE 0x00000800 Disable Group file AllBLF_SENDMESSAGE 0x00002000 Disable Messaging Interface AllBLF_ENABLETIFFDLL 0x00004000 Enable the use of the TIFF32.dll AllBLF_ENABLEJPEGDLL 0x00008000 Enable the use of the JPEG32.dll AllBLF_FAXOUTPUT 0x00010000 Create Faxable Image AllBLF_GLYPHSUPPORT 0x00020000 Eastern Character Support AllBLF_ROTATEPAPER 0x00040000 Rotate Landscape image to Portrait AllBLF_DELETEGROUPFILE 0x00080000 Delete group file after printing AllBLF_KEEPFILES 0x00100000 Keep existing files AllBLF_ADVANCEDPAPERSIZE 0x00200000 Advanced paper size AllBLF_CUSTOMEXT 0x00400000 Use Custom Extension AllBLF_LOWFAXRES 0x00800000 204x98 DPI Fax resolution Color, Monochrome

The BLF_ENABLETIFFDLL and BLF_ENABLEJPEGDLL flags should be set to generate

154292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 159: printer

image files.

For example if you want to use the Page Numbering, and BLF_MULTIIMAGE thevalue of the Flags in the INI file can be calculated like this:

(BLF_ENABLETIFFDLL) 0x00004000 +(BLF_ENABLEJPEGDLL) 0x00008000(BLF_PAGENUMBERING) 0x00000008(BLF_MULTIIMAGE) 0x00000020_____________________________________ 0x0000C028

C028 HEX value in decimal is 49192.

You have to write in the INI file:Flags=49192

If you don't need the flags specified in the INI file, simply comment theline with the ';' like this:;Flags=49192

Brightness =<number>The brightness value for the image. Can be a value between 1 and 199. Not used by the EMF driver.

PaperWidthInPixels =<number>Specify the paper width in pixels when Variable Paper Size In Pixels is set for the paper size. Can be a value between 1 and 65535.

PaperHeightInPixels =<number>Specify the paper height in pixels when Variable Paper Size In Pixels is set for the paper size. Can be a value between 1 and 65535.

FAXheader=<number>The size in pixels for the fax header. Can be a value between 0 and 65535.

LossRatio=<number>The loss ration setting for the Jpeg images. Can be a value between 0 and 100. Used only by the color driver.

Dithering=<number>Set the dithering method. The value can be :

Description <number>

155292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 160: printer

NONE (disable photo quality) 0Floyd-Steinberg 1Jarvis-Judice-Ninke 2Smooth 3Sharp 4Stucki 5

FileNameGenerationFlags =<number>Set the file name generation method. The value can be:

Description <number>

Use this prefix and extension 0Prefix and extension from the registry 1Prefix and extension from INI file 2Exact filename 3Exact Filename from registry 4Exact Filename from INI 5Use document’s name 6

FileNamePrefix=AAASets the prefix for the generated file. Can be maximum 3 characters

FileExtension =TIFSets the extension for the generated file. Can be maximum 3 characters.

INIFileName =<string>This will specify the name of the INI file if the File Generation Method is “Prefix and extension from the INI file” or “Exact Filename from INI”

If the File Generation Method is “Prefix and extension from the Registry” or “Exact Filename from the registry” this will represent the registry key.

FixedFileName =<string>This is the name of the file to be generated by the printer driver if the File Generation Method is “Exact filename”

ApplicationPath= <string>Full path and filename for the application to be launched by the printer.

LaunchFlags=<number>Set the flags for the application launching. Can be one or a combination of the following values.

Description <number>

Enable launch application 0x00000001Start before printing 0x00000002Enable pass parameters 0x00000004Start application in normal window 0x00000008Start application minimized 0x00000010

156292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 161: printer

Start application hidden 0x00000020

InterfaceName=<string>The name of the messaging interface

ResourceDLLName=<string>The name and full path for the resource dll.

TIFFDLLName =<string>The name and full path for the TIFF32.DLL.

JPEGDLLName =<string>The name and full path for the JPEG32.DLL

OutputDirectort=<string> The output directory for the printer. The image files will be generated here.

How to install the printer with a custom name?If you want to install the printer and all the printer components with a custom name, please follow these steps:1. Open the sample InstallShield project provided in the printer driver Resource Toolkit.2. The project contains a String table with the names of all the printer driver files and printer

driver components.3. Make the modifications you want. Also, if you renamed one or more files do not forget to

rename the files themselves and update the File groups that contain the renamed files.4. Rebuild the installation kit.

How to install more than one printers?Please follow the steps below to install more than one printer:You have to rename all the printer files except for BiImg.DLL.During the installation process, specify a separate print processor, port monitor, printer driver, port and printer names for each printer.(VERY IMPORTANT) Follow these steps for each printer.

How to install or configure the printer driver to use different output directory for each user? Each user can use a separate output directory for the generated image files. Open the printer proprieties dialog box. Select the ‘File Generation’ tab. The Output directory field contains the actual output path where the images files will be generated.

Set different output directory for each user after the installation:157

292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112© 1989 – 2001 Black Ice Software Inc.

Information Contained Is Not For Reproduction Or Distribution

Page 162: printer

Setting a separate output directory for each user can be done in two ways:a. Each user will set their own output directory manually by entering in this field the

directory path they want to use. The user must have permission to set the printer.or

b. Specify the environment variable which contains a directory path. The environment variable name must be between “<<” and “>>” marks. I.e.: <<TEMP>>. The printer driver will use the value from the environment variable as the output directory. This environment variable should be specified for each user by the system administrator. The system administrator can add to the autoexec.bat the a SET command which uses the %USER% environment variable so this path will be unique for each user. I.e.:

SET TEMP=C:\Temp\%USER%

I.e. to specify the TEMP environment variable as output directory enter in this field: <<TEMP>>Note: If the specified environment variable is not found the printer driver will use by default the temp directory of the actual user to generate the image files.

Set different output directory for each user at install time:Specify in the INI file (i.e. BiCIniNT.ini for the color NT driver) at the OutputDirectory field the environment variable which contains the output directory for each user. Use the “<<” and “>>” marks before and after the name of the environment variable.I.e. to set the value of the TEMP environment variable as output directory for each user at install time, enter the following line in the INI file:

OutputDirectory=<<TEMP>>

The system administrator can add to the autoexec.bat the a SET command which uses the %USER% environment variable so this path will be unique for each user. I.e.:

SET TEMP=C:\Temp\%USER%

How to change the Messaging Interface Name The Messaging Interface Name is set to the current in the Install Shield sample project inside the function SetCommonSettings():

// Messaging interface name158

292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112© 1989 - 2001 Black Ice Software Inc.

Information Contained Is Not For Reproduction Or Distribution

Page 163: printer

tmpLong = PAR_DEVMODE_INTERFACENAME;ParamValue = @PRINTER_NAME; // Can be any string like "MyMessagingInterface"nResult = CallDLLFx( G_DllFileName, DllProc, tmpLong, ParamValue);

By default the Messaging Interface Name is set by the printer driver to a default value to all the users. You can specify a new name for the messaging interface in the INI file (BiCiniNT.ini for the color driver) like

InterfaceName=ColorMessageInterface

If the Messaging Interface Name is specified in the INI file, the printer driver will be installed with that Messaging Interface Name for all the users.

You can overwrite this Messaging Interface Name for the current user only by setting the PAR_DEVMODE_INTERFACENAME from the Install Shield code.

NOTE: If the message capturing application was started by the printer driver not the user, the application runs on system account not on user account and the messaging interface name for the system account will be different then the messaging interface name set for the user. To avoid using different Messaging Interface Names by the application and the printer driver there are two possibilities:

1. Do not set the interface name at install time. Leave the default setting set by the printer driver. From the Install Shield script comment or delete the following lines from the SetCommonSettings() function:

// Messaging interface nametmpLong = PAR_DEVMODE_INTERFACENAME;ParamValue = @PRINTER_NAME; // Can be any string like "MyMessagingInterface"nResult = CallDLLFx( G_DllFileName, DllProc, tmpLong, ParamValue);

2. If you need to change the name of the default messaging interface for some reason, specify the new name for the messaging interface in the INI file. I.e.:

InterfaceName=ColorMessageInterface

2. Message Capture SampleThe “Message Capture Sample” directory contains a Visual C++ sample which demonstrates how to handle window messages sent by the printer driver and how to retrieve the name of the group file and the name and location of the generated image file.

159292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 164: printer

3. Source of the User Interface DLLThis DLL contains the dialog box templates and all the string resources used by the printer driver. The resources can be modified, but no resource can be deleted. Deleting a resource will produce unpredictable results. If one or more controls from a dialog box should be hidden, do not delete the control, but hide it.The source code of this DLL can be located in the “ResourceDLL” folder.

4. Message Capture OCX ControlThe Message Capture OCX control is provided to help VB, Delphi, Visual FoxPro programmers handle printer driver messages easily from their application. The name of the OCX control is BiPrnDrv.ocx and it should be installed into the SYSTEM directory.

The Capture OCX can be found in the OCX directory in your RTK installation folder.To redistribute the OCX, you have to register the OCX with regsvr32.exe or with your installation package.

The OCX does not have any Black Ice DLL or OCX file dependency.

The BiPrnDrv.ocx file loads the following system DLLs:

-MFC42.DLL-MSVCRT.DLL-ADVAPI32.DLL-OLEAUT32.DLL-KERNEL32.DLL-GDI32.DLL-USER32.DLL-WINSPOOL.DRV-OLE32.DLL

If any of the above DLL is missing, the BiPrnDrv.ocx will not register correctly.

The Message Capture OCX control does not require a license file.

The OCX control exports the following Properties and Events:

PrinterName PropertyThis property contains the name of the printer the application wants to capture messages from.

StartDoc eventThe StartDoc event is fired when the selected printer starts to print a document. The parameter of this event is the name (with the full path) of the generated group file.

160292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 165: printer

StartPage eventThe StartPage event is fired when the selected printer starts to print a new page. The parameter of this event is the actual page number.

EndPage eventThe EndPage event is fired when the selected printer finishes printing a page. The parameter of this event is the name (with the full path) of the generated image file.

EndDoc eventThe EndDoc event is fired when the selected printer finishes printing a document. The parameter of this event is the name (with the full path) of the generated group file.

5. VB Message Capture SampleThis sample demonstrates how to handle window messages sent by the printer driver and how to retrieve the name of the group file and the name and location of the generated image file.The VB 6 source code of this sample can be found in the “VB Message Capture sample” folder.

6 The BlackIceDEVMODE.DLLThe “BlackceDEVMODE.DLL”is a tool to retrieve, modify and set the values of the printer DEVMODE. Setting the values of the printer DEVMODE changes the settings of the printer. The BlackIceDEVMODE>DLL can be found in the Resource ToolkitTo correctly use the Black Ice Printer DEVMODE structure, the project must contain the following preprocessor definitions:_UNICODE, UNICODE, _WIN32_WINNT=0x0400

To set the preprocessor definitions in your Visual C++ project :open “Project -> Settings…” menu (the “Project Settings” dialog window will appear)select the project setting configuration that you want to modify from the “Setting For” combo box. (for example: “Win32 Release”).Click the “C/C++” tab control, choose “General” from the “Category” combo box. Add the following “Preprocessor definitions“ “_UNICODE, UNICODE, _WIN32_WINNT=0x0400”.Next, click the “Link” tab control, select the “Output” item from the “Category” combo box, and write the ”wWinMainCRTStartup” string into the “Entry-point symbol” edit box.When you are finished, click OK to close the “Project Settings“ dialog window.

6.1 Description of the DLLThis DLL contains functions that can be used to modify the DevMode structure. You can set or retrieve the printer DevMode using the functions of the BlackIceDEVMODE.dll. You can open

161292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 166: printer

the DevMode, read and update values of members of DevMode structure and you can save changes to the selected Black Ice printer.

6.2 How to use the BlackIceDEVMODE.dllThe BlackIceDEVMODE.DLL can be linked statically or dynamically.For a static link, use the BlackIceDEVMODE.lib file. For a dynamic link, load the library with the LoadLibrary() API function and then use the GetProcAddress() API function to load the required functions from the BlackIceDEVMODE.DLL.

/* retrieve a function address from the dll */BOOL InitDll() { HMODULE hDLL; hDLL = LoadLibrary( DLL_PATH); if (hDLL) {

GetOrientation = (_GetOrientation)GetProcAddress(hDLL,szGetOrientation);if (!GetOrientation) {

AfxMessageBox(TEXT("Error loading function"),MB_OK,0);return FALSE;

}}

/* declare a pointer to the BlackIceDEVMODE structure. The LoadBlackIceDEVMODE() function will allocate the required amount of memory for the pointer. */

BlackIceDEVMODE* pDevMode;

/* Before using other functions, load the DevMode from the printer with the LoadBlackIceDEVMODE() function. */

pDevMode = LoadBlackIceDEVMODE(TEXT(“Black Ice Color”));

if (!pDevMode) {wsprintf(szMessage, TEXT(

"Error loading the devmode. Error no.: %d ),BlackIce_GetLastError());

AfxMessageBox(szMessage,MB_OK,0);return(0);

}if (!GetOrientation){

AfxMessageBox(TEXT("Function not loaded from the DLL"),MB_OK,0);}else {

if( GetOrientation(pDevMode) == 1) {

// Portrait}else {

162292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 167: printer

if( GetOrientation(pDevMode) == 2) {

// Landscape)else{

// wrong value;}

}}

/* To save the printer settings call SaveBlackIceDEVMODE function. */

bSuccess = SaveBlackIceDEVMODE(TEXT(“Black Ice Color”), pDevMode);if (!bSuccess){

wsprintf(szMessage, TEXT("Error saving the devmode. Error no.: %d"), BlackIce_GetLastError());

AfxMessageBox(szMessage,MB_OK,0);}

/* At the end you should release the DEVMODE buffer allocated by the LoadBlackIceDEVMODE() function. You can use the ReleaseBlackIceDEVMODE function */

ReleaseBlackIceDEVMODE(pDevMode);

6.3 DLL Functions6.3.1 The initialization functions

The BlackIceDEVMODE.DLL contains functions for loading and saving the DEVMODE.

6.3.1.1 BlackIce_GetLastErrorReturns the last error code that has occurred in the system. This function helps to debug programs.

DWORD BlackIce_GetLastError();

Return value - The error code.

6.3.1.2 LoadBlackIceDEVMODEThis function returns a pointer to a BlackIceDEVMODE structure. The settings of the specified printer can be accessed through the BlackIceDEVMODE structure. The function allocates the required amount of memory for the structure. The allocated memory must be freed by calling the ReleaseBlackIceDEVMODE() function.

BlackIceDEVMODE* LoadBlackIceDEVMODE(LPCTSTR printername);

Input value: printername - Printer Name (string)

163292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 168: printer

Return value - pointer to the BlackIceDEVMODE structure or NULL if loading the DevMode has failed.

6.3.1.3 ReleaseBlackIceDEVMODEThis function releases the memory allocated by the LoadBlackIceDEVMODE () function.

void ReleaseBlackIceDEVMODE(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure

6.3.1.4 SaveBlackIceDEVMODEUse this function to save the new settings to the printer. The settings are saved to the current user if possible (Win2000), if not the settings are saved to all users (default).

BOOL SaveBlackIceDEVMODE(LPTSTR szPrinterName, BlackIceDEVMODE* pDevMode);

Input value: szPrinterName - Printer Name (string).Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the DevMode was successfully updated, otherwise FALSE.

6.3.1.5 SaveDefaultBlackIceDEVMODEUse this function to save the new settings to the printer.

BOOL SaveDefaultBlackIceDEVMODE(LPTSTR szPrinterName, BlackIceDEVMODE* pDevMode);

Input value: szPrinterName - Printer Name (string).Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the DevMode was successfully updated, otherwise FALSE.

6.3.2 Change the values of the DEVMODE

The description of the functions from the BlackIceDEVMODE.DLL are organized as the controls of the Printer Driver User Interface.

The Black Ice Printer Driver User Interface driver has 4 tab controls.

1. Device Settings2. File Formats3. Filename Generation4. Start Application

164292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 169: printer

All the values from the user interface can be set programmatically using functions from the BlackIceDEVMODE.DLL. The following chapter describes all of the functions.

6.3.3 The “Device Settings” tab functions

6.3.3.1 GetPaperSizeReturns the value of the dmPaperSize member of the DevMode. Represents the value of the 'Paper Size' combo box.

int GetPaperSize(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - paper size (integer number)

165292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 170: printer

6.3.3.2 SetPaperSizeSets the dmPaperSize member of the DevMode. Represents the value of the 'Paper Size' combo box.

BOOL SetPaperSize(int papersize,BlackIceDEVMODE* pDevMode);

Input value: papersize - paper size (integer number).Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.3.3 GetPageWidthInPixelsReturns the value of the PaperWidthInPixels member of the BlackIceDEVMODE. Represents the value of the 'Paper Width' edit box when “PIXEL” is selected for units.

DWORD GetPageWidthInPixels(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - paper width in pixels (DWORD number)

6.3.3.4 SetPaperWidthInPixelSets the PaperWidthInPixels member of BlackIceDEVMODE.

BOOL SetPaperWidthInPixel(DWORD paperwidth,BlackIceDEVMODE* pDevMode);

Input value: paperwidth - paper width in pixels (DWORD number).Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.3.5 GetPageHeightInPixelsReturns the value of the PaperHeightInPixels member of the BlackIceDEVMODE. Represents the value of the 'Paper Height' edit box.

DWORD GetPageHeightInPixels(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - paper height in pixels (DWORD number)

6.3.3.6 SetPaperHeightInPixelSets the PaperHeightInPixels member of the BlackIceDEVMODE. Sets the value of the 'Paper Height' edit box when “PIXEL” is selected for the measurement unit.

BOOL SetPaperHeightInPixel(DWORD paperheight, BlackIceDEVMODE* pDevMode);

Input value: paperheight - paper height in pixels (DWORD number).Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

166292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 171: printer

6.3.3.7 GetFaxHeaderReturns the value of the FAXheader member of BlackIceDEVMODE. Represents the value of the 'Fax header' edit box.

DWORD GetFaxHeader(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - fax header in pixels (DWORD number)

6.3.3.8 SetFaxHeaderSets the FAXheader member of the BlackIceDEVMODE. Sets the value of the 'Fax header' edit box.

BOOL SetFaxHeader(DWORD faxheader, BlackIceDEVMODE* pDevMode);

Input value: faxheader - fax header in pixels (DWORD number).Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.3.9 IsFaxOutputEnabledReturns the value of the BLF_FAXOUTPUT flag. Represents the value of the ‘Create Faxable Image’ checkbox.

BOOL IsFaxOutputEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if Fax Output is used, otherwise FALSE

6.3.3.10 EnableFaxOutputSets the BLF_FAXOUTPUT flag. Sets the value of the ‘Create Faxable Image’ checkbox.

BOOL EnableFaxOutput(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.3.11 DisableFaxOutputSets the BLF_FAXOUTPUT flag 0 (false). Sets the value of the ‘Create Faxable Image’ checkbox UNCHECKED.

BOOL DisableFaxOutput(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

167292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 172: printer

6.3.3.12 IsAdvancedPaperSizeEnabledReturns the value of the BLF_ADVANCEDPAPERSIZE flag. Represents the value of the ‘Advanced Paper size’ checkbox.

BOOL IsAdvancedPaperSizeEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if Advanced Paper size is used, otherwise FALSE

6.3.3.13 EnableAdvancedPaperSizeSets the BLF_ADVANCEDPAPERSIZE flag. Sets the value of the ‘Advanced Paper size’ checkbox.

BOOL EnableAdvancedPaperSize(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.3.14 DisableAdvancedPaperSizeSets the BLF_ADVANCEDPAPERSIZE flag to 0 (false). Sets the value of the ‘Advanced Paper size’ checkbox UNCHECKED.

BOOL DisableAdvancedPaperSize(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.3.15 GetOrientationReturns the value of the dmOrientation member of the DevMode. Represents the value of the 'Orientation' radio button.

int GetOrientation(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - Orientation: if the value is 1 the orientation is Portrait, if the value is 2: the orientation is Landscape

6.3.3.16 SetOrientationSets the dmOrientation member of the DevMode. Sets the value of the 'Orientation' radio button.

BOOL SetOrientation(int Orientation, BlackIceDEVMODE* pDevMode);

Input value: Orientation - Orientation (integer number) 1:Portrait, 2:Landscape.Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

168292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 173: printer

6.3.3.17 IsRotatePaperEnabledReturns the value of the BLF_ROTATEPAPER flag. Represents the value of the ‘Rotate Landscape image to Portrait’ checkbox.

BOOL IsRotatePaperEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if the Rotate Landscape image to Portrait is used, otherwise FALSE

6.3.3.18 EnableRotatePaperSets the BLF_ROTATEPAPER flag. Sets the value of the ‘Rotate Landscape image to Portrait’ checkbox.

BOOL EnableRotatePaper(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.3.19 DisableRotatePaperSets the BLF_ROTATEPAPER flag to 0 (false). Sets the value of the ‘Rotate Landscape image to Portrait’ checkbox UNCHECKED.

BOOL DisableRotatePaper(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.3.20 GetXDPIReturns the value of the dmPrintQuality member of the DevMode. Represents the value of the 'Horizontal Resolution' edit box.

int GetXDPI(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - Horizontal Resolution (integer number)

6.3.3.21 SetXDPISets the dmPrintQuality member of the DevMode. Sets the value of the 'Horizontal Resolution' edit box.

BOOL SetXDPI(int xdpi, BlackIceDEVMODE* pDevMode);

Input value: xdpi - Horizontal Resolution (integer number)Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

169292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 174: printer

6.3.3.22 GetYDPIReturns the value of the dmYResolutionmember of the DevMode. Represents the value of the 'Vertical Resolution' edit box.

int GetYDPI(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - Vertical Resolution (integer number)

6.3.3.23 SetYDPISets the dmYResolution member of the DevMode. Sets the value of the 'Vertical Resolution' edit box.

BOOL SetYDPI(int ydpi, BlackIceDEVMODE* pDevMode);

Input value: ydpi - Vertical Resolution (integer number)Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.3.24 IsFaxLowOutputEnabledReturns the value of the BLF_LOWFAXRES flag. If true, the low fax resolution (204x98) is selected, if false the Fine Fax resolution (204x196) is selected when the ‘Create Faxable Image’ option is selected.

BOOL IsLowFaxOutputEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if Low Fax Output is used, otherwise FALSE

6.3.3.25 EnableLowFaxOutputSets the BLF_ LOWFAXRES flag. Sets the value of the fax resolution when the ‘Create Faxable Image’ checkbox is selected.

BOOL EnableLowFaxOutput(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.3.26 DisableLowFaxOutputSets the BLF_ LOWFAXRES flag 0 (false). Sets the value of the fax resolution when the ‘Create Faxable Image’ checkbox is selected.

BOOL DisableLowFaxOutput(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

170292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 175: printer

171292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 176: printer

6.3.4 The “File Formats” Tab functions

6.3.4.1 GetFileFormat

Returns the value of the Format member of the BlackIceDEVMODE. Represents the value of the 'File Format' combo box.

DWORD GetFileFormat(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - File Format (DWORD number)

172292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 177: printer

6.3.4.2 SetFileFormatSets the Format member of the BlackIceDEVMODE. Sets the value of the 'File Format' combo box.

BOOL SetFileFormat(DWORD fileformat, BlackIceDEVMODE* pDevMode);

Input value: fileformat - File Format (DWORD number).Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.4.3 GetLossRatioReturns the value of the LossRatio member of the BlackIceDEVMODE. Represents the value of the 'JPEG loss ratio' slider.

DWORD GetLossRatio(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - JPEG loss ratio (DWORD number)

6.3.4.4 SetLossRatioSets the LossRatio member of the BlackIceDEVMODE. Sets the value of the 'JPEG loss ratio' slider.

BOOL SetLossRatio(DWORD lossratio, BlackIceDEVMODE* pDevMode);

Input value: lossratio - JPEG loss ratio (DWORD number).Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.4.5 GetColorDepthReturns the value of the ColorMode member of the BlackIceDEVMODE. Represents the value of the 'Color Depth' radio button.

DWORD GetColorDepth(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - Color Depth (DWORD number)

6.3.4.6 SetColorDepthSets the ColorMode member of the BlackIceDEVMODE. Sets the value of the 'Color Depth' radio button.

BOOL SetColorDepth(DWORD colordepth, BlackIceDEVMODE* pDevMode);

Input value: colordepth - Color Depth (DWORD number).Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

173292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 178: printer

6.3.4.7 IsMultipageImageEnabledReturns the value of the BLF_MULTIIMAGE flag. Represents the value of the ‘Create Multipage Image’ checkbox.

BOOL IsMultipageImageEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if Create Multi-page Image is used, otherwise FALSE

6.3.4.8 EnableMultipageImageSets the BLF_MULTIIMAGE flag. Sets the value of the ‘Create Multi-page Image’ checkbox.

BOOL EnableMultipageImage(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.4.9 DisableMultipageImageClears the BLF_MULTIIMAGE flag. Sets the value of the ‘Create Multipage Image’ checkbox UNCHECKED.

BOOL DisableMultipageImage(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.4.10 IsAppendImageEnabledReturns the value of the BLF_MULTIIMAGE flag. Represents the value of the ‘Create Multi-page Image’ checkbox.

BOOL IsAppendImageEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if the Create Multi-page Image is used, otherwise FALSE

6.3.4.11 EnableAppendImageSets the BLF_MULTIIMAGE flag. Sets the value of the ‘Create Multi-page Image’ checkbox.

BOOL EnableAppendImage(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.4.12 DisableAppendImageSets the BLF_MULTIIMAGE flag to 0 (false). Sets the value of the ‘Create Multi-page Image’ checkbox UNCHECKED.

174292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 179: printer

BOOL DisableAppendImage(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.4.13 IsDisableImageEnabledReturns the value of the BLF_DISABLEIMAGE flag. Represents the value of the 'Disable Image' checkbox.

BOOL IsDisableImageEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if Disable Image is used, otherwise FALSE

6.3.4.14 EnableDisableImageSets the BLF_DISABLEIMAGE flag. Sets the value of the 'Disable Image' checkbox.

BOOL EnableDisableImage(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.4.15 DisableDisableImageSets the BLF_DISABLEIMAGE flag to 0 (false). Sets the value of the 'Disable Image' checkbox UNCHECKED.

BOOL DisableDisableImage(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.4.16 IsEasternCharSupportEnabledReturns the value of the BLF_GLYPHSUPPORT flag. Represents the value of the 'Eastern Character Support' checkbox.

BOOL IsEasternCharSupportEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if Eastern Character Support is used, otherwise FALSE

6.3.4.17 EnableEasternCharSupportSets the BLF_GLYPHSUPPORT flag. Sets the value of the 'Eastern Character Support' checkbox.

BOOL EnableEasternCharSupport(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.

175292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 180: printer

Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.4.18 DisableEasternCharSupportSets the BLF_GLYPHSUPPORT flag to 0 (false). Sets the value of the 'Eastern Character Support' checkbox UNCHECKED.

BOOL DisableEasternCharSupport(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.4.19 IsWriteTextEnabledReturns the value of the BLF_WRITETEXT flag. Represents the value of the 'Write Text File' checkbox.

BOOL IsWriteTextEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if Write Text File is used, otherwise FALSE

6.3.4.20 EnableWriteTextSets the BLF_WRITETEXT flag. Sets the value of the 'Write Text File' checkbox.

BOOL EnableWriteText(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.4.21 DisableWriteTextSets the BLF_WRITETEXT flag to 0 (false). Sets the value of the 'Write Text File' checkbox UNCHECKED.

BOOL DisableWriteText(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.4.22 IsMailMergeEnabledReturns the value of the BLF_MAILMERGE flag. Represents the value of the ‘Mail Merge’ checkbox.

BOOL IsMailMergeEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if WriteText File is used, otherwise FALSE

176292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 181: printer

6.3.4.23 EnableMailMergeSets the BLF_MAILMERGE flag. Sets the value of the ‘Mail Merge’ checkbox.

BOOL EnableMailMerge(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.4.24 DisableMailMergeSets the BLF_MAILMERGE flag to 0 (false). Sets the value of the ‘Mail Merge’ checkbox UNCHECKED.

BOOL DisableMailMerge(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.4.25 IsAdvancedTextEnabledReturns the value of the BLF_ADVANCEDTEXT flag. Represents the value of the 'Save position and style' checkbox.

BOOL IsAdvancedTextEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if the Save position and style is used, otherwise FALSE

6.3.4.26 EnableAdvancedTextSets the BLF_ADVANCEDTEXT flag. Sets the value of the 'Save position and style' checkbox.

BOOL EnableAdvancedText(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.4.27 DisableAdvancedTextSets the BLF_ADVANCEDTEXT flag to 0 (false). Sets the value of the 'Save position and style' checkbox UNCHECKED.

BOOL DisableAdvancedText(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.4.28 IsInternetTiffFormatEnabledReturns the value of the BLF_INTERNETTIFF flag. Represents the value of the ‘Internet TIFF format’ checkbox.

177292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 182: printer

BOOL IsInternetTiffFormatEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if the Internet TIFF format is used, otherwise FALSE

6.3.4.29 EnableInternetTiffFormatSets the BLF_INTERNETTIFF flag. Sets the value of the ‘Internet TIFF format’ checkbox.

BOOL EnableInternetTiffFormat(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.4.30 DisableInternetTiffFormatSets the BLF_INTERNETTIFF flag to 0 (false). Sets the value of the ‘Internet TIFF format’ checkbox UNCHECKED.

BOOL DisableInternetTiffFormat(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.4.31 IsReverseBitOrderEnabledReturns the value of the BLF_REVERSEFILLORDER flag. Represents the value of the ‘Reverse Bit Order in TIFF’ checkbox.

BOOL IsReverseBitOrderEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if Reverse Bit Order in TIFF is used, otherwise FALSE

6.3.4.32 EnableReverseBitOrderSets the BLF_REVERSEFILLORDER flag. Sets the value of the ‘Reverse Bit Order in TIFF’ checkbox.

BOOL EnableReverseBitOrder(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.4.33 DisableReverseBitOrderSets the BLF_REVERSEFILLORDER flag to 0 (false). Sets the value of the ‘Reverse Bit Order in TIFF’ checkbox UNCHECKED.

BOOL DisableReverseBitOrder(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.

178292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 183: printer

Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.4.34 IsPageNumberingEnabled Returns the value of the BLF_PAGENUMBERING flag. Represents the value of the ‘Add Page Numbering Tag’ checkbox.

BOOL IsPageNumberingEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if the Add Page Numbering Tag is used, otherwise FALSE

6.3.4.35 EnablePageNumberingSets the BLF_PAGENUMBERING flag. Sets the value of the ‘Add Page Numbering Tag’ checkbox.

BOOL EnablePageNumbering(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.4.36 DisablePageNumberingSets the BLF_PAGENUMBERING flag to 0 (false). Sets the value of the ‘Add Page Numbering Tag’ checkbox UNCHECKED.

BOOL DisablePageNumbering(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.4.37 GetDitheringReturns the value of the Dithering member of the BlackIceDEVMODE. Represents the value of the 'Photo Quality' radio button.

DWORD GetDithering(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - Photo Quality (DWORD number)

6.3.4.38 SetDitheringSets the Dithering member of the BlackIceDEVMODE. Sets the value of the 'Photo Quality' radio button.

BOOL SetDithering(DWORD dithering, BlackIceDEVMODE* pDevMode);

Input value: dithering - Photo Quality (DWORD number).Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

179292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 184: printer

6.3.4.39 GetBrightnessReturns the value of the Brightness member of the BlackIceDEVMODE. Represents the value of the 'Intensity' slider.

DWORD GetBrightness(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - Intensity (DWORD number)

6.3.4.40 SetBrightnessSets the Brightness member of the BlackIceDEVMODE. Sets the value of the 'Intensity' slider.

BOOL SetBrightness(DWORD brightness, BlackIceDEVMODE* pDevMode);

Input value: brightness - Intensity (DWORD number).Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

180292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 185: printer

6.3.5 The “Filename Generation” tab functions

6.3.5.1 GetFileGenerationMethodReturns the value of the FileNameGenerationFlags member of the BlackIceDEVMODE. Represents the value of the 'File Name Generation Method' combo box.

DWORD GetFileGenerationMethod(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure

181292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 186: printer

Return value - File Name Generation Method (DWORD number)

6.3.5.2 SetFileGenerationMethodSets the FileNameGenerationFlags member of the BlackIceDEVMODE. Sets the value of the 'File Name Generation Method' combo box.

BOOL SetFileGenerationMethod(DWORD fnamegen, BlackIceDEVMODE* pDevMode);

Input value: fnamegen - File Name Generation Method (DWORD number).Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.5.3 GetFileNamePrefixReturns the value of the FileNamePrefix member of the BlackIceDEVMODE. Represents the value of the 'File Name Prefix' edit box.

LPCTSTR GetFileNamePrefix(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - File Name Prefix (string)

6.3.5.4 SetFileNamePrefixSets the FileNamePrefix member of the BlackIceDEVMODE. Sets the value of the 'File Name Prefix' edit box.

BOOL SetFileNamePrefix(LPCTSTR fnamepref, BlackIceDEVMODE* pDevMode);

Input value: fnamepref - File Name Prefix (string)Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.5.5 GetFileExtensionReturns the value of the FileExtension member of the BlackIceDEVMODE. Represents the value of the 'File Name Extension' edit box.

LPCTSTR GetFileExtension(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - File Name Extension (string)

6.3.5.6 SetFileExtensionSets the FileExtension member of the BlackIceDEVMODE. Sets the value of the 'File Name Extension' edit box.

BOOL SetFileExtension(LPCTSTR fnameext, BlackIceDEVMODE* pDevMode);

Input value: fnameext - File Name Extension (string)

182292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 187: printer

Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.5.7 IsCustomExtensionEnabledReturns the value of the BLF_CUSTOMEXT flag. Represents the value of the 'Use Custom Extension' checkbox.

BOOL IsCustomExtensionEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if the Use Custom Extension is used, otherwise FALSE

6.3.5.8 EnableCustomExtensionSets the BLF_CUSTOMEXT flag. Sets the value of the 'Use Custom Extension' checkbox.

BOOL EnableCustomExtension(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.5.9 DisableCustomExtensionSets the BLF_CUSTOMEXT flag 0 (false). Sets the value of the 'Use Custom Extension' checkbox UNCHECKED.

BOOL DisableCustomExtension(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.5.10 GetINIFileNameReturns the value of the INIFileName member of the BlackIceDEVMODE. Represents the value of the 'INI File Name'/'Registry path'/etc. edit box.

LPCTSTR GetINIFileName(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - INI File Name/Registry Path/etc. (string)

6.3.5.11 SetINIFileNameSets the INIFileName member of the BlackIceDEVMODE. Sets the value of the 'INI File Name'/'Registry path' edit box.

BOOL SetINIFileName(LPCTSTR inifname, BlackIceDEVMODE* pDevMode);

Input value: inifname - INI File Name/Registry Path (string)Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

183292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 188: printer

6.3.5.12 GetImageFileNameReturns the value of the FileImageName member of the BlackIceDEVMODE. Represents the value of the 'File Image Name' edit box if the Filename Generation method is ‘Exact filename’.

LPCTSTR GetImageFileName(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - Image Filename (string)

6.3.5.13 SetImageFileNameSets the FileImageName member of the BlackIceDEVMODE. Sets the value of the 'File Image Name' edit box if the Filename Generation method is ‘Exact filename’.

BOOL SetImageFileName(LPCTSTR filename, BlackIceDEVMODE* pDevMode);

Input value: filename - Exact Filename (string)Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.5.14 IsKeepExistingFilesEnabledReturns the value of the BLF_KEEPFILES flag. Represents the value of the 'Keep existing files' checkbox.

BOOL IsKeepExistingFilesEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if Keep existing files is used, otherwise FALSE

6.3.5.15 EnableKeepExistingFilesSets the BLF_KEEPFILES flag. Sets the value of the 'Keep existing files' checkbox.

BOOL EnableKeepExistingFiles(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.5.16 DisableKeepExistingFilesSets the BLF_KEEPFILES flag 0 (false). Sets the value of the 'Keep existing files' checkbox UNCHECKED.

BOOL DisableKeepExistingFiles(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

184292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 189: printer

6.3.5.17 GetOutputDirectoryReturns the value of the OutputDirectory member of the BlackIceDEVMODE. Represents the value of the 'Output Directory' edit box.

LPCTSTR GetOutputDirectory(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - Output Directory (string)

6.3.5.18 SetOutputDirectorySets the OutputDirectory member of the BlackIceDEVMODE. Sets the value of the 'Output Directory' edit box.

BOOL SetOutputDirectory(LPCTSTR outputdir, BlackIceDEVMODE* pDevMode);

Input value: outputdir - Output Directory (string)Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.5.19 IsGroupFileDisabledReturns the value of the BLF_DISABLEGROUPFILE flag. Represents the value of the 'Disable Group File' checkbox.

BOOL IsGroupFileDisabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if the Disable Group File is used, otherwise FALSE

6.3.5.20 DisableGroupFileSets the BLF_DISABLEGROUPFILE flag. Sets the value of the 'Disable Group File' checkbox.

BOOL DisableGroupFile(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.5.21 EnableGroupFileSets the BLF_DISABLEGROUPFILE flag 0 (false). Sets the value of the 'Disable Group File' checkbox UNCHECKED.

BOOL EnableGroupFile(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

185292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 190: printer

6.3.5.22 IsDeleteGroupFileEnabledReturns the value of the BLF_DELETEGROUPFILE flag. Represents the value of the 'Delete Group File After Printing' checkbox.

BOOL IsDeleteGroupFileEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if the Delete Group File After Printing is used, otherwise FALSE

6.3.5.23 EnableDeleteGroupFileSets the BLF_DELETEGROUPFILE flag. Sets the value of the 'Delete Group File After Printing' checkbox.

BOOL EnableDeleteGroupFile(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.5.24 DisableDeleteGroupFileSets the BLF_DELETEGROUPFILE flag 0 (false). Sets the value of the 'Delete Group File After Printing' checkbox UNCHECKED.

BOOL DisableDeleteGroupFile(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

186292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 191: printer

6.3.6 The “Start Application” tab functions

6.3.6.1 IsStartApplicationEnabledReturns the value of the BLF_LAUNCHAPP flag. Represents the value of the 'Enable Start Application' checkbox.

BOOL IsStartApplicationEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if Enable Start Application is used, otherwise FALSE

187292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 192: printer

6.3.6.2 EnableStartApplicationSets the BLF_LAUNCHAPP flag. Sets the value of the 'Enable Start Application' checkbox.

BOOL EnableStartApplication(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.6.3 DisableStartApplicationSets the BLF_LAUNCHAPP flag to 0 (false). Sets the value of the 'Enable Start Application' checkbox UNCHECKED.

BOOL DisableStartApplication(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.6.4 GetApplicationPathReturns the value of the ApplicationPath member of the BlackIceDEVMODE. Represents the value of the 'Output Directory' edit box.

LPCTSTR GetApplicationPath(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - Application Path (string)

6.3.6.5 SetApplicationPathSets the ApplicationPath member of the BlackIceDEVMODE. Sets the value of the 'Application Path' edit box.

BOOL SetApplicationPath(LPCTSTR applicationpath, BlackIceDEVMODE* pDevMode);

Input value: applicationpath - Application Path (string)Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.6.6 IsStartBeforePrintReturns the value of the BLF_STARTBEFOREPRINT flag. Represents the value of the 'Start Before Printing' radio button.

BOOL IsStartBeforePrint(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if Start Before Printing is used, otherwise FALSE (it means that the printer driver will start the application after the printing was finished)

188292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 193: printer

6.3.6.7 EnableStartBeforePrintSets the BLF_STARTBEFOREPRINT flag. Sets the value of the 'Start Before Printing' radio button.

BOOL EnableStartBeforePrint(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.6.8 DisableStartBeforePrintSets the BLF_STARTBEFOREPRINT flag to 0 (false). Sets the value of the 'Start After Printing' radio button CHECKED.

BOOL DisableStartBeforePrint(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.6.9 IsPassParametersEnabledReturns the value of the BLF_PASSPARAMETERS flag. Represents the value of the 'Pass Parameters' checkbox.

BOOL IsPassParametersEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if Pass Parameters is used, otherwise FALSE

6.3.6.10 EnablePassParametersSets the BLF_PASSPARAMETERS flag. Sets the value of the 'Pass Parameters' checkbox.

BOOL EnablePassParameters(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.6.11 DisablePassParametersSets the BLF_PASSPARAMETERS flag to 0 (false). Sets the value of the 'Pass Parameters' checkbox UNCHECKED.

BOOL DisablePassParameters(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

189292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 194: printer

6.3.6.12 IsStartNormalReturns the value of the BLF_STARTNORMAL flag. Represents the value of the 'Normal' radio button.

BOOL IsStartNormal(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if the Start Application In Normal Window is used, otherwise FALSE

6.3.6.13 EnableStartNormalSets the BLF_STARTNORMAL flag. Sets the value of the 'Normal' radio button. The driver will start the application In a Normal window

BOOL EnableStartNormal(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.6.14 DisableStartNormalSets the BLF_STARTNORMAL flag to 0 (false). Sets the value of the 'Normal' radio button UNCHECKED.

BOOL DisableStartNormal(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.6.15 IsStartMinimizedReturns the value of the BLF_STARTMINIMIZED flag. Represents the value of the 'Minimized' radio button.

BOOL IsStartMinimized(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if the Start Application In Minimized Window is used, otherwise FALSE

6.3.6.16 EnableStartMinimizedSets the BLF_STARTMINIMIZED flag. Sets the value of the 'Minimized' radio button. The driver will start the application In a Minimized window.

BOOL EnableStartMinimized(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

190292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 195: printer

6.3.6.17 DisableStartMinimizedSets the BLF_STARTMINIMIZED flag to 0 (false). Sets the value of the 'Minimized' radio button UNCHECKED.

BOOL DisableStartMinimized(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.6.18 IsStartHiddenReturns the value of the BLF_STARTHIDDEN flag. Represents the value of the 'Hidden' radio button.

BOOL IsStartHidden(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if Start Application Hidden is used, otherwise FALSE

6.3.6.19 EnableStartHiddenSets the BLF_STARTHIDDEN flag. Sets the value of the 'Hidden' radio button. The driver will start the application Hidden

BOOL EnableStartHidden(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.6.20 DisableStartHiddenSets the BLF_STARTHIDDEN flag to 0 (false). Sets the value of the 'Hidden' radio button UNCHECKED.

BOOL DisableStartHidden(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.6.21 IsMessagingInterfaceEnabledReturns the value of the BLF_SENDMESSAGE flag. Represents the value of the 'Disable the Messaging Interface' checkbox.

BOOL IsMessagingInterfaceEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if the Messaging Interface is used (the check box is unchecked), otherwise FALSE (Messaging Interface is not used and the check box is checked)

191292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 196: printer

6.3.6.22 EnableMessagingInterfaceSets the BLF_SENDMESSAGE flag. Sets the value of the 'Disable the Messaging Interface' checkbox UNCHECKED. The driver will use the Messaging Interface and will broadcast messages at every startdoc, startpage, endpage and enddoc.

BOOL EnableMessagingInterface(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.6.23 DisableMessagingInterfaceSets the BLF_SENDMESSAGE flag to 0 (false). Sets the value of the 'Disable the Messaging Interface' checkbox. The driver doesn’t use the Messaging Interface.

BOOL DisableMessagingInterface(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.7 Miscellaneous functions

6.3.7.1 GetInterfaceNameReturns the value of the InterfaceName member of the BlackIceDEVMODE. The InterfaceName member stores the name of the messaging interface.

LPCTSTR InterfaceName(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - Interface Name (string)

6.3.7.2 SetInterfaceNameSets the InterfaceName member of the BlackIceDEVMODE. The InterfaceName member stores the name of the messaging interface.

BOOL SetInterfaceName(LPCTSTR intfname, BlackIceDEVMODE* pDevMode);

Input value: intfname - Interface Name (string)Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.7.3 GetPaperLengthReturns the value of the dmPaperLength member of the DevMode. (DM.dmPaperLength member of BlackIceDEVMODE ) This value represents the 'Actual paper length'.

192292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 197: printer

int GetPaperLength(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - Actual paper length (integer number)

6.3.7.4 SetPaperLengthSets the dmPaperLength member of the DevMode. (DM.dmPaperLength member of the BlackIceDEVMODE ) This value represents the 'Actual paper length'.

BOOL SetPaperLength(int paperlength, BlackIceDEVMODE* pDevMode);

Input value: paperlength - Actual paper length (integer number).Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.7.5 IsTIFFDllEnabledReturns the value of the BLF_ENABLETIFFDLL flag. If set the using of the TIFF32.DLL is enabled. Can be set only programmatically.

BOOL IsTiffDllEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if the TIFF32.DLL is enabled, otherwise FALSE

6.3.7.6 EnableTIFFDllSets the BLF_ENABLETIFFDLL flag. If this flag is set, the printer driver will load and use the TIFF32.DLL. This flag can only be set programmatically.

BOOL EnableTiffDll(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.7.7 DisableTIFFDllSets the BLF_ENABLETIFFDLL flag to 0 (false). If this flag is set, the printer driver will load and use the TIFF32.DLL. This flag can only be set programmatically.

BOOL DisableTiffDll(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.7.8 IsJPEGDllEnabledReturns the value of the BLF_ENABLEJPEGDLL flag. If this flag is set, the printer driver will load and use the JPEG32.DLL. This flag can only be set programmatically.

BOOL IsJpegDllEnabled(BlackIceDEVMODE* pDevMode);

193292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 198: printer

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if the JPEG32.DLL is enabled, otherwise FALSE

6.3.7.9 EnableJPEGDllSets the BLF_ENABLEJPEGDLL flag. If this flag is set, the printer driver will load and use the JPEG32.DLL. This flag can only be set programmatically.

BOOL EnableJpegDll(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.7.10 DisableJPEGDllSets the BLF_ENABLEJPEGDLL flag 0 (false). If this flag is set, the printer driver will load and use the JPEG32.DLL. This flag can only be set programmatically.

BOOL DisableJpegDll(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.7.11 GetTIFFDLLNameReturns the value of the TIFFDLLName member of the BlackIceDEVMODE. The TIFFDLLName member stores the name and path of the TIFF32.DLL. This DLL encodes the TIFF files. The file is needed for TIFF output.

LPCTSTR GetTIFFDLLName(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TIFFDLLName (string)

6.3.7.12 SetTIFFDLLNameSets the TIFFDLLName member of the BlackIceDEVMODE. The TIFFDLLName member stores the name and path of the TIFF32.DLL. This DLL encodes the TIFF files. The file is needed for TIFF output.

BOOL SetTIFFDLLName(LPCTSTR stringtiffdll, BlackIceDEVMODE* pDevMode);

Input value: stringtiffdll - TIFFDLLName (string)Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

194292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 199: printer

6.3.7.13 GetJPEGDLLNameReturns the value of the JPEGDLLName member of the BlackIceDEVMODE. The JPEGDLLName member stores the name and path of the JPEG32.DLL. This DLL encodes the Jpeg files. The file is needed for Jpeg output.

LPCTSTR GetJPEGDLLName(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - JPEGDLLName (string)

6.3.7.14 SetJPEGDLLNameSets the JPEGDLLName member of the BlackIceDEVMODE. The JPEGDLLName member stores the name and path of the JPEG32.DLL. This DLL encodes the Jpeg files. The file is needed for Jpeg output.

BOOL SetJPEGDLLName(LPCTSTR stringjpegdll, BlackIceDEVMODE* pDevMode);

Input value: stringjpegdll - JPEGDLLName (string)Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.7.15 GetResourceDLLNameReturns the value of the ResourceDLLName member of the BlackIceDEVMODE. The ResourceDLLName member stores the name and path of the driver resource DLL

LPCTSTR GetResourceDLLName(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - ResourceDLLName (string)

6.3.7.16 SetResourceDLLNameSets the ResourceDLLName member of the BlackIceDEVMODE. The ResourceDLLName member stores the name and path of the driver resource DLL

BOOL SetResourceDLLName(LPCTSTR stringresdll, BlackIceDEVMODE* pDevMode);

Input value: stringresdll - ResourceDLLName (string)Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.7.17 GetBitsPerPixelReturns the value of the color depth in pixels. If the Color Depth is BITS_1, the return value is 1 If the Color Depth is BITS_8, the return value is 8 If the Color Depth is BITS_8GRAY, the return value is 8 If the Color Depth is BITS_24, return value is 24

195292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 200: printer

DWORD GetResourceDLLName(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - Color depth in pixels (DWORD number)

7 C++ Sample - how to modify the printer settings programmatically

This sample demonstrates how to use the BlackIceDEVMODE. DLL functions. The sample shows how to programmatically change the printer settings.

The ‘PrinterSettings’ program allows users to change the settings of the Black Ice printers. It is a dialog based MFC application.

There are five buttons in the form: OK: saves the settings and exits the program. Cancel: exits the program without changing the printer settings Apply: saves the settings without exiting. You can continue modify the controls.

196292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 201: printer

Open printer: closes the currently opened printer and tries to open the printer specified in the “Printer Name” edit box.

7.1 How the PrinterSettings program works:The “InitDll()” function is called to load the BlackIceDEVMODE.dll functions. Next, the “OpenAndFill()” function is called..The “OpenAndFill()” function opens the printer and fills the controls with the printer settings values (values from the retrieved DEVMODE structure).If all of value are correct, the new values of the DEVMODE are saved to the printer using the “SaveBlackIceDEVMODE( )” function.

8 The BlackIceDEVMODE.OCXThe BlackceDEVMODE.OCX is distributed in the Resource Toolkit.

8.1 Description of the OCXThis is an Active X Control for Visual Basic, Delphi or any development tool that can use an OCX control. The BlackIceDEVMODE.OCX contains methods that can be used to modify the DevMode structure. You can reach the printer DevMode through the methods of the BlackIceDEVMODE.OCX. You can open the DevMode, read and update the member values of the DevMode structure and you can save changes to the selected Black Ice printer. NOTE:The BlackIceDEVMODE.OCX calls functions from the BlackIceDEVMODE.DLL, therefore the BlackIceDEVMODE.DLL has to be in the directory of the OCX or in the system path. The BlackIceDEVMODE .OCX will not work without the BlackIceDEVMODE.DLL.

8.2 How to use the BlackIceDEVMODE.OCXThe BlackIceDEVMODE.OCX can be used like any other standard OCX control.

First, load the printer settings using the LoadBlackIceDEVMODE() method.

Dim pBlackIceDEVMODE As Long 'pointer to the devmode.

pBlackIceDEVMODE = Form1.BlackIceDEVMODE1.LoadBlackIceDEVMODE(PrinterName)If pBlackIceDEVMODE = 0 Then MsgBox "Cannot open '" & PrinterName & "' Printer driver", _ vbExclamation + vbOKOnly End End If

In this sample you can see how to read or modify the page orientation of the printer

197292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 202: printer

'read the Orientation If Form1.BlackIceDEVMODE1.GetOrientation(pBlackIceDEVMODE) = 1 Then 'Portrait . . . Else 'Landscape . . . End If

'set to Portrait bSuccess = Form1.BlackIceDEVMODE1.SetOrientation(1, pBlackIceDEVMODE) If (bSuccess = False) Then MsgBox "Error in calling Active X function: 'SetOrientation'" End If

To save the settings, call the SaveBlackIceDEVMODE function. The return value specifies whether the changes were successfully saved or not.

bSuccess = Form1.BlackIceDEVMODE1.SaveBlackIceDEVMODE(PrinterName, pBlackIceDEVMODE)If (bSuccess = False) Then MsgBox ("Error saving the devmode") Exit SubEnd If

When you are finished you have to release the memory allocated by the LoadBlackIceDEVMODE method. You can use the ReleaseBlackIceDEVMODE method:

Call Form1.BlackIceDEVMODE1.ReleaseBlackIceDEVMODE(pBlackIceDEVMODE)

8.3 Methods of the BlackIceDEVMODE.OCX 8.3.1 The initialization functions

To set the Printer Driver settings you have to set the value of the printer DEVMODE. The BlackIceDEVMODE.OCX contains methods to load, save and modify the printer settings.

8.3.1.1 LoadBlackIceDEVMODEThis method returns a long value that represents the BalckIceDEVMODE handle. This handle is used by the rest of the methods to read and modify the settings of the printer.The LoadBalckIceDEVMODE method allocates the memory space required for the DevMode structure ( for the printer settings). NOTE: The memory must be freed using the ReleaseBlackIceDEVMODE method.

LoadBlackIceDEVMODE(PrinterName As String) As Long

Input value: PrinterName - Printer NameReturn value - handle to the BlackIceDEVMODE

198292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 203: printer

If the return value is 0, the DevMode loading failed.

8.3.1.2 ReleaseBlackIceDEVMODEThis method frees the memory allocated for the printer settings represented by the BlackIceDEVMODE handle.

ReleaseBlackIceDEVMODE(pBlackIceDEVMODE) As Long

Input value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE

8.3.1.3 SaveBlackIceDEVMODEThis method will save the new printer settings. The printer devmode is saved for the current user if possible(Win2000), if not to every user (default on NT, XP).

SaveBlackIceDEVMODE(szPrinterName As String, pBlackIceDEVMODE As Long) As Boolean

Input value: szPrinterName - Printer Name.Input value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE structure.Return value - TRUE if the DevMode was successfully updated,

otherwise FALSE.

8.3.1.4 SaveDefaultBlackIceDEVMODEThis method will save the new printer settings.

SaveDefaultBlackIceDEVMODE(szPrinterName As String, pBlackIceDEVMODE As Long) As Boolean

Input value: szPrinterName - Printer Name.Input value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE structure.Return value - TRUE if the DevMode was successfully updated,

otherwise FALSE.

8.3.2 Changing the printer settings

The methods from the BlackIceDEVMODE.OCX are organized as the controls of the Printer Driver User Interface. The Black Ice Printer Driver User Interface driver has 4 tab controls. 1. Device Settings2. File Formats3. Filename Generation4. Start Application

199292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 204: printer

All of the values from the user interface can be set programmatically using the functions from the BlackIceDEVMODE.OCX.

8.3.3 The “Device Settings” methods

8.3.3.1 GetPaperSizeReturns the value of the dmPaperSize member of the DevMode. Represents the value of the 'Paper Size' combo box.

GetPaperSize(pBlackIceDEVMODE As Long) As Integer

Input value - handle to the BlackIceDEVMODE

200292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 205: printer

Return value - paper size (integer number)

8.3.3.2 SetPaperSizeSets the dmPaperSize member of the DevMode. Sets the value of the 'Paper Size' combo box.

SetPaperSize(papersize As Integer, pBlackIceDEVMODE As Long ) As Boolean

Input value: papersize - paper sizeInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.3.3 GetPageWidthInPixelsReturns the value of the PaperWidthInPixels member of the BlackIceDEVMODE. Represents the value of the 'Paper Width' edit box.

GetPageWidthInPixels(pBlackIceDEVMODE As Long) As Long

Input value - handle to the BlackIceDEVMODEReturn value - paper width in pixels ( As a Long number)

8.3.3.4 SetPaperWidthInPixelSets the PaperWidthInPixels member of the BlackIceDEVMODE. Sets the value of the 'Paper Width' edit box.

SetPaperWidthInPixel(paperwidth As Long, pBlackIceDEVMODE As Long) As Boolean

Input value: paperwidth - paper width in pixels.Input value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set,

otherwise FALSE.

8.3.3.5 GetPageHeightInPixelsReturns the value of the PaperHeightInPixels member of the BlackIceDEVMODE. Represents the value of the 'Paper Height' edit box.

GetPageHeightInPixels(pBlackIceDEVMODE As Long) As Long

Input value - handle to the BlackIceDEVMODEReturn value - paper height in pixels

8.3.3.6 SetPaperHeightInPixelSets the PaperHeightInPixels member of the BlackIceDEVMODE. Sets the value of the 'Paper Height' edit box.

SetPaperHeightInPixel(paperheight As Long, pBlackIceDEVMODE As Long) As Boolean

201292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 206: printer

Input value: paperheight - paper height in pixels.Input value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.3.7 GetFaxHeaderReturns the value of the FAXheader member of the BlackIceDEVMODE. Represents the value of the 'Fax header' edit box.

GetFaxHeader(pBlackIceDEVMODE As Long) As Long

Input value - handle to the BlackIceDEVMODEReturn value - fax header in pixels

8.3.3.8 SetFaxHeaderSets the FAXheader member of the BlackIceDEVMODE. Sets the value of the 'Fax header' edit box.

Boolean SetFaxHeader( As Long faxheader, pBlackIceDEVMODE As Long) As

Input value: faxheader - fax header in pixels ( As a Long number).Input value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.3.9 IsFaxOutputEnabledReturns the value of the BLF_FAXOUTPUT flag. Represents the value of the ‘Create Faxable Image’ checkbox.

IsFaxOutputEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if FaxOutput is used, otherwise FALSE

8.3.3.10 EnableFaxOutputSets the BLF_FAXOUTPUT flag. Sets the value of the ‘Create Faxable Image’ checkbox.

EnableFaxOutput(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.3.11 DisableFaxOutputSets the BLF_FAXOUTPUT flag to 0 (false). Sets the value of the ‘Create Faxable Image’ checkbox UNCHECKED.

202292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 207: printer

DisableFaxOutput(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.3.12 IsAdvancedPaperSizeEnabledReturns the value of the BLF_ADVANCEDPAPERSIZE flag. Represents the value of the ‘Advanced Paper size’ checkbox.

IsAdvancedPaperSizeEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if Advanced Paper size is used, otherwise FALSE

8.3.3.13 EnableAdvancedPaperSizeSets the BLF_ADVANCEDPAPERSIZE flag. Sets the value of the ‘Advanced Paper size’ checkbox.

EnableAdvancedPaperSize(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.3.14 DisableAdvancedPaperSizeSets the BLF_ADVANCEDPAPERSIZE flag 0 (false). Sets the value of the ‘Advanced Papersize’ checkbox UNCHECKED.

DisableAdvancedPaperSize(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.3.15 GetOrientationReturns the value of the dmOrientation member of the DevMode. Represents the value of the 'Orientation' radio button.

GetOrientation(pBlackIceDEVMODE As Long) As Integer

Input value - handle to the BlackIceDEVMODEReturn value - Orientation: If the value is 1 the orientation is Portrait. If the value is 2 the

orientation is Landscape

8.3.3.16 SetOrientationSets the dmOrientation member of the DevMode. Sets the value of the 'Orientation' radio button.

SetOrientation(Orientation As Integer, pBlackIceDEVMODE As Long) As Boolean

203292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 208: printer

Input value: Orientation - Orientation 1:Portrait, 2:Landscape.Input value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.3.17 IsRotatePaperEnabledReturns the value of the BLF_ROTATEPAPER flag. Represents the value of the ‘Rotate Landscape image to Portrait’ checkbox.

IsRotatePaperEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if Rotate Landscape image to Portrait is used, otherwise FALSE

8.3.3.18 EnableRotatePaperSets the BLF_ROTATEPAPER flag. Sets the value of the ‘Rotate Landscape image to Portrait’ checkbox.

EnableRotatePaper(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.3.19 DisableRotatePaperSets the BLF_ROTATEPAPER flag to 0 (false). Sets the value of the ‘Rotate Landscape image to Portrait’ checkbox UNCHECKED.

DisableRotatePaper(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.3.20 GetXDPIReturns the value of the dmPrintQuality member of the DevMode. Represents the value of the 'Horizontal Resolution' edit box.

GetXDPI(pBlackIceDEVMODE As Long) As Integer

Input value - handle to the BlackIceDEVMODEReturn value - Horizontal Resolution (integer number)

8.3.3.21 SetXDPISets the dmPrintQuality member of the DevMode. Sets the value of the 'Horizontal Resolution' edit box.

SetXDPI(xdpi As Integer, pBlackIceDEVMODE As Long) As Boolean

204292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 209: printer

Input value: xdpi - Horizontal ResolutionInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.3.22 GetYDPIReturns the value of the dmYResolutionmember of the DevMode. Represents the value of the 'Vertical Resolution' edit box.

GetYDPI(pBlackIceDEVMODE As Long) As Integer

Input value - handle to the BlackIceDEVMODEReturn value - Vertical Resolution

8.3.3.23 SetYDPISets the dmYResolutionmember of the DevMode. Sets the value of the 'Vertical Resolution' edit box.

SetYDPI(ydpi As Integer, pBlackIceDEVMODE As Long) As Boolean

Input value: ydpi - Vertical ResolutionInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.3.24 IsFaxLowOutputEnabledReturns the value of the BLF_LOWFAXRES flag. If true, the low fax resolution (204x98) is selected, if false the Fine Fax resolution (204x196) is selected when the ‘Create Faxable Image’ option is selected.

BOOL IsLowFaxOutputEnabled(BlackIceDEVMODE* pDevMode);

Input value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if Low Fax resolution is selected, otherwise

FALSE.

8.3.3.25 EnableLowFaxOutputSets the BLF_ LOWFAXRES flag. Sets the value of the fax resolution when the ‘Create Faxable Image’ checkbox is selected.

BOOL EnableLowFaxOutput(BlackIceDEVMODE* pDevMode);

Input value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

205292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 210: printer

8.3.3.26 DisableLowFaxOutputSets the BLF_ LOWFAXRES flag 0 (false). Sets the value of the fax resolution when the ‘Create Faxable Image’ checkbox is selected.

BOOL DisableLowFaxOutput(BlackIceDEVMODE* pDevMode);

Input value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

206292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 211: printer

8.3.4 The “File Formats” methods

8.3.4.1 GetFileFormatReturns the value of the Format member of the BlackIceDEVMODE. Represents the value of the 'File Format' combo box.

GetFileFormat(pBlackIceDEVMODE As Long) As Long

Input value - handle to the BlackIceDEVMODEReturn value - File Format

207292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 212: printer

8.3.4.2 SetFileFormatSets the Format member of the BlackIceDEVMODE. Sets the value of the 'File Format' combo box.

SetFileFormat(fileformat As Long, pBlackIceDEVMODE As Long) As Boolean

Input value: fileformat - File FormatInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.4.3 GetLossRatioReturns the value of the LossRatio member of the BlackIceDEVMODE. Represents the value of the 'JPEG loss ratio' slider.

GetLossRatio(pBlackIceDEVMODE As Long) As Long

Input value - handle to the BlackIceDEVMODEReturn value - JPEG loss ratio

8.3.4.4 SetLossRatioSets LossRatio member of BlackIceDEVMODE. Sets the value of the 'JPEG loss ratio' slider.

SetLossRatio(lossratio As Long, pBlackIceDEVMODE As Long) As Boolean

Input value: lossratio - JPEG loss ratioInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise FALSE.

8.3.4.5 GetColorDepthReturns the value of the ColorMode member of the BlackIceDEVMODE. Represents the value of the 'Color Depth' radio button.

GetColorDepth(pBlackIceDEVMODE As Long) As Long

Input value - handle to the BlackIceDEVMODEReturn value - Color Depth

8.3.4.6 SetColorDepthSets the ColorMode member of the BlackIceDEVMODE. Sets the value of the 'Color Depth' radio button.

SetColorDepth(colordepth As Long, pBlackIceDEVMODE As Long) As Boolean

Input value: colordepth - Color DepthInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.

208292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 213: printer

Return value - TRUE if the member was successfully set, otherwise FALSE.

8.3.4.7 IsMultipageImageEnabledReturns the value of the BLF_MULTIIMAGE flag. Represents the value of the ‘Create Multi-page Image’ checkbox.

IsMultipageImageEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if Create Multi-page Image is used, otherwise FALSE

8.3.4.8 EnableMultipageImageSets the BLF_MULTIIMAGE flag. Sets the value of the ‘Create Multi-page Image’ checkbox.

EnableMultipageImage(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.4.9 DisableMultipageImageSets the BLF_MULTIIMAGE flag 0 (false). Sets the value of the ‘Create Multipage Image’ checkbox UNCHECKED.

DisableMultipageImage(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set 0 (false), otherwise FALSE.

8.3.4.10 IsAppendImageEnabledReturns the value of the BLF_MULTIIMAGE flag. Represents the value of the ‘Create Multipage Image’ checkbox.

IsAppendImageEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if the Create Multipage Image is used, otherwise FALSE

8.3.4.11 EnableAppendImageSets the BLF_MULTIIMAGE flag. Sets the value of the ‘Create Multipage Image’ checkbox.

EnableAppendImage(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

209292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 214: printer

8.3.4.12 DisableAppendImageSets the BLF_MULTIIMAGE flag to 0 (false). Sets the value of the ‘Create Multi-page Image’ checkbox UNCHECKED.

DisableAppendImage(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.4.13 IsDisableImageEnabledReturns the value of the BLF_DISABLEIMAGE flag. Represents the value of the 'Disable Image' checkbox.

IsDisableImageEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if the Disable Image is used, otherwise FALSE

8.3.4.14 EnableDisableImageSets the BLF_DISABLEIMAGE flag. Sets the value of the 'Disable Image' checkbox.

EnableDisableImage(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.4.15 DisableDisableImageSets the BLF_DISABLEIMAGE flag to 0 (false). Sets the value of the 'Disable Image' checkbox UNCHECKED.

DisableDisableImage(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.4.16 IsEasternCharSupportEnabledReturns the value of the BLF_GLYPHSUPPORT flag. Represents the value of the 'Eastern Character Support' checkbox.

IsEasternCharSupportEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if the Eastern Character Support is used, otherwise FALSE

210292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 215: printer

8.3.4.17 EnableEasternCharSupportSets the BLF_GLYPHSUPPORT flag. Sets the value of the 'Eastern Character Support' checkbox.

EnableEasternCharSupport(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.4.18 DisableEasternCharSupportSets the BLF_GLYPHSUPPORT flag to 0 (false). Sets the value of the 'Eastern Character Support' checkbox UNCHECKED.

DisableEasternCharSupport(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.4.19 IsWriteTextEnabledReturns the value of the BLF_WRITETEXT flag. Represents the value of the 'Write Text File' checkbox.

IsWriteTextEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if the Write Text File is used, otherwise FALSE

8.3.4.20 EnableWriteTextSets the BLF_WRITETEXT flag. Sets the value of the 'Write Text File' checkbox.

EnableWriteText(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.4.21 DisableWriteTextSets the BLF_WRITETEXT flag to 0 (false). Sets the value of the 'Write Text File' checkbox UNCHECKED.

DisableWriteText(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

211292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 216: printer

8.3.4.22 IsMailMergeEnabledReturns the value of the BLF_MAILMERGE flag. Represents the value of the ‘Mail Merge’ checkbox.

IsMailMergeEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if WriteText File is used, otherwise FALSE

8.3.4.23 EnableMailMergeSets the BLF_MAILMERGE flag. Sets the value of the ‘Mail Merge’ checkbox.

EnableMailMerge(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.4.24 DisableMailMergeSets the BLF_MAILMERGE flag to 0 (false). Sets the value of the ‘Mail Merge’ checkbox UNCHECKED.

DisableMailMerge(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.4.25 IsAdvancedTextEnabledReturns the value of the BLF_ADVANCEDTEXT flag. Represents the value of the 'Save position and style' checkbox.

IsAdvancedTextEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if the Save position and style is used, otherwise FALSE

8.3.4.26 EnableAdvancedTextSets the BLF_ADVANCEDTEXT flag. Sets the value of the 'Save position and style' checkbox.

EnableAdvancedText(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.4.27 DisableAdvancedTextSets the BLF_ADVANCEDTEXT flag to 0 (false). Sets the value of the 'Save position and style' checkbox UNCHECKED.

212292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 217: printer

DisableAdvancedText(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.4.28 IsInternetTiffFormatEnabledReturns the value of the BLF_INTERNETTIFF flag. Represents the value of the ‘Internet TIFF format’ checkbox.

IsInternetTiffFormatEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if the Internet TIFF format is used, otherwise FALSE

8.3.4.29 EnableInternetTiffFormatSets the BLF_INTERNETTIFF flag. Sets the value of the ‘Internet TIFF format’ checkbox.

EnableInternetTiffFormat(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.4.30 DisableInternetTiffFormatSets the BLF_INTERNETTIFF flag to 0 (false). Sets the value of the ‘Internet TIFF format’ checkbox UNCHECKED.

DisableInternetTiffFormat(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.4.31 IsReverseBitOrderEnabledReturns the value of the BLF_REVERSEFILLORDER flag. Represents the value of the ‘Reverse Bit Order in TIFF’ checkbox.

IsReverseBitOrderEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if the Reverse Bit Order in TIFF is used, otherwise FALSE

8.3.4.32 EnableReverseBitOrderSets the BLF_REVERSEFILLORDER flag. Sets the value of the ‘Reverse Bit Order in TIFF’ checkbox.

EnableReverseBitOrder(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.

213292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 218: printer

Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.4.33 DisableReverseBitOrderSets the BLF_REVERSEFILLORDER flag to 0 (false). Sets the value of the ‘Reverse Bit Order in TIFF’ checkbox UNCHECKED.

DisableReverseBitOrder(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.4.34 IsPageNumberingEnabled Returns the value of the BLF_PAGENUMBERING flag. Represents the value of the ‘Add Page Numbering Tag’ checkbox.

IsPageNumberingEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if the Add Page Numbering Tag is used, otherwise FALSE

8.3.4.35 EnablePageNumberingSets the BLF_PAGENUMBERING flag. Sets the value of the ‘Add Page Numbering Tag’ checkbox.

EnablePageNumbering(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.4.36 DisablePageNumberingSets the BLF_PAGENUMBERING flag to 0 (false). Sets the value of the ‘Add Page Numbering Tag’ checkbox UNCHECKED.

DisablePageNumbering(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.4.37 GetDitheringReturns the value of the Dithering member of the BlackIceDEVMODE. Represents the value of the 'Photo Quality' radio button.

GetDithering(pBlackIceDEVMODE As Long) As Long

Input value - handle to the BlackIceDEVMODEReturn value - Photo Quality

214292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 219: printer

8.3.4.38 SetDitheringSets the Dithering member of the BlackIceDEVMODE. Sets the value of the 'Photo Quality' radio button.

SetDithering(dithering As Long, pBlackIceDEVMODE As Long) As Boolean

Input value: dithering - Photo QualityInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.4.39 GetBrightnessReturns the value of the Brightness member of the BlackIceDEVMODE. Represents the value of the 'Intensity' slider.

GetBrightness(pBlackIceDEVMODE As Long) As Long

Input value - handle to the BlackIceDEVMODEReturn value - Intensity

8.3.4.40 SetBrightnessSets the Brightness member of the BlackIceDEVMODE. Sets the value of the 'Intensity' slider.

SetBrightness(brightness As Long, pBlackIceDEVMODE As Long) As Boolean

Input value: brightness - IntensityInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

215292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 220: printer

8.3.5 The “Filename Generation” methods

8.3.5.1 GetFileGenerationMethodReturns the value of the FileNameGenerationFlags member of the BlackIceDEVMODE. Represents the value of the 'File Name Generation Method' combo box.

GetFileGenerationMethod(pBlackIceDEVMODE As Long) As Long

Input value - handle to the BlackIceDEVMODEReturn value - File Name Generation Method

216292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 221: printer

8.3.5.2 SetFileGenerationMethodSets the FileNameGenerationFlags member of the BlackIceDEVMODE. Sets the value of the 'File Name Generation Method' combo box.

SetFileGenerationMethod(fnamegen As Long, pBlackIceDEVMODE As Long) As Boolean

Input value: fnamegen - File Name Generation MethodInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.5.3 GetFileNamePrefixReturns the value of the FileNamePrefix member of the BlackIceDEVMODE. Represents the value of the 'File Name Prefix' edit box.

GetFileNamePrefix(pBlackIceDEVMODE As Long) As String

Input value - handle to the BlackIceDEVMODEReturn value - File Name Prefix

8.3.5.4 SetFileNamePrefixSets the FileNamePrefix member of the BlackIceDEVMODE. Sets the value of the 'File Name Prefix' edit box.

SetFileNamePrefix(fnamepref As String, pBlackIceDEVMODE As Long) As Boolean

Input value: fnamepref - File Name PrefixInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.5.5 GetFileExtensionReturns the value of the FileExtension member of the BlackIceDEVMODE. Represents the value of the 'File Name Extension' edit box.

GetFileExtension(pBlackIceDEVMODE As Long) As String

Input value - handle to the BlackIceDEVMODEReturn value - File Name Extension

8.3.5.6 SetFileExtensionSets the FileExtension member of the BlackIceDEVMODE. Sets the value of the 'File Name Extension' edit box.

SetFileExtension(fnameext As String, pBlackIceDEVMODE As Long) As Boolean

Input value: fnameext - File Name Extension217

292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112© 1989 – 2001 Black Ice Software Inc.

Information Contained Is Not For Reproduction Or Distribution

Page 222: printer

Input value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.5.7 IsCustomExtensionEnabledReturns the value of the BLF_CUSTOMEXT flag. Represents the value of the 'Use Custom Extension' checkbox.

IsCustomExtensionEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if Use Custom Extension is used, otherwise FALSE

8.3.5.8 EnableCustomExtensionSets the BLF_CUSTOMEXT flag. Sets the value of the 'Use Custom Extension' checkbox.

EnableCustomExtension(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.5.9 DisableCustomExtensionSets the BLF_CUSTOMEXT flag to 0 (false). Sets the value of the 'Use Custom Extension' checkbox UNCHECKED.

DisableCustomExtension(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.5.10 GetINIFileNameReturns the value of the INIFileName member of the BlackIceDEVMODE. Represents the value of the 'INI File Name'/'Registry path'/etc. edit box.

GetINIFileName(pBlackIceDEVMODE As Long) As String

Input value - handle to the BlackIceDEVMODEReturn value - INI File Name/Registry Path/etc

8.3.5.11 SetINIFileNameSets INIFileName member of the BlackIceDEVMODE. Sets the value of the 'INI File Name'/'Registry path'/etc. edit box.

SetINIFileName(inifname As String, pBlackIceDEVMODE As Long) As Boolean

Input value: inifname - INI File Name/Registry Path/etc.Input value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.

218292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 223: printer

Return value - TRUE if the member was successfully set, otherwise FALSE.

8.3.5.12 GetImageFileNameReturns the value of the FileImageName member of the BlackIceDEVMODE. Represents the value of the 'File Image Name' edit box if Filename Generation method is ‘Exact filename’.

GetImageFileName(pBlackIceDEVMODE As Long) As String

Input value - handle to the BlackIceDEVMODEReturn value - Image Filename

8.3.5.13 SetImageFileNameSets the FileImageName member of the BlackIceDEVMODE. Sets the value of the 'File Image Name' edit box if Filename Generation method is ‘Exact filename’.

SetImageFileName(filename As String, pBlackIceDEVMODE As Long) As Boolean

Input value: filename - Exact FilenameInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.5.14 IsKeepExistingFilesEnabledReturns the value of the BLF_KEEPFILES flag. Represents the value of the 'Keep existing files' checkbox.

IsKeepExistingFilesEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if Keep existing files is used, otherwise FALSE

8.3.5.15 EnableKeepExistingFilesSets the BLF_KEEPFILES flag. Sets the value of the 'Keep existing files' checkbox.

EnableKeepExistingFiles(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.5.16 DisableKeepExistingFilesSets the BLF_KEEPFILES flag to 0 (false). Sets the value of the 'Keep existing files' checkbox UNCHECKED.

DisableKeepExistingFiles(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.

219292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 224: printer

Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.5.17 GetOutputDirectoryReturns the value of the OutputDirectory member of the BlackIceDEVMODE. Represents the value of the 'Output Directory' edit box.

GetOutputDirectory(pBlackIceDEVMODE As Long) As String

Input value - handle to the BlackIceDEVMODEReturn value - Output Directory

8.3.5.18 SetOutputDirectorySets the OutputDirectory member of the BlackIceDEVMODE. Sets the value of the 'Output Directory' edit box.

SetOutputDirectory(outputdir As String, pBlackIceDEVMODE As Long) As Boolean

Input value: outputdir - Output DirectoryInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.5.19 IsGroupFileDisabledReturns the value of the BLF_DISABLEGROUPFILE flag. Represents the value of the 'Disable Group File' checkbox.

IsGroupFileDisabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if Disable Group File is used, otherwise FALSE

8.3.5.20 DisableGroupFileSets the BLF_DISABLEGROUPFILE flag. Sets the value of the 'Disable Group File' checkbox.

DisableGroupFile(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.5.21 EnableGroupFileSets the BLF_DISABLEGROUPFILE flag to 0 (false). Sets the value of the 'Disable Group File' checkbox UNCHECKED.

EnableGroupFile(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

220292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 225: printer

8.3.5.22 IsDeleteGroupFileEnabledReturns the value of the BLF_DELETEGROUPFILE flag. Represents the value of the 'Delete Group File After Printing' checkbox.

IsDeleteGroupFileEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if Delete Group File After Printing is used, otherwise FALSE

8.3.5.23 EnableDeleteGroupFileSets the BLF_DELETEGROUPFILE flag. Sets the value of the 'Delete Group File After Printing' checkbox.

EnableDeleteGroupFile(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.5.24 DisableDeleteGroupFileSets the BLF_DELETEGROUPFILE flag to 0 (false). Sets the value of the 'Delete Group File After Printing' checkbox UNCHECKED.

DisableDeleteGroupFile(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

221292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 226: printer

8.3.6 The “Start Application” methods

8.3.6.1 IsStartApplicationEnabledReturns the value of the BLF_LAUNCHAPP flag. Represents the value of the 'Enable Start Application' checkbox.

IsStartApplicationEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if the Enable Start Application is used, otherwise FALSE

222292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 227: printer

8.3.6.2 EnableStartApplicationSets the BLF_LAUNCHAPP flag. Sets the value of the 'Enable Start Application' checkbox.

EnableStartApplication(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.6.3 DisableStartApplicationSets the BLF_LAUNCHAPP flag to 0 (false). Sets the value of the 'Enable Start Application' checkbox UNCHECKED.

DisableStartApplication(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.6.4 GetApplicationPathReturns the value of the ApplicationPath member of the BlackIceDEVMODE. Represents the value of the 'Output Directory' edit box.

GetApplicationPath(pBlackIceDEVMODE As Long) As String

Input value - handle to the BlackIceDEVMODEReturn value - Application Path

8.3.6.5 SetApplicationPathSets the ApplicationPath member of the BlackIceDEVMODE. Sets the value of the 'Application Path' edit box.

SetApplicationPath(applicationpath As String ,pBlackIceDEVMODE As Long) As Boolean

Input value: applicationpath - Application PathInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.6.6 IsStartBeforePrintReturns the value of the BLF_STARTBEFOREPRINT flag. Represents the value of the 'Start Before Printing' radio button.

IsStartBeforePrint(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if Start Before Printing is used, otherwise FALSE (the driver will start the application after printing)

223292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 228: printer

8.3.6.7 EnableStartBeforePrintSets the BLF_STARTBEFOREPRINT flag. Sets the value of the 'Start Before Printing' radio button.

EnableStartBeforePrint(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.6.8 DisableStartBeforePrintSets the BLF_STARTBEFOREPRINT flag to 0 (false). Sets the value of the 'Start Before Printing' radio button UNCHECKED. (Sets the value of the 'Start After Printing' radio button CHECKED)

DisableStartBeforePrint(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.6.9 IsPassParametersEnabledReturns the value of the BLF_PASSPARAMETERS flag. Represents the value of the 'Pass Parameters' checkbox.

IsPassParametersEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if Pass Parameters is used, otherwise FALSE

8.3.6.10 EnablePassParametersSets the BLF_PASSPARAMETERS flag. Sets the value of the 'Pass Parameters' checkbox.

EnablePassParameters(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.6.11 DisablePassParametersSets the BLF_PASSPARAMETERS flag to 0 (false). Sets the value of the 'Pass Parameters' checkbox UNCHECKED.

DisablePassParameters(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

224292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 229: printer

8.3.6.12 IsStartNormalReturns the value of the BLF_STARTNORMAL flag. Represents the value of the 'Normal' radio button.

IsStartNormal(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if Start Application In a Normal Window is used, otherwise FALSE

8.3.6.13 EnableStartNormalSets the BLF_STARTNORMAL flag. Sets the value of the 'Normal' radio button. The driver will start the application In a Normal window

EnableStartNormal(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.6.14 DisableStartNormalSets the BLF_STARTNORMAL flag to 0 (false). Sets the value of the 'Normal' radio button UNCHECKED.

DisableStartNormal(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.6.15 IsStartMinimizedReturns the value of the BLF_STARTMINIMIZED flag. Represents the value of the 'Minimized' radio button.

IsStartMinimized(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if Start Application In a Minimized Window is used, otherwise FALSE

8.3.6.16 EnableStartMinimizedSets the BLF_STARTMINIMIZED flag. Sets the value of the 'Minimized' radio button. The driver will start the application In a Minimized window

EnableStartMinimized(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

225292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 230: printer

8.3.6.17 DisableStartMinimizedSets the BLF_STARTMINIMIZED flag to 0 (false). Sets the value of the 'Minimized' radio button UNCHECKED.

DisableStartMinimized(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.6.18 IsStartHiddenReturns the value of the BLF_STARTHIDDEN flag. Represents the value of the 'Hidden' radio button.

IsStartHidden(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if Start Application Hidden is used, otherwise FALSE

8.3.6.19 EnableStartHiddenSets the BLF_STARTHIDDEN flag. Sets the value of the 'Hidden' radio button. The driver will start the application Hidden

EnableStartHidden(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.6.20 DisableStartHiddenSets the BLF_STARTHIDDEN flag to 0 (false). Sets the value of the 'Hidden' radio button UNCHECKED.

DisableStartHidden(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.6.21 IsMessagingInterfaceEnabledReturns the value of the BLF_SENDMESSAGE flag. Represents the value of the 'Disable the Messaging Interface' checkbox, BUT the flag and the check box contain the opposite value.

IsMessagingInterfaceEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if the Messaging Interface is used (the check box is unchecked),

otherwise FALSE ( The Messaging Interface is not used and the check box is checked)

226292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 231: printer

8.3.6.22 EnableMessagingInterfaceSets the BLF_SENDMESSAGE flag. Sets the value of the 'Disable the Messaging Interface' checkbox UNCHECKED. The driver uses the Messaging Interface.

EnableMessagingInterface(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.6.23 DisableMessagingInterfaceSets the BLF_SENDMESSAGE flag to 0 (false). Sets the value of the 'Disable the Messaging Interface' checkbox. The driver will not use Messaging Interface.

DisableMessagingInterface(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

227292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 232: printer

8.3.7 Miscellaneous methods

8.3.7.1 GetInterfaceNameReturns the value of the InterfaceName member of the BlackIceDEVMODE. The InterfaceName member stores the name of the messaging interface.

InterfaceName(pBlackIceDEVMODE As Long) As String

Input value - handle to the BlackIceDEVMODEReturn value - Interface Name

8.3.7.2 SetInterfaceNameSets the InterfaceName member of the BlackIceDEVMODE. The InterfaceName member stores the name of the messaging interface.

SetInterfaceName(intfname As String, pBlackIceDEVMODE As Long) As Boolean

Input value: intfname - Interface NameInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.7.3 GetPaperLengthReturns the value of the dmPaperLength member of the DevMode. (DM.dmPaperLength member of the BlackIceDEVMODE ) This value represent the 'Actual paper length'.

GetPaperLength(pBlackIceDEVMODE As Long) As Integer

Input value - handle to the BlackIceDEVMODEReturn value - Actual paper length

8.3.7.4 SetPaperLengthSets the dmPaperLength member of the DevMode. (DM.dmPaperLength member of the BlackIceDEVMODE ) This value represents the 'Actual paper length'.

SetPaperLength(paperlength As Integer, pBlackIceDEVMODE As Long) As Boolean

Input value: paperlength - Actual paper lengthInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

228292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 233: printer

8.3.7.5 IsTiffDllEnabledReturns the value of the BLF_ENABLETIFFDLL flag. If the flag is set, the printer driver will load the TIFF32.DLL. This flag can only be set programmatically.

IsTiffDllEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if the TIFF32.DLL is enabled, otherwise FALSE

8.3.7.6 EnableTiffDllSets the BLF_ENABLETIFFDLL flag. If the flag is set, the printer driver will load the TIFF32.DLL. This flag can only be set programmatically.

EnableTiffDll(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.7.7 DisableTiffDllSets the BLF_ENABLETIFFDLL flag to 0 (false). If the flag is set, the printer driver will load the TIFF32.DLL. This flag can only be set programmatically.

DisableTiffDll(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.7.8 IsJpegDllEnabledReturns the value of the BLF_ENABLEJPEGDLL flag. If the flag is set, the printer driver will load the JPEG32.DLL. This flag can only be set programmatically.

IsJpegDllEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if the JPEG32.DLL is enabled, otherwise FALSE

8.3.7.9 EnableJpegDllSets the BLF_ENABLEJPEGDLL flag. If the flag is set, the printer driver will load the JPEG32.DLL. This flag can only be set programmatically.

EnableJpegDll(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

229292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 234: printer

8.3.7.10 DisableJpegDllSets the BLF_ENABLEJPEGDLL flag to 0 (false). If the flag is set, the printer driver will load the JPEG32.DLL. Can be set only programmatically.

DisableJpegDll(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.7.11 GetTIFFDLLNameReturns the value of the TIFFDLLName member of the BlackIceDEVMODE. The TIFFDLLName member stores the name and path of the TIFF32.DLL. This DLL encodes the TIFF files. The file is needed for TIFF output.

GetTIFFDLLName(pBlackIceDEVMODE As Long) As String

Input value - handle to the BlackIceDEVMODEReturn value - TIFFDLLName

8.3.7.12 SetTIFFDLLNameSets the TIFFDLLName member of the BlackIceDEVMODE. The TIFFDLLName member stores the name and path of the TIFF32.DLL. This DLL encodes the TIFF files. The file is needed for TIFF output.

SetTIFFDLLName(stringtiffdll As String, pBlackIceDEVMODE As Long) As Boolean

Input value: stringtiffdll - TIFFDLLNameInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.7.13 GetJPEGDLLNameReturns the value of the JPEGDLLName member of the BlackIceDEVMODE. The JPEGDLLName member stores the name and path of the JPEG32.DLL. This DLL encodes the Jpeg files. The file is needed for Jpeg output.

GetJPEGDLLName(pBlackIceDEVMODE As Long) As String

Input value - handle to the BlackIceDEVMODEReturn value - JPEGDLLName

8.3.7.14 SetJPEGDLLNameSets the JPEGDLLName member of the BlackIceDEVMODE. The JPEGDLLName member stores the name and path of the JPEG32.DLL. This DLL encodes the Jpeg files. The file is needed for Jpeg output.

SetJPEGDLLName(stringjpegdll As String, pBlackIceDEVMODE As Long) As Boolean

230292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 235: printer

Input value: stringjpegdll - JPEGDLLNameInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.7.15 GetResourceDLLNameReturns the value of the ResourceDLLName member of the BlackIceDEVMODE. The ResourceDLLName member stores the name and path of the driver resource DLL

GetResourceDLLName(pBlackIceDEVMODE As Long) As String

Input value - handle to the BlackIceDEVMODEReturn value - ResourceDLLName

8.3.7.16 SetResourceDLLNameSets the ResourceDLLName member of the BlackIceDEVMODE. The ResourceDLLName member stores the name and path of the driver resource DLL

SetResourceDLLName(stringresdll As String, pBlackIceDEVMODE As Long) As Boolean

Input value: stringresdll - ResourceDLLNameInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.7.17 GetBitsPerPixelReturns the value of the color depth in pixels. If the Color Depth is BITS_1, the return value is 1 If the Color Depth is BITS_8, the return value is 8 If the Color Depth is BITS_8GRAY, the return value is 8 If the Color Depth is BITS_24, the return value is 24

GetResourceDLLName(pBlackIceDEVMODE As Long) As Long

Input value - handle to the BlackIceDEVMODEReturn value - Color depth in pixels.

9 Visual Basic Sample – How to modify the printer settings

This sample demonstrates how to use the methods of the BlackIceDEVMODE.OCX. The sample shows how to read, modify and save the printer settings programmatically.

231292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 236: printer

The ‘PrinterSettings’ program allows users to change the settings of Black Ice printers.

OK: save the settings and exit. Cancel: exit the program without changing the settings Apply: save the settings without exiting. You can modify the controls again. Open printer: closes the currently opened printer and tries to open new printer specified

in the “Printer name” text box.

232292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 237: printer

233292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 238: printer

Differences between Win95/98/ME and XP/W2K/NT DriversThe following is a brief list of differences between the Win95/98/ME and XP/W2K/NT Printer Drivers:

Instead of one dialog box, the settings are divided into two groups that can be found in two separate dialogs on Xpand W2K: Properties and Printing Preferences. On NT 4.0 it is named Properties and Document Defaults.Properties: this dialog can be opened by clicking on the Black Ice printer with the right mouse button and choosing Properties. The parameters available in this dialog will be used by every printing application when printing to this printer. The last property sheet contains Black Ice specific settings.Document Defaults: another group of settings can be found by clicking on the Black Ice printer with the right mouse button and selecting Document Defaults. This dialog contains default values for document related and other settings. However; if a printing application wants to modify some of these settings it can call the DocumentProperties() function to do so. Even two or more applications running simultaneously can use different settings.

The XP/W2K and NT driver writes information to a named pipe instead of sending actual messages.

The user needs Administrator privileges to be able to modify the printer’s settings on XP/W2K and NT.

234292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 239: printer

Part B: Drivers for Win95/98 and ME

235292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 240: printer

Installing the Win95/98 and ME DriversThree installation options exist for the Black Ice Printer driver depending on the type of desired output. The driver can automatically be configured for fax applications, non-fax applications (document imaging), or the driver can be custom configured. The settings specified during installation can be changed at any time by accessing the Printers folder and right clicking on the Black Ice Driver and selecting “Properties”.

1. Double click on the file that was downloaded to begin the installation.2. Follow the onscreen instructions until you are prompted to select the type of driver installation

you want. Please see the screen shot below:

You will be presented with three installation options:

6. Fax Applications: Selecting this setting will automatically configure the driver for fax output. You can change these settings at any time after installation. See the following sections of the manual for more detail.

7. Non Fax Applications: Selecting this setting will automatically configure the driver for document imaging output. You can change these settings at any time after installation. See the following sections of the manual for more detail.

236292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 241: printer

8. Custom Config: Selecting this setting will bring up the Driver Properties dialog box where you can you manually configure the driver. You can change these settings at any time after installation. See the following sections of the manual for more detail.

Please see the installation section below for each option:

Fax Applications:

Selecting this option will bring up the following screen:

Here you can specify the type of TIFF file that will be outputted. The settings can be based on a specific hardware type or you can go with the default setting. Make your selection and press the Next button to complete the installation. You can change these settings at any time after installation. See the following sections of the manual for more detail.

Non Fax Applications:

Selecting this option automatically configures the driver for document imaging. By default the file format will be set to 24 bit JPEG. Press finish to complete the installation. You can change these settings at any time after installation. See the following sections of the manual for more detail.

Custom Config:

237292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 242: printer

Selecting this option will bring up the following screen:

Press the Printer button to manually configure the driver or press the next button to proceed with the default settings and complete the installation. By default, the image format is set to 24 bit JPEG. Pressing the Printer button will bring up the following dialog box.

238292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 243: printer

Use this dialog box and the various sheets to configure the driver. The following sections of the manual will describe in detail how to configure the properties of the Printer Driver. Make your selections and press OK to complete the installation.

239292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 244: printer

Win95/98 and ME Monochrome Driver

240292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 245: printer

Configuring the Driver on Windows 95/98 and ME

241292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 246: printer

Device Settings sheet

Paper WidthPaper width is shown in the selected unit type of 0.01 inch, 0.1 mm, or a pixel.

242292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 247: printer

Paper HeightPaper height is shown in the selected unit type of 0.01 inch, 0.1 mm, or a pixel.

UnitsThe units are the type of measurement used to describe the paper width and height. The units can be 0.01 inch, 0.1 mm (mm = millimeter), or a pixel.

Specifying the Paper SizeTo change the paper size, select the Paper size list box. The page sizes range from envelopes to large A size pages. Also, included is a user-definable variable page size. The page size can be specified in increments of 0.01 inch, 0.1 mm, or a pixel. There are 45 Standard paper sizes, 36 Advanced paper sizes, as well as 3 Black Ice Software specific paper sizes such as FAX paper size, VARIABLE paper size and VARIABLE paper size specified in pixels. - The “VARIABLE paper size” is specified by 0.01 inch or 0.1 mm. The formula to

compute between mm and pixels is mm = pixel x 254/DPI or pixel = mm x DPI/254. - The “VARIABLE paper size specified in pixels” can be any size in the boundary of the

Microsoft environment with a maximum width and height of 65535 x 65535 pixels. The DPI information will be ignored.

Please Note:

The “VARIABLE paper size specified in pixels” is a special case. Normally, page size times DPI is equal to the image size in pixels. With the “VARIABLE paper size specified in pixels” setting, the image size in pixels is absolute and the DPI can be set arbitrarily. The “VARIABLE paper size specified in pixels” setting can be very useful in web and graphic applications where the physical size of the image is the preeminent factor.

Page Sizes SupportedThe following page sizes are supported by the driver:

- Letter 8 1/2 x 11 in- Tabloid 11 x 17 in- Ledger 17 x 11 in- Legal 8 1/2 x 14 in- Statement 5 1/2 x 8 1/2 in- Executive 7 1/4 x 10 1/2 in- A3 297 x 420 mm- A4 210 x 297 mm- A4 Small 210 x 297 mm

243292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 248: printer

- A5 148 x 210 mm- B4 250 x 354- B5 182 x 257 mm- Folio 8 1/2 x 13 in- Quarto 215 x 275 mm- 10x14 in- 11x17 in- Note 8 1/2 x 11 in- Envelope #9 3 7/8 x 8 7/8- Envelope #10 4 1/8 x 9 ½- Envelope #11 4 1/2 x 10 3/8- Envelope #12 4 \276 x 11- Envelope #14 5 x 11 ½- C size sheet- D size sheet- E size sheet- Envelope DL 110 x 220mm- Envelope C5 162 x 229 mm- Envelope C3 324 x 458 mm- Envelope C4 229 x 324 mm- Envelope C6 114 x 162 mm- Envelope C65 114 x 229 mm- Envelope B4 250 x 353 mm- Envelope B5 176 x 250 mm- Envelope B6 176 x 125 mm- Envelope 110 x 230 mm- Envelope Monarch 3.875 x 7.5 in- 6 3/4 Envelope 3 5/8 x 6 1/2 in- US Std Fanfold 14 7/8 x 11 in- German Std Fanfold 8 1/2 x 12 in- German Legal Fanfold 8 1/2 x 13 in- Fax paper 8.64 x 11 in or 215 mm

If the ‘Create faxable image’ box is checked, only Fax and Legal paper sizes will be available. As a result, saved images can be faxed.

Add Fax HeaderThe value entered in the edit box will reduce the standard page height by the specified number of pixels. This option can be used to attach private page header information on the top of each page. For example, if the page height is 2200 pixels and the fax header field is set to 100, the generated image height will be 2100 pixels.

244292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 249: printer

Create a Faxable ImageThis check box can be used to set the driver to automatically create images that have fax paper size and resolution. The paper sizes and graphic resolutions are not restricted, but the end result image file will have a fax-able page size and fax-compatible resolution. For example, if the page is Letter paper size and 600 DPI, the generated file width will be 1728 pixels.

Force FAX ResolutionIf the ‘Create Faxable image’ check is selected the driver to automatically create images that have fax paper size and resolution. The user can select the final resolution of the faxable image between 204x98 DPI (Standard Fax Resolution) and 204x196 DPI (Fine Fax Resolution).

What is Fax Paper Size? Many people confuse the US Letter or European A4 paper sizes with fax paper size. According to the ITU T.30 standard, the Fax page width is 215 mm or 1728 pixels, which is slightly different than the US Letter or A4 paper size. There are additional fax paper sizes such as 255 mm and 303 mm; however they are in not in use or there are very limited devices supporting them. If the 255mm or 303 mm paper size is needed, please use the “VARIABLE paper size” setting.

How is Page size computed and image size translated into pixels? Every page is defined in either millimeters or inches. The Microsoft DEVMODE data structure uses millimeters as the base for computation. The formula to compute between mm and pixels is mm = pixel x 254/DPI or pixel = mm x DPI/254.

Advanced Paper sizeEnable/Disable the advanced paper size listing in the “Paper” combo box. There are 35 paper sizes that are not commonly used. There are special circumstances where these paper sizes are useful. For example: Architects for drawing or International such as the Japanese envelope size.

Specifying Page OrientationThe default page orientation (Portrait or Landscape) can be set on this sheet as well. The page orientation set here will be used for fax transmissions.If Landscape orientation is selected the driver will report landscape paper orientation to the printing application, but the image on the page will be rotated 90 degrees so that the actual saved image will still be in portrait orientation just like when you print in landscape mode. This makes it possible to fax a page printed in landscape orientation.

245292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 250: printer

Rotate a Landscape Image to PortraitWhen landscape mode is selected this will rotate the generated landscape image 90 degrees so it can be printed. Also, this option is selected automatically when the “Create Faxable Image” setting is checked.

Specifying Graphic ResolutionDefault resolution (typically measured in dots per inch, or DPI), for printing graphic images.Available resolutions are listed in the Graphics Resolution window. These modes are as follows:

204 x 98 DPI - Draft resolution (standard fax mode).204 x 196 DPI - Low resolution (fine fax mode).200x200 DPI - If the Fax Output check box is selected the resolution is 200x200 dpi

internally, but the image is stored as 204x196 dpi. This feature is useful when printing from an application that can’t print correctly when the horizontal and vertical resolution values are different. Selecting this setting will print the page correctly and the image can still be faxed.

300 x 300 DPI - Medium resolution. 600 x 600 DPI - High resolution. 1500x1500 DPI - The custom resolution can be set manually up to 1500 DPI in the

“Horizontal Resolution” and “Vertical Resolution” fields. The “Horizontal” and “Vertical” resolution fields are grayed out until you select “CUSTOM Resolution max(1500x1500)”. Warning: When using settings over 600 DPI one should consider memory usage.

The Driver also supports variable dot per inch (DPI) graphic resolution that can range from 50 DPI to 1500 DPI.

Please Note:For faxing, when selecting resolution, remember that increased resolution slows down transmission speed, while lower resolutions increase throughput at the cost of image quality.

Horizontal Resolution

246292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 251: printer

Shows the horizontal resolution setting. Also, when Custom resolution is selected, the required value can be entered.

Vertical ResolutionShows the vertical resolution setting. Also, when Custom resolution is selected the required value can be entered.

Generated Image SizeDisplays the uncompressed image size in megabytes based on the current paper size, resolution and color depth.

247292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 252: printer

File Formats sheet for Win95/98and ME

Specifying the File FormatClick on the File Format list box to select the output image file type for the driver. Click on the down arrow to scroll through the available selections.

The current selections are:

TIFF Group 3 1D TIFF Group 3 1D No EOL

248292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 253: printer

TIFF Group 3 2D TIFF Group 4 TIFF Packed TIFF LZW TIFF Uncompressed PCX Image Format Intel DCX Image Format Microsoft DIB (BMP) CALS RAW CCITT TIFF Group 3 1D RAW CCITT TIFF Group 3 1D No EOL RAW CCITT TIFF Group 3 2D RAW CCITT TIFF Group 4 IBM MRR

OptionsCreate a multi page imageWhen this button is checked the driver will save every printed page in one image file. If it is unchecked all the pages printed will be generated in separate files. NOTE: This option is only supported by the TIFF (any type of TIFF) and DCX file formats.

Disable imageCheck this option to disable the image file generation setting of the driver. This can be useful when the ‘Write text file’ radio button is checked for text output and the image file is not needed. As a result, the driver will only generate a text file, no image files will be generated.

Eastern Character Support When this option is checked, the driver will interpret the contents of strings printed using the TextOut function as two-byte glyph indexes. This is necessary to correctly print characters of most non-US (Chinese, Japanese, etc.) versions of Windows 95/98/ME. In this case, the characters printed are not valid one-byte ASCII values. The driver cannot save text files of any kind, therefore the Write text file, Position and Style Info, and Mail Merge options will be disabled.

Write Text FileWhen this option is checked, the driver will generate an ASCII text output along with the image file. The file will have the default .txt extension. If you want to change the extension, please refer to the Filename Extension section under the Filename Generation sheet.

249292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 254: printer

The text file will also contain page delimiter information to mark where the new page is started. The page delimiter is an empty line, the ‘Page 1:’ text (where the number is the current page number) and another empty line :

Page 1:

Text on page 1

Page 2:

Text on page 2

Page 3:

Text on page 3

Mail MergeWhen this checkbox is checked, the driver will recognize special character sequences in the printed text to extract some of the information in a text file or to force the driver to start generating a new image file.This feature is useful when generating multi-page TIFF files from a large document using a custom printing application.The recognized character sequences all start with two ‘#’ characters. Most of these ‘commands’ will cause the driver to remove or alter the printed text and write it in the merged output file in text format. This file will have the same filename as the group file, with the MRG extension. The actual name of this file will be written in the group file in the following format:Merge Output=c:\aaaa1000.mrg

The recognized command sequences are as follows:

##~~ Lines starting with these four characters and ending with “~~” will not be printed, but written to the merged output file. For example, if the following string is sent to the driver: ##~~ Phone number=6031234321~~there will be an empty line printed in the output image file and the following line will be added to the merged output file:Phone number=6031234321 .

##** Lines starting with these four characters and ending with “**” will be partially printed and also written to the merged output file. If the string enclosed by the “**” marks contains an equation mark, the characters after the equation mark will be printed. Otherwise the whole string between the asterisks will be printed.

250292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 255: printer

Every character between the asterisks will be written to the merged output file.For example, if the following string is printed with the driver:##** Adressee=Company Name**the following will be written to the merged output file:Adressee=Company Nameand the following line will be printed to the output image file:Company Name

All of the above command lines must be printed as one continuous string from left to right. If they are printed one part at a time using several separate printing function calls, ( first printing “##~~” and then the rest of the line ) the driver may not be able to correctly recognize them.

The mail merge file will also contain page delimiter information to mark where the new page is started. The page delimiter is an empty line, the ‘Page 1:’ text (where the number is the current page number) and another empty line :

Page 1:

Page 2:

Page 3:

This information will appear in the Mail Merge file even is there is no mail merge information in that particular the page.

Save Position and style info Checking this button will cause the driver to save additional formatting information in the text file. The text output is stored in the “[[X,Y][P][B,U,I]] text” format. The format starts with double brackets and ends with double brackets. The brackets can be used to parse the file. The format information has the following meaning:

X = The horizontal text coordinate.Y = The vertical text coordinate.P = The font size in points. B = The font in the text is bold.U = The font in the text is underlined.I = The font in the text is italic.

TIFF OptionsAll of the following settings are only available for TIFF files.

251292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 256: printer

Internet TIFF formatIf TIFF file format is selected as the output image format and this box is checked, the driver will create a TIFF file that is compatible with the requirements listed in chapter 3 of RFC 2301 (File Format for Internet Fax ). (Not a chapter in this manual.) That chapter lists the required tags for black-and-white faxes. The extra tag the driver will include in the tiff file if this flag is checked is NEWSUBFILETYPE.

Reverse bit order in TIFFThis setting only has an effect on TIFF images.If this box is checked, the driver will save TIFF images with reverse bit order and also set the value of the FILLORDER tag in the image file to Reverse.GammaLink compatible TIFF output requires this setting to be checked, because they can only send TIFF images with reverse bit order.

Add Page Numbering TagThis setting only has an effect on TIFF images.If this box is checked, the driver will set the page number tag of every page in the output TIFF file.

Photo QualityThe Photo Quality option enables or disables the dithering of the Black Ice driver. When Photo Quality is enabled, five high quality filters become accessible. Digital half-toning, also referred to as spatial dithering, produces the illusion of continuous-tone pictures on media that is only capable of displaying binary picture elements, for example: fax machines and most printers. Floyd-Steinberg and Jarvis-Judice-Ninke are the text book filters. The Smooth, Sharp, and Stucki filters are less known, but produce better quality output. Floyd-Steinberg is the default setting.

IntensityThe photo quality program group also contains a scroll bar that lets you control the intensity of the output image. The lower the Intensity value is, the darker the output image will be.

When should Photo Quality Output be used?

Photo Quality output is designed primarily for faxing or to transmit color pictures on a monochrome device. When a color picture is faxed from a conventional desktop fax machine, the result is unrecognizable in most cases. On computer-generated faxes, the output quality can be increased to picture quality using the Black Ice printer driver.

How is performance affected by the Photo Quality output?

252292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 257: printer

The fastest filter is the Floyd-Steinberg, because it requires the least computation. Stucki is the slowest filter, but has the highest quality. The Stucki filter produces the best visible output.

253292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 258: printer

Filename Generation sheet

254292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 259: printer

Name Generation Methods Select how you want the filename to be generated from the options in the combo box. The following options are available:

Use the prefix and extension Prefix and extension from the registry Prefix and extension from the INI file Exact filename Exact filename from the registry Exact filename from the INI file Use the document name

22. Use the prefix and extension: the output filename will be generated from random characters. The first three characters will be the characters specified in the ‘Filename Prefix’ edit box and random numbers will be added. NOTE: Only the first 3 characters from the ‘Filename Prefix’ field will be used, if it is longer the string will be truncated.

23. Prefix and extension from the registry: The file name prefix and the extension will be read from the specified registry key. The registry path must be under the HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER root key. Use the “File Name Prefix” value name for the file prefix and the “File Name extension” value name for the extension.

255292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 260: printer

24. Prefix and extension from the INI file: In this case the filename and the prefix will be read from the specified INI file. The driver will search in the INI file for a section width the printer name. Use the “File Name Prefix” key for the file prefix and the “File Name extension” key for the extension. You can search for an existing INI file, create a new one or edit the selected file using the browse […] and edit [Edit] buttons.

[Black Ice Color Printer]File name prefix=ABCFile name extension=TIFF

25. Exact filename: The printed file will be generated with the same name specified in the ‘Enter the filename’ edit box.

26. Exact filename from the registry: The filename will be read from the specified registry key. The registry path must be under the HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER root key. The value name containing the filename must be "File Name". The file name can be specified with the path or without.

256292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 261: printer

27. Exact filename from the INI file: In this case the filename will be read from the specified INI file. The driver will search the INI file for a section with the printer’s name. Use the “File Name” key for the Filename. The file name can be specified with the path or without.

[Black Ice Color Printer]File name =C:\Output\page.tiff

28. Use the document name: The driver will use the document name the application passes to the driver when generating the name of the output image.

FilenameEnter the INI file name here, the registry path, or the file name depending on the selected file name generation method.

Filename PrefixThis is the prefix for the generated files if the “Use this prefix and extension ” setting is selected for the filename generation method. If the prefix is longer than 3 characters it will be truncated to the first 3 characters.

Filename ExtensionThis shows the current extension of the files. If the ‘Use custom extension’ setting is selected the default extension is changed with the string entered here.

Use custom extensionEnable/disable the custom file extension. If this is checked, the files will be generated with the extension entered in the ‘Filename Extension’ field. If it is unchecked, the default extension for the selected file format will be used.

Keep existing filesWhen the “Fixed filename” or “Use document name” methods are selected for filename generation, the files that exist in the output directory will be overwritten. Check this option to keep the files, so the new images will be added to the file. As a result, multi-page images will be created.

Output directoryIn this edit box you can specify the path where the driver will save the generated image files.The printer driver can handle long directory names like C:\My Documents\Printed Files\

257292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 262: printer

Group File OptionsSettings referring to how the group files are handled. Check the Group File Options section for more details about the Group Files.

Disable Group FileIf this option is set, the driver will not generate group files.

Delete group file after printingIf this box is checked, the driver will automatically delete the group file when printing is finished. If the “Start Application” is checked, the printer driver will wait for the application to start and the started application message loop is ready to process messages. Once the application is started the driver will delete the group file.

258292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 263: printer

Start Application sheet

Enable Start ApplicationOn the Start Application tab, you can specify if the driver should launch an application when the user prints a document. The application can capture the printer messages or can manipulate the generated image files. Please refer to the Messaging Interface, Programming Interface and Group Files Description section in this manual for more detail.

Check the “Enable start application’” check box to enable the driver to launch an application or uncheck it to disable the application launching. If the specified application is already running, the printer driver will not start it again.

259292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 264: printer

ApplicationThe name of the application to be started. You must specify a valid application name and the full pathname (location of the application exe) (for example: e:\fax\test.exe). The printer driver can handle long file and directory names.

Start Before PrintingSelect this option to start the specified application before the printer driver starts printing. In this case the application will be able to capture and process the printer messages. Please refer to the Messaging Interface section in this manual for more detail.

Start After PrintingSelect this option to start your application after the printer driver finishes printing. This is the best solution when the application must manipulate the files that were created. For example: copying and processing, etc. Information about the generated files is saved by the driver in the group file. Please refer to the Group Files Description and the Programming Interface section in this manual for more detail.

Pass ParametersIf this is option is checked, the driver will pass parameters to the application that is started. Please refer to the Programming Interface section in this manual for more detail.

Show Application WindowDetermines how the application will be started. The available selections are:

Normal Minimized Hidden

Disable Messaging InterfaceChecking this option will stop the driver from broadcasting messages. Please refer to the Messaging Interface section in this manual for more detail.

260292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 265: printer

Win95/98 and ME Color DriverDriver FilesThe following files are needed in order for the driver to operate:- Windows\System\bi_color.drv: This is the driver file itself. It has to reside in the directory

returned by the GetPrinterDriverDirectory() API call, which is usually in the windows\system directory.

- Windows\System\cdrvres.dll: The driver loads the resources from this DLL. It must be in the same directory where the driver file is.

- Windows\System\tiff.dll: This DLL is used by the driver for TIFF file I/O. It has to be in the same directory where the driver file is.

- Windows\System\jpeg.dll: This DLL is used by the driver for TIFF file I/O. It has to be in the same directory where the driver file is.

Configuring the Driver on Windows 95/98 and MEClicking with the right mouse button on the ‘Black Ice Color’ printer and selecting Properties will bring up the printer’s main setup dialog. The following sheets of the property dialog box (Device Setting, File Formats, Filename generation, and Start Application) contain the driver specific settings. The Details tab contains port specific settings.

261292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 266: printer

Device Settings sheet

Paper WidthPaper width is shown in the selected unit type of 0.01 inch, 0.1 mm, or a pixel.

262292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 267: printer

Paper HeightPaper height is shown in the selected unit type of 0.01 inch, 0.1 mm, or a pixel.

UnitsThe units are the type of measurement used to describe the paper width and height. The units can be 0.01 inch, 0.1 mm (mm = millimeter), or a pixel.

Specifying the Paper SizeTo change the paper size, select the Paper size list box. The page sizes range from envelopes to large E size pages. Also, included is a user-definable variable page size. The page size can be specified in increments of 0.01 inch, 0.1 mm, or a pixel. There are 45 Standard paper sizes, 36 Advanced paper sizes, as well as 3 Black Ice Software specific paper sizes such as FAX paper size, VARIABLE paper size and VARIABLE paper size specified in pixels. - The “VARIABLE paper size” is specified by 0.01 inch or 0.1 mm. The formula to

compute between mm and pixels is mm = pixel x 254/DPI or pixel = mm x DPI/254. - The “VARIABLE paper size specified in pixels” can be any size in the boundary of the

Microsoft environment with a maximum width and height of 65535 x 65535 pixels. The DPI information will be ignored.

Please Note:

The “VARIABLE paper size specified in pixels” is a special case. Normally, page size times DPI is equal to the image size in pixels. With the “VARIABLE paper size specified in pixels” setting, the image size in pixels is absolute and the DPI can be set arbitrarily. The “VARIABLE paper size specified in pixels” setting can be very useful in web and graphic applications where the physical size of the image is the preeminent factor.

Page Sizes SupportedThe following page sizes are supported by the driver:

- Letter 8 1/2 x 11 in- Tabloid 11 x 17 in- Ledger 17 x 11 in- Legal 8 1/2 x 14 in- Statement 5 1/2 x 8 1/2 in- Executive 7 1/4 x 10 1/2 in- A3 297 x 420 mm- A4 210 x 297 mm- A4 Small 210 x 297 mm

263292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 268: printer

- A5 148 x 210 mm- B4 250 x 354- B5 182 x 257 mm- Folio 8 1/2 x 13 in- Quarto 215 x 275 mm- 10x14 in- 11x17 in- Note 8 1/2 x 11 in- Envelope #9 3 7/8 x 8 7/8- Envelope #10 4 1/8 x 9 ½- Envelope #11 4 1/2 x 10 3/8- Envelope #12 4 \276 x 11- Envelope #14 5 x 11 ½- C size sheet- D size sheet- E size sheet- Envelope DL 110 x 220mm- Envelope C5 162 x 229 mm- Envelope C3 324 x 458 mm- Envelope C4 229 x 324 mm- Envelope C6 114 x 162 mm- Envelope C65 114 x 229 mm- Envelope B4 250 x 353 mm- Envelope B5 176 x 250 mm- Envelope B6 176 x 125 mm- Envelope 110 x 230 mm- Envelope Monarch 3.875 x 7.5 in- 6 3/4 Envelope 3 5/8 x 6 1/2 in- US Std Fanfold 14 7/8 x 11 in- German Std Fanfold 8 1/2 x 12 in- German Legal Fanfold 8 1/2 x 13 in- Fax paper 8.64 x 11 in or 215 mm

If the ‘Create faxable image’ box is checked, only Fax and Legal paper sizes will be available. As a result, saved images can be faxed.

Add Fax HeaderThe value entered in the edit box will reduce the standard page height by the specified number of pixels. This option can be used to attach private page header information on the top of each page. For example, if the page height is 2200 pixels and the fax header field is set to 100, the generated image height will be 2100 pixels.

264292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 269: printer

Create a Faxable ImageThis check box can be used to set the driver to automatically create images that have fax paper size and resolution. The paper sizes and graphic resolutions are not restricted, but the end result image file will have a fax-able page size and fax-compatible resolution. For example, if the page is Letter paper size and 600 DPI, the generated file width will be 1728 pixels.

Force FAX ResolutionIf the ‘Create Faxable image’ check is selected the driver to automatically create images that have fax paper size and resolution. The user can select the final resolution of the faxable image between 204x98 DPI (Standard Fax Resolution) and 204x196 DPI (Fine Fax Resolution).

What is Fax Paper Size? Many people confuse the US Letter or European A4 paper sizes with fax paper size. According to the ITU T.30 standard, the Fax page width is 215 mm or 1728 pixels, which is slightly different than the US Letter or A4 paper size. There are additional fax paper sizes such as 255 mm and 303 mm; however they are in not in use or there are very limited devices supporting them. If the 255mm or 303 mm paper size is needed, please use the “VARIABLE paper size” setting.

How is Page size computed and image size translated into pixels?Every page is defined in either millimeters or inches. The Microsoft DEVMODE data structure uses millimeters as the base for computation. The formula to compute between mm and pixels is mm = pixel x 254/DPI or pixel = mm x DPI/254.

Advanced Paper sizeEnable/Disable the advanced paper size listing in the “Paper” combo box. There are 35 paper sizes that are not commonly used. There are special circumstances where these paper sizes are useful. For example: Architects for drawing or International such as Japanese envelope size.

Specifying Page OrientationThe default page orientation (Portrait or Landscape) can be set on this sheet as well. The page orientation set here will be used for fax transmissions.If Landscape orientation is selected the driver will report landscape paper orientation to the printing application, but the image on the page will be rotated 90 degrees so that the actual saved image will still be in portrait orientation just like when you print in landscape mode. This makes it possible to fax a page printed in landscape orientation.

Rotate a Landscape Image to Portrait

265292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 270: printer

When landscape mode is selected this will rotate the generated landscape image 90 degrees so it can be printed. Also, this option is selected automatically when the “Create Faxable Image” setting is checked.

Specifying Graphic ResolutionDefault resolution (typically measured in dots per inch, or DPI), for printing graphic images.Available resolutions are listed in the Graphics Resolution window. These modes are as follows:

204 x 98 DPI - Draft resolution (standard fax mode).204 x 196 DPI - Low resolution (fine fax mode).200x200 DPI - If the Fax Output check box is selected the resolution is 200x200 dpi

internally, but the image is stored as 204x196 dpi. This feature is useful when printing from an application that can’t print correctly when the horizontal and vertical resolution values are different. Selecting this setting will print the page correctly and the image can still be faxed.

300 x 300 DPI - Medium resolution. 600 x 600 DPI - High resolution. 1500x1500 DPI - The custom resolution can be set manually up to 1500 DPI in the

“Horizontal Resolution” and “Vertical Resolution” fields. The “Horizontal” and “Vertical” resolution fields are grayed out until you select “CUSTOM Resolution max(1500x1500)”. Warning: When using settings over 600 DPI one should consider memory usage.

The Driver also supports variable dot per inch (DPI) graphic resolution that can range from 50 DPI to 1500 DPI.

Please Note:For faxing, when selecting resolution, remember that increased resolution slows down transmission speed, while lower resolutions increase throughput at the cost of image quality.

Horizontal Resolution

266292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 271: printer

Shows the horizontal resolution setting. Also, when Custom resolution is selected, the required value can be entered.

Vertical ResolutionShows the vertical resolution setting. Also, when Custom resolution is selected the required value can be entered.

Generated Image SizeDisplays the uncompressed image size in megabytes based on the current paper size, resolution and color depth.

267292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 272: printer

File Formats sheet

Specifying the File FormatClick on the File Format list box to select the output image file type for the driver. Click on the down arrow to scroll through the available selections.

The current selections are:

268292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 273: printer

JPEG JPEG L*a*b Microsoft DIB (BMP) TIFF Uncompressed TIFF Group 3 1D TIFF Group 3 1D No EOL TIFF Group 3 2D TIFF Group 4 TIFF Packed TIFF LZW TIFF JPEG TIFF Group 3 1D PCX Image Format Intel DCX Image Format CALS RAW CCITT TIFF Group 3 1D RAW CCITT TIFF Group 3 1D No EOL RAW CCITT TIFF Group 3 2D RAW CCITT TIFF Group 4 Extended Metafile IBM MRR

JPEG Loss RatioThe quality of the JPEG file that is generated. This is only used for JPEG and JPEG Lab type files. A higher value equals higher quality; however the file size will be larger. Conversely, a lower value equals lower quality, but the file size will be smaller.

Color DepthThe color depth setting for the generated image. The value can be 1 bit, 8 bits, 8 bits grayscale and 24 bits.

The file types shown in the File Format combo box depends on this value. The user can only select from file types compatible with the current color depth setting. For example: if 1 bit is selected, the JPEG file type will not be shown.

Options

Create a multi page imageWhen this button is checked the driver will save every printed page in one image file. If it is unchecked all the pages printed will be generated in separate files. NOTE: This option is only supported by the TIFF (any type of TIFF) and DCX file formats.

269292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 274: printer

Disable imageCheck this option to disable the image file generation setting of the driver. This can be useful when the ‘Write text file’ is checked for text output and the image file is not needed. As a result, the driver will only generate a text file, no image files will be generated.

Eastern Character Support When this option is checked, the driver will interpret the contents of strings printed using the TextOut function as two-byte glyph indexes. This is necessary to correctly print characters of most non-US (Chinese, Japanese, etc.) versions of Windows 95. In this case, the characters printed are not valid one-byte ASCII values. The driver cannot save text files of any kind, therefore the Write text file, Position and Style Info, and Mail Merge options will be disabled.

Write Text FileWhen this option is checked, the driver will generate an ASCII text output along with the image file. The file will have the default .txt extension. If you want to change the extension, please refer to the Filename Extension section under the Filename Generation sheet.

The text file will also contain page delimiter information to mark where the new page is started. The page delimiter is an empty line, the ‘Page 1:’ text (where the number is the current page number) and another empty line :

Page 1:

Text on page 1.

Page 2:

Text on page 2:

Page 3:

Text on page 3:

Mail MergeWhen this checkbox is checked, the driver will recognize special character sequences in the printed text to extract some of the information in a text file or to force the driver to start generating a new image file. This feature is useful when generating multi-page TIFF files from a large document using a custom printing application.

270292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 275: printer

The recognized character sequences all start with two ‘#’ characters. Most of these ‘commands’ will cause the driver to remove or alter the printed text and write it in the merged output file in text format. This file will have the same filename as the group file, with the MRG extension. The actual name of this file will be written in the group file in the following format:Merge Output=c:\aaaa1000.mrg

The recognized command sequences are as follows:

##~~ Lines starting with these four characters and ending with “~~” will not be printed, but written to the merged output file. For example, if the following string is sent to the driver: ##~~ Phone number=6031234321~~there will be an empty line printed in the output image file and the following line will be added to the merged output file:Phone number=6031234321 .

##** Lines starting with these four characters and ending with “**” will be partially printed and also written to the merged output file. If the string enclosed by the “**” marks contains an equation mark, the characters after the equation mark will be printed. Otherwise the whole string between the asterisks will be printed.Every character between the asterisks will be written to the merged output file.For example, if the following string is printed with the driver:##** Adressee=Company Name**the following will be written to the merged output file:Adressee=Company Nameand the following line will be printed to the output image file:Company Name

All of the above command lines must be printed as one continuous string from left to right. If they are printed one part at a time using several separate printing function calls, ( first printing “##~~” and then the rest of the line ) the driver may not be able to correctly recognize them.

The mail merge file will also contain page delimiter information to mark where the new page is started. The page delimiter is an empty line, the ‘Page 1:’ text (where the number is the current page number) and another empty line :

Page 1:

Page 2:

Page 3:

271292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 276: printer

This information will appear in the Mail Merge file even is there is no mail merge information in that particular the page.

Save Position and style info Checking this button will cause the driver to save additional formatting information in the text file. The text output is stored in the “[[X,Y][P][B,U,I]] text” format. The format starts with double brackets and ends with double brackets. The brackets can be used to parse the file. The format information has the following meaning:

X = The horizontal text coordinate.Y = The vertical text coordinate.P = The font size in points. B = The font in the text is bold.U = The font in the text is underlined.I = The font in the text is italic.

TIFF OptionsAll of the following settings are only available for TIFF files.

Internet TIFF formatIf TIFF file format is selected as the output image format and this box is checked, the driver will create a TIFF file that is compatible with the requirements listed in chapter 3 of RFC 2301 (File Format for Internet Fax ). (Not a chapter in this manual.) That chapter lists the required tags for black-and-white faxes. The extra tag the driver will include in the tiff file if this flag is checked is NEWSUBFILETYPE.

Reverse bit order in TIFFThis setting only has an effect on TIFF images.If this box is checked, the driver will save TIFF images with reverse bit order and also set the value of the FILLORDER tag in the image file to Reverse.GammaLink compatible TIFF output requires this setting to be checked, because they can only send TIFF images with reverse bit order.

Add Page Numbering TagThis setting only has an effect on TIFF images.If this box is checked, the driver will set the page number tag of every page in the output TIFF file.

272292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 277: printer

Photo QualityThe Photo Quality option enables or disables the dithering of the Black Ice driver. When Photo Quality is enabled, five high quality filters become accessible. Digital half-toning, also referred to as spatial dithering, produces the illusion of continuous-tone pictures on media that is only capable of displaying binary picture elements, for example: fax machines and most printers. Floyd-Steinberg and Jarvis-Judice-Ninke are the text book filters. The Smooth, Sharp, and Stucki filters are less known, but produce better quality output. Floyd-Steinberg is the default setting.

IntesityThe photo quality program group also contains a scroll bar that lets you control the intensity of the output image. The lower the Intensity value is, the darker the output image will be.

When should Photo Quality Output be used?Photo Quality output is designed primarily for faxing or to transmit color pictures on a monochrome device. When a color picture is faxed from a conventional desktop fax machine, the result is unrecognizable in most cases. On computer-generated faxes, the output quality can be increased to picture quality using the Black Ice printer driver.

How is performance affected by the Photo Quality output?The fastest filter is the Floyd-Steinberg, because it requires the least computation. Stucki is the slowest filter, but has the highest quality. The Stucki filter produces the best visible output.

273292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 278: printer

Filename Generation sheet

274292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 279: printer

Name Generation Method Select how you want the filename to be generated from the options in the combo box. The following options are available:

Use this prefix and extension Prefix and extension from the registry Prefix and extension from the INI file Exact filename Exact filename from the registry Exact filename from the INI file Use the document name

29. Use this prefix and extension: the output filename will be generated from random characters. The first three characters will be the characters specified in the ‘Filename Prefix’ edit box and random numbers will be added. NOTE: Only the first 3 characters from the ‘Filename Prefix’ field will be used, if it is longer the string will be truncated.

30. Prefix and extension from the registry: The file name prefix and the extension will be read from the specified registry key. The registry path must be under the HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER root key. Use the “File Name Prefix” value name for the file prefix and the “File Name extension” value name for the extension.

275292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 280: printer

31. Prefix and extension from the INI file: In this case the filename and the prefix will be read from the specified INI file. The driver will search in the INI file for a section width the printer name. Use the “File Name Prefix” key for the file prefix and the “File Name extension” key for the extension. You can search for an existing INI file, create a new one or edit the selected file using the browse […] and edit [Edit] buttons.

[Black Ice Color Printer]File name prefix=ABCFile name extension=TIFF

32. Exact filename: The printed file will be generated with the same name specified in the ‘Enter the filename’ edit box.

33. Exact filename from the registry: The filename will be read from the specified registry key. The registry path must be under the HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER root key. The value name containing the filename must be "File Name". The file name can be specified with the path or without.

276292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 281: printer

34. Exact filename from the INI file: In this case the filename will be read from the specified INI file. The driver will search the INI file for a section with the printer’s name. Use the “File Name” key for the Filename. The file name can be specified with the path or without.

[Black Ice Color Printer]File name =C:\Output\page.tiff

35. Use the document name: The driver will use the document name the application passes to the driver when generating the name of the output image.

FilenameEnter the INI file name here, the registry path, or the file name depending on the selected file name generation method.

Filename PrefixThis is the prefix for the generated files if the “Use this prefix and extension ” setting is selected for the filename generation method. If the prefix is longer than 3 characters it will be truncated to the first 3 characters.

Filename ExtensionThis shows the current extension of the files. If the ‘Use custom extension’ setting is selected the default extension is changed with the string entered here.

Use custom extensionEnable/disable the custom file extension. If this is checked, the files will be generated with the extension entered in the ‘Filename Extension’ field. If it is unchecked, the default extension for the selected file format will be used.

Keep existing filesWhen the “Fixed filename” or “Use document name” methods are selected for filename generation, the files that exist in the output directory will be overwritten. Check this option to keep the files, so the new images will be added to the file. As a result, multi-page images will be created.

Output directoryIn this edit box you can specify the path where the driver will save the generated image files.The printer driver can handle long directory names like C:\My Documents\Printed Files\

277292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 282: printer

Group File OptionsSettings referring to how the group files are handled. Check the Group File Options section for more details about the Group Files.

Disable Group FileIf this option is set, the driver will not generate the group files.

Delete group file after printingIf this box is checked, the driver will automatically delete the group file when printing is finished. If the “Start Application” is checked, the printer driver will wait for the application to start and will then delete the group file.

278292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 283: printer

Start Application sheet

Enable Start ApplicationOn the Start Application tab, you can specify if the driver should launch an application when the user prints a document. The application can capture the printer messages or can manipulate the generated image files. Please refer to the Messaging Interface, Programming Interface and Group Files Description section in this manual for more detail.

279292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 284: printer

Check the “Enable start application’” check box to enable the driver to launch an application or uncheck it to disable the application launching. If the specified application is already running, the printer driver will not start it again.

ApplicationThe name of the application to be started. You must specify a valid application name and the full pathname (location of the application exe) (for example: e:\fax\test.exe). The printer driver can handle long file and directory names.

Start Before PrintingSelect this option to start the specified application before the printer driver starts printing. In this case the application will be able to capture and process the printer messages. Please refer to the Messaging Interface section in this manual for more detail.

Start After PrintingSelect this option to start your application after the printer driver finishes printing. This is the best solution when the application must manipulate the files that were created. For example: copying and processing, etc. Information about the generated files is saved by the driver in the group file. Please refer to the Group Files Description and the Programming Interface section in this manual for more detail.

Pass ParametersIf this is option is checked, the driver will pass parameters to the application that is started. Please refer to the Programming Interface section in this manual for more detail.

Show Application WindowDetermines how the application will be started. The available selections are:

Normal Minimized Hidden

Disable Messaging InterfaceChecking this option will stop the driver from broadcasting messages. Please refer to the Messaging Interface section in this manual for more detail.

280292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 285: printer

Win95/98 and ME Metafile DriverDriver FilesThe following files are needed in order for the driver to operate:- Windows\System\metafile.drv: This is the driver file itself. It must reside in the directory

returned by the GetPrinterDriverDirectory() API call, which is usually in the windows\system directory.

Configuring the Driver on Windows 95/98 and MEClicking with the right mouse button on the ‘Black Ice Color’ printer and selecting Properties will bring up the printer’s main setup dialog. The following sheets of the property dialog box (Device Setting, Filename generation, and Start Application) contain the driver specific settings. The Details tab contains port specific settings.

281292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 286: printer

Device Settings sheet

Paper WidthPaper width is shown in the selected unit type of 0.01 inch, 0.1 mm, or a pixel.

282292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 287: printer

Paper HeightPaper height is shown in the selected unit type of 0.01 inch, 0.1 mm, or a pixel.

UnitsThe units are the type of measurement used to describe the paper width and height. The units can be 0.01 inch, 0.1 mm (mm = millimeter), or a pixel.

Specifying the Paper SizeTo change the paper size, select the Paper size list box. The page sizes range from envelopes to large E size pages. Also, included is a user-definable variable page size. The page size can be specified in increments of 0.01 inch, 0.1 mm, or a pixel. There are 45 Standard paper sizes, 36 Advanced paper sizes, as well as 3 Black Ice Software specific paper sizes such as FAX paper size, VARIABLE paper size and VARIABLE paper size specified in pixels. - The “VARIABLE paper size” is specified by 0.01 inch or 0.1 mm. The formula to

compute between mm and pixels is mm = pixel x 254/DPI or pixel = mm x DPI/254. - The “VARIABLE paper size specified in pixels” can be any size in the boundary of the

Microsoft environment with a maximum width and height of 65535 x 65535 pixels. The DPI information will be ignored.

Please Note:

The “VARIABLE paper size specified in pixels” is a special case. Normally, page size times DPI is equal to the image size in pixels. With the “VARIABLE paper size specified in pixels” setting, the image size in pixels is absolute and the DPI can be set arbitrarily. The “VARIABLE paper size specified in pixels” setting can be very useful in web and graphic applications where the physical size of the image is the preeminent factor.

Page Sizes SupportedThe following page sizes are supported by the driver:

- Letter 8 1/2 x 11 in- Tabloid 11 x 17 in- Ledger 17 x 11 in- Legal 8 1/2 x 14 in- Statement 5 1/2 x 8 1/2 in- Executive 7 1/4 x 10 1/2 in- A3 297 x 420 mm- A4 210 x 297 mm- A4 Small 210 x 297 mm- A5 148 x 210 mm

283292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 288: printer

- B4 250 x 354- B5 182 x 257 mm- Folio 8 1/2 x 13 in- Quarto 215 x 275 mm- 10x14 in- 11x17 in- Note 8 1/2 x 11 in- Envelope #9 3 7/8 x 8 7/8- Envelope #10 4 1/8 x 9 ½- Envelope #11 4 1/2 x 10 3/8- Envelope #12 4 \276 x 11- Envelope #14 5 x 11 ½- C size sheet- D size sheet- E size sheet- Envelope DL 110 x 220mm- Envelope C5 162 x 229 mm- Envelope C3 324 x 458 mm- Envelope C4 229 x 324 mm- Envelope C6 114 x 162 mm- Envelope C65 114 x 229 mm- Envelope B4 250 x 353 mm- Envelope B5 176 x 250 mm- Envelope B6 176 x 125 mm- Envelope 110 x 230 mm- Envelope Monarch 3.875 x 7.5 in- 6 3/4 Envelope 3 5/8 x 6 1/2 in- US Std Fanfold 14 7/8 x 11 in- German Std Fanfold 8 1/2 x 12 in- German Legal Fanfold 8 1/2 x 13 in- Fax paper 8.64 x 11 in or 215 mm

If the ‘Create faxable image’ box is checked, only Fax and Legal paper sizes will be available. As a result, saved images can be faxed.

Add Fax HeaderThe value entered in the edit box will reduce the standard page height by the specified number of pixels. This option can be used to attach private page header information on the top of each page. For example, if the page height is 2200 pixels and the fax header field is set to 100, the generated image height will be 2100 pixels.

Create a Faxable ImageNot available in the EMF printer driver.

284292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 289: printer

Force FAX ResolutionNot available in the EMF printer driver.

What is Fax Paper Size? Many people confuse the US Letter or European A4 paper sizes with fax paper size. According to the ITU T.30 standard, the Fax page width is 215 mm or 1728 pixels, which is slightly different than the US Letter or A4 paper size. There are additional fax paper sizes such as 255 mm and 303 mm; however they are in not in use or there are very limited devices supporting them. If the 255mm or 303 mm paper size is needed, please use the “VARIABLE paper size” setting.

How is Page size computed and image size translated into pixels? Every page is defined in either millimeters or inches. The Microsoft DEVMODE data structure uses millimeters as the base for computation. The formula to compute between mm and pixels is mm = pixel x 254/DPI or pixel = mm x DPI/254.

Advanced Paper sizeEnable/Disable the advanced paper size listing in the “Paper” combo box. There are 35 paper sizes that are not commonly used. There are special circumstances where these paper sizes are useful. For example: Architects for drawing or International such as Japanese envelope size.

Specifying Page Orientation.The default page orientation (Portrait or Landscape) can be set on this sheet as well. The page orientation set here will be used for fax transmissions.If Landscape orientation is selected the driver will report landscape paper orientation to the printing application, but the image on the page will be rotated 90 degrees so that the actual saved image will still be in portrait orientation just like when you print in landscape mode. This makes it possible to fax a page printed in landscape orientation.

Rotate a Landscape Image to PortraitWhen landscape mode is selected this will rotate the generated landscape image 90 degrees so it can be printed. Also, this option is selected automatically when the “Create Faxable Image” setting is checked.

Specifying Graphic ResolutionDefault resolution (typically measured in dots per inch, or DPI), for printing graphic images.

285292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 290: printer

Available resolutions are listed in the Graphics Resolution window. These modes are as follows:

204 x 98 DPI - Draft resolution (standard fax mode).204 x 196 DPI - Low resolution (fine fax mode).200x200 DPI - If the Fax Output check box is selected the resolution is 200x200 dpi

internally, but the image is stored as 204x196 dpi. This feature is useful when printing from an application that can’t print correctly when the horizontal and vertical resolution values are different. Selecting this setting will print the page correctly and the image can still be faxed.

300 x 300 DPI - Medium resolution. 600 x 600 DPI - High resolution. 1500x1500 DPI - The custom resolution can be set manually up to 1500 DPI in the

“Horizontal Resolution” and “Vertical Resolution” fields. The “Horizontal” and “Vertical” resolution fields are grayed out until you select “CUSTOM Resolution max(1500x1500)”. Warning: When using settings over 600 DPI one should consider memory usage.

The Driver also supports variable dot per inch (DPI) graphic resolution that can range from 50 DPI to 1500 DPI.

Please Note:For faxing, when selecting resolution, remember that increased resolution slows down transmission speed, while lower resolutions increase throughput at the cost of image quality.

Horizontal ResolutionShows the horizontal resolution setting. Also, when Custom resolution is selected, the required value can be entered.

Vertical ResolutionShows the vertical resolution setting. Also, when Custom resolution is selected the required value can be entered.

286292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 291: printer

Generated Image SizeDisplays the uncompressed image size in megabytes based on the current paper size, resolution and color depth.

287292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 292: printer

File Formats sheet

Specifying the File FormatThe only file formats available are EMF and Text output.

Options

288292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 293: printer

Disable imageCheck this option to disable the image file generation setting of the driver. This can be useful when the ‘Write text file’ radio button is checked for text output and the image file is not needed. As a result, the driver will only generate a text file, no image files will be generated.

Eastern Character Support When this option is checked, the driver will interpret the contents of strings printed using the TextOut function as two-byte glyph indexes. This is necessary to correctly print characters of most non-US (Chinese, Japanese, etc.) versions of Windows 95/98/ME. In this case, the characters printed are not valid one-byte ASCII values. The driver cannot save text files of any kind, therefore the Write text file, Position and Style Info, and Mail Merge options will be disabled.

Write Text FileWhen this option is checked, the driver will generate an ASCII text output along with the image file. The file will have the default .txt extension. If you want to change the extension, please refer to the Filename Extension section under the Filename Generation sheet.

The text file will also contain page delimiter information to mark where the new page is started. The page delimiter is an empty line, the ‘Page 1:’ text (where the number is the current page number) and another empty line :

Page 1:

Text on page 1

Page 2:

Text on page 2

Page 3:

Text on page 3

Mail MergeWhen this checkbox is checked, the driver will recognize special character sequences in the printed text to extract some of the information in a text file or to force the driver to start generating a new image file. This feature is useful when generating multi-page TIFF files from a large document using a custom printing application.

289292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 294: printer

The recognized character sequences all start with two ‘#’ characters. Most of these ‘commands’ will cause the driver to remove or alter the printed text and write it in the merged output file in text format. This file will have the same filename as the group file, with the MRG extension. The actual name of this file will be written in the group file in the following format:Merge Output=c:\aaaa1000.mrg

The recognized command sequences are as follows:

##~~ Lines starting with these four characters and ending with “~~” will not be printed, but written to the merged output file. For example, if the following string is sent to the driver: ##~~ Phone number=6031234321~~there will be an empty line printed in the output image file and the following line will be added to the merged output file:Phone number=6031234321 .

##** Lines starting with these four characters and ending with “**” will be partially printed and also written to the merged output file. If the string enclosed by the “**” marks contains an equation mark, the characters after the equation mark will be printed. Otherwise the whole string between the asterisks will be printed.Every character between the asterisks will be written to the merged output file.For example, if the following string is printed with the driver:##** Adressee=Company Name**the following will be written to the merged output file:Adressee=Company Nameand the following line will be printed to the output image file:Company Name

All of the above command lines must be printed as one continuous string from left to right. If they are printed one part at a time using several separate printing function calls, ( first printing “##~~” and then the rest of the line ) the driver may not be able to correctly recognize them.

The mail merge file will also contain page delimiter information to mark where the new page is started. The page delimiter is an empty line, the ‘Page 1:’ text (where the number is the current page number) and another empty line :

Page 1:

Page 2:

Page 3:

290292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 295: printer

This information will appear in the Mail Merge file even is there is no mail merge information in that particular the page.

Save Position and style info Checking this button will cause the driver to save additional formatting information in the text file. The text output is stored in the “[[X,Y][P][B,U,I]] text” format. The format starts with double brackets and ends with double brackets. The brackets can be used to parse the file. The format information has the following meaning:

X = The horizontal text coordinate.Y = The vertical text coordinate.P = The font size in points. B = The font in the text is bold.U = The font in the text is underlined.I = The font in the text is italic.

291292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 296: printer

Filename Generation sheet

292292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 297: printer

Name Generation Method Select how you want the filename to be generated from the options in the combo box. The following options are available:

Use this prefix and extension Prefix and extension from the registry Prefix and extension from the INI file Exact filename Exact filename from the registry Exact filename from the INI file Use the document name

36. Use this prefix and extension: the output filename will be generated from random characters. The first three characters will be the characters specified in the ‘Filename Prefix’ edit box and random numbers will be added. NOTE: Only the first 3 characters from the ‘Filename Prefix’ field will be used, if it is longer the string will be truncated.

37. Prefix and extension from the registry: The file name prefix and the extension will be read from the specified registry key. The registry path must be under the HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER root key. Use the “File Name Prefix” value name for the file prefix and the “File Name extension” value name for the extension.

293292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 298: printer

38. Prefix and extension from the INI file: In this case the filename and the prefix will be read from the specified INI file. The driver will search in the INI file for a section width the printer name. Use the “File Name Prefix” key for the file prefix and the “File Name extension” key for the extension. You can search for an existing INI file, create a new one or edit the selected file using the browse […] and edit [Edit] buttons.

[Black Ice Color Printer]File name prefix=ABCFile name extension=TIFF

39. Exact filename: The printed file will be generated with the same name specified in the ‘Enter the filename’ edit box.

40. Exact filename from the registry: The filename will be read from the specified registry key. The registry path must be under the HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER root key. The value name containing the filename must be "File Name". The file name can be specified with the path or without.

294292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 299: printer

41. Exact filename from the INI file: In this case the filename will be read from the specified INI file. The driver will search the INI file for a section with the printer’s name. Use the “File Name” key for the Filename. The file name can be specified with the path or without.

[Black Ice Color Printer]File name =C:\Output\page.tiff

42. Use the document name: The driver will use the document name the application passes to the driver when generating the name of the output image.

FilenameEnter the INI file name here, the registry path, or the file name depending on the selected file name generation method.

Filename PrefixThis is the prefix for the generated files if the “Use this prefix and extension ” setting is selected for the filename generation method. If the prefix is longer than 3 characters it will be truncated to the first 3 characters.

Filename ExtensionThis shows the current extension of the files. If the ‘Use custom extension’ setting is selected the default extension is changed with the string entered here.

Use custom extensionEnable/disable the custom file extension. If this is checked, the files will be generated with the extension entered in the ‘Filename Extension’ field. If it is unchecked, the default extension for the selected file format will be used.

Keep existing filesWhen the “Fixed filename” or “Use document name” methods are selected for filename generation, the files that exist in the output directory will be overwritten. Check this option to keep the files, so the new images will be added to the file. As a result, multi-page images will be created.

Output directoryIn this edit box you can specify the path where the driver will save the generated image files.The printer driver can handle long directory names like C:\My Documents\Printed Files\

295292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 300: printer

Group File OptionsSettings referring to how the group files are handled. Check the Group File Options section for more details about the Group Files.

Disable Group FileIf this option is set, the driver will not generate the group files.

Delete group file after printingIf this box is checked, the driver will automatically delete the group file when printing is finished. If the “Start Application” is checked, the printer driver will wait for the application to start and will then delete the group file.

296292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 301: printer

Start Application sheet

Enable Start ApplicationOn the Start Application tab, you can specify if the driver should launch an application when the user prints a document. The application can capture the printer messages, or can manipulate

297292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 302: printer

the generated image files. Please refer to the Messaging Interface, Programming Interface and Group Files Description section in this manual for more detail.

Check the “Enable start application’” check box to enable the driver to launch an application or uncheck it to disable the application launching. If the specified application is already running, the printer driver will not start it again.

ApplicationThe name of the application to be started. You must specify a valid application name and the full pathname (location of the application exe) (for example: e:\fax\test.exe). The printer driver can handle long file and directory names.

Start Before PrintingSelect this option to start the specified application before the printer driver starts printing. In this case the application will be able to capture and process the printer messages. Please refer to the Messaging Interface section in this manual for more detail.

Start After PrintingSelect this option to start your application after the printer driver finishes printing. This is the best solution when the application must manipulate the files that were created. For example: copying and processing, etc. Information about the generated files is saved by the driver in the group file. Please refer to the Group Files Description and the Programming Interface section in this manual for more detail.

Pass ParametersIf this is option is checked, the driver will pass parameters to the application that is started. Please refer to the Programming Interface section in this manual for more detail.

Show Application WindowDetermines how the application will be started. The available selections are:

Normal Minimized Hidden

Disable Messaging InterfaceChecking this option will stop the driver from broadcasting messages. Please refer to the Messaging Interface section in this manual for more detail.

298292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 303: printer

The Programming Interface

Programming Interface The Black Ice printer driver has a programming interface. Through this interface all the printer settings can be read, changed and written programmatically, however they should never be accessed directly, just through the designated functions. All these functions are declared in the devmode.h file and are implemented in the devmode.cpp file.The printer driver settings are stored in a data structure named BlackIceDEVMODE. The BlackIceDEVMODE data structure contains information about the device initialization and environment of a printer.

Windows DEVMODEThe Black Ice Printer Drivers are using a BlackIceDEVMODE data structure based on the default Windows DEVMODE data structure:

typedef struct _devicemode { BCHAR dmDeviceName[CCHDEVICENAME]; WORD dmSpecVersion; WORD dmDriverVersion; WORD dmSize; WORD dmDriverExtra; DWORD dmFields; union { struct { short dmOrientation; short dmPaperSize; short dmPaperLength; short dmPaperWidth; }; POINTL dmPosition; }; short dmScale; short dmCopies; short dmDefaultSource; short dmPrintQuality; short dmColor; short dmDuplex; short dmYResolution; short dmTTOption; short dmCollate; BCHAR dmFormName[CCHFORMNAME]; WORD dmLogPixels;

299292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 304: printer

DWORD dmBitsPerPel; DWORD dmPelsWidth; DWORD dmPelsHeight; union { DWORD dmDisplayFlags; DWORD dmNup; } DWORD dmDisplayFrequency; DWORD dmICMMethod; DWORD dmICMIntent; DWORD dmMediaType; DWORD dmDitherType; DWORD dmReserved1; DWORD dmReserved2;} DEVMODE;

Members OF THE WINDOWS DEVMODE

dmDeviceName Specifies the the "friendly" name of the printer; for example, "PCL/HP LaserJet" in the case of a PCL/HP LaserJet®. This string is unique among device drivers. Note that this name may be truncated to fit in the dmDeviceName array.

dmSpecVersion Specifies the version number of the initialization data specification on which the structure is based. To ensure the correct version is used for any operating system, use DM_SPECVERSION.

dmDriverVersion Specifies the printer driver version number assigned by the printer driver developer.

dmSize Specifies the size, in bytes, of the DEVMODE structure, not including any private driver-specific data that might follow the structure's public members. Set this member to sizeof(DEVMODE) to indicate the version of the DEVMODE structure being used.

dmDriverExtra Contains the number of bytes of private driver-data that follow this structure. If a device driver does not use device-specific information, set this member to zero.

dmFields Specifies whether certain members of the DEVMODE structure have been initialized. If a member is initialized, it’s corresponding bit is set, otherwise the bit is clear. A printer driver supports only those DEVMODE members that are appropriate for the printer technology.

The following values are defined, and are listed here with the corresponding structure members.

Value Structure member

300292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 305: printer

DM_ORIENTATION dmOrientationDM_PAPERSIZE dmPaperSizeDM_PAPERLENGTH dmPaperLengthDM_PAPERWIDTH dmPaperWidthDM_POSITION dmPositionDM_SCALE dmScaleDM_COPIES dmCopiesDM_DEFAULTSOURCE dmDefaultSourceDM_PRINTQUALITY dmPrintQualityDM_COLOR dmColorDM_DUPLEX dmDuplexDM_YRESOLUTION dmYResolutionDM_TTOPTION dmTTOptionDM_COLLATE dmCollateDM_FORMNAME dmFormNameDM_LOGPIXELS dmLogPixelsDM_BITSPERPEL dmBitsPerPelDM_PELSWIDTH dmPelsWidthDM_PELSHEIGHT dmPelsHeightDM_DISPLAYFLAGS dmDisplayFlagsDM_NUP dmNupDM_DISPLAYFREQUENCY dmDisplayFrequencyDM_ICMMETHOD dmICMMethodDM_ICMINTENT dmICMIntentDM_MEDIATYPE dmMediaTypeDM_DITHERTYPE dmDitherTypeDM_PANNINGWIDTH Windows 2000 or later: dmPanningWidthDM_PANNINGHEIGHT Windows 2000 or later: dmPanningHeight

dmOrientation For printer devices only, selects the orientation of the paper. This member can be either DMORIENT_PORTRAIT (1) or DMORIENT_LANDSCAPE (2).

dmPaperSize For printer devices only, selects the size of the paper to print on. This member can be set to zero if the length and width of the paper are both set by the dmPaperLength and dmPaperWidth members. Otherwise, the dmPaperSize member can be set to one of the following predefined values.

#define DMPAPER_FAX DMPAPER_USER+1 #define DMPAPER_VARIABLE DMPAPER_USER+2

301292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 306: printer

#define DMPAPER_VARIABLE_PIXEL DMPAPER_USER+3

#define DMPAPER_LETTER 1 /* Letter 8 1/2 x 11 in */#define DMPAPER_LETTERSMALL 2 /* Letter Small 8 1/2 x 11 in */#define DMPAPER_TABLOID 3 /* Tabloid 11 x 17 in */#define DMPAPER_LEDGER 4 /* Ledger 17 x 11 in */#define DMPAPER_LEGAL 5 /* Legal 8 1/2 x 14 in */#define DMPAPER_STATEMENT 6 /* Statement 5 1/2 x 8 1/2 in */#define DMPAPER_EXECUTIVE 7 /* Executive 7 1/4 x 10 1/2 in */#define DMPAPER_A3 8 /* A3 297 x 420 mm */#define DMPAPER_A4 9 /* A4 210 x 297 mm */#define DMPAPER_A4SMALL 10 /* A4 Small 210 x 297 mm */#define DMPAPER_A5 11 /* A5 148 x 210 mm */#define DMPAPER_B4 12 /* B4 (JIS) 257 x 364 mm */#define DMPAPER_B5 13 /* B5 (JIS) 182 x 257 mm */#define DMPAPER_FOLIO 14 /* Folio 8 1/2 x 13 in */#define DMPAPER_QUARTO 15 /* Quarto 215 x 275 mm */#define DMPAPER_10X14 16 /* 10 x 14 in */#define DMPAPER_11X17 17 /* 11 x 17 in */#define DMPAPER_NOTE 18 /* Note 8 1/2 x 11 in */#define DMPAPER_ENV_9 19 /* Envelope #9 3 7/8 x 8 7/8 in */#define DMPAPER_ENV_10 20 /* Envelope #10 4 1/8 x 9 1/2 in */#define DMPAPER_ENV_11 21 /* Envelope #11 4 1/2 x 10 3/8 in */#define DMPAPER_ENV_12 22 /* Envelope #12 4 3/4 x 11 in */#define DMPAPER_ENV_14 23 /* Envelope #14 5 x 11 1/2 in */#define DMPAPER_CSHEET 24 /* C size sheet */#define DMPAPER_DSHEET 25 /* D size sheet */#define DMPAPER_ESHEET 26 /* E size sheet */#define DMPAPER_ENV_DL 27 /* Envelope DL 110 x 220 mm */#define DMPAPER_ENV_C5 28 /* Envelope C5 162 x 229 mm */#define DMPAPER_ENV_C3 29 /* Envelope C3 324 x 458 mm */#define DMPAPER_ENV_C4 30 /* Envelope C4 229 x 324 mm */#define DMPAPER_ENV_C6 31 /* Envelope C6 114 x 162 mm */#define DMPAPER_ENV_C65 32 /* Envelope C65 114 x 229 mm */#define DMPAPER_ENV_B4 33 /* Envelope B4 250 x 353 mm */#define DMPAPER_ENV_B5 34 /* Envelope B5 176 x 250 mm */#define DMPAPER_ENV_B6 35 /* Envelope B6 176 x 125 mm */#define DMPAPER_ENV_ITALY 36 /* Envelope 110 x 230 mm */#define DMPAPER_ENV_MONARCH 37 /* Envelope Monarch 3 7/8 x 7 1/2 in */#define DMPAPER_ENV_PERSONAL 38 /* 6 3/4 Envelope 3 5/8 x 6 1/2 in */#define DMPAPER_FANFOLD_US 39 /* US Standard Fanfold 14 7/8 x 11 in */#define DMPAPER_FANFOLD_STD_GERMAN 40 /* German Standard Fanfold 8 1/2 x 12 in */#define DMPAPER_FANFOLD_LGL_GERMAN 41 /* German Legal Fanfold 8 1/2 x 13 in */#define DMPAPER_ISO_B4 42 /* B4 (ISO) 250 x 353 mm */#define DMPAPER_JAPANESE_POSTCARD 43 /* Japanese Postcard 100 x 148 mm */#define DMPAPER_9X11 44 /* 9 x 11 in */#define DMPAPER_10X11 45 /* 10 x 11 in */#define DMPAPER_15X11 46 /* 15 x 11 in */#define DMPAPER_ENV_INVITE 47 /* Envelope Invite 220 x 220 mm */#define DMPAPER_RESERVED_48 48 /* RESERVED--DO NOT USE */#define DMPAPER_RESERVED_49 49 /* RESERVED--DO NOT USE */#define DMPAPER_LETTER_EXTRA 50 /* Letter Extra 9 1/2 x 12 in */#define DMPAPER_LEGAL_EXTRA 51 /* Legal Extra 9 1/2 x 15 in */#define DMPAPER_TABLOID_EXTRA 52 /* Tabloid Extra 11.69 x 18 in */#define DMPAPER_A4_EXTRA 53 /* A4 Extra 9.27 x 12.69 in */#define DMPAPER_LETTER_TRANSVERSE 54 /* Letter Transverse 8 1/2 x 11 in */#define DMPAPER_A4_TRANSVERSE 55 /* A4 Transverse 210 x 297 mm */#define DMPAPER_LETTER_EXTRA_TRANSVERSE 56 /*Letter Extra Transverse 9 1/2x12 in*/#define DMPAPER_A_PLUS 57 /* SuperA/SuperA/A4 227 x 356 mm */#define DMPAPER_B_PLUS 58 /* SuperB/SuperB/A3 305 x 487 mm */

302292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 307: printer

#define DMPAPER_LETTER_PLUS 59 /* Letter Plus 8.5 x 12.69 in */#define DMPAPER_A4_PLUS 60 /* A4 Plus 210 x 330 mm */#define DMPAPER_A5_TRANSVERSE 61 /* A5 Transverse 148 x 210 mm */#define DMPAPER_B5_TRANSVERSE 62 /* B5 (JIS) Transverse 182 x 257 mm */#define DMPAPER_A3_EXTRA 63 /* A3 Extra 322 x 445 mm */#define DMPAPER_A5_EXTRA 64 /* A5 Extra 174 x 235 mm */

#define DMPAPER_A0 DMPAPER_USER+4 /* A0 840 x 1180 mm */#define DMPAPER_A1 DMPAPER_USER+5 /* A0 594 x 840 mm */ #define DMPAPER_ASHEET DMPAPER_USER+6 /* A Sheet 215 x 279 mm */#define DMPAPER_BSHEET DMPAPER_USER+7 /* B Sheet 239 x 431 mm */#define DMPAPER_FSHEET DMPAPER_USER+8 /* F Sheet 711 x 1016 mm */#define DMPAPER_GSHEET DMPAPER_USER+9 /* G Sheet 279 x 571 mm */#define DMPAPER_HSHEET DMPAPER_USER+11 /* H Sheet 711 x 1117 mm */#define DMPAPER_JSHEET DMPAPER_USER+12 /* J Sheet 863 x 1397 mm */#define DMPAPER_KSHEET DMPAPER_USER+13 /* K Sheet 1016 x 1592 mm */#define DMPAPER_AASHEET DMPAPER_USER+14 /* AA Sheet 228 x 304 mm */#define DMPAPER_BASHEET DMPAPER_USER+15 /* BA Sheet 304 x 457 mm */#define DMPAPER_CASHEET DMPAPER_USER+16 /* CA Sheet 457 x 609 mm */#define DMPAPER_DASHEET DMPAPER_USER+17 /* DA Sheet 609 x 965 mm */#define DMPAPER_EASHEET DMPAPER_USER+18 /* EA Sheet 965 x 1219 mm */

dmPaperLength For printer devices only, this overrides the length of the paper specified by the dmPaperSize member, either for custom paper sizes or for devices such as dot-matrix printers that can print on a page of arbitrary length. These values, along with all other values in this structure that specify a physical length, are in tenths of a millimeter.

dmPaperWidth For printer devices only, this overrides the width of the paper specified by the dmPaperSize member.

dmPosition Windows 95/98/ME, Windows 2000/XP or later: For display devices only, a POINTL structure that indicates the positional coordinates of the display device in reference to the desktop area. The primary display device is always located at coordinates (0,0).

dmScale Specifies the factor by which the printed output is to be scaled. The apparent page size is scaled from the physical page size by a factor of dmScale/100. For example, a letter-sized page with a dmScale value of 50 will contain as much data as a 17 by 22 inch page, because the output text and graphics would be half their original height and width.

dmCopies Selects the number of copies printed if the device supports multiple-page copies.

dmDefaultSource Specifies the paper source. To retrieve a list of the available paper sources for a printer, use the DeviceCapabilities function with the DC_BINS flag.

This member can be one of the following values, or it can be a device-specific value greater than or equal to DMBIN_USER.

303292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 308: printer

DMBIN_ONLYONEDMBIN_LOWERDMBIN_MIDDLEDMBIN_MANUALDMBIN_ENVELOPEDMBIN_ENVMANUALDMBIN_AUTO DMBIN_TRACTORDMBIN_SMALLFMTDMBIN_LARGEFMT DMBIN_LARGECAPACITYDMBIN_CASSETTEDMBIN_FORMSOURCE

dmPrintQuality Specifies the printer resolution. There are four predefined device-independent values:

DMRES_HIGHDMRES_MEDIUMDMRES_LOWDMRES_DRAFT

If a positive value is specified, it specifies the number of dots per inch (DPI) and is therefore device dependent.

dmColor Switches between color and monochrome on color printers. The following values are possible:

DMCOLOR_COLORDMCOLOR_MONOCHROME

dmDuplex Selects duplex or double-sided printing for printers capable of duplex printing. The following values are possible:

Value MeaningDMDUP_SIMPLEX Normal (non-duplex) printing.DMDUP_HORIZONTAL Short-edge binding, that is, the long edge of

the page is horizontal. DMDUP_VERTICAL Long-edge binding, that is, the long edge of

the page is vertical.

dmYResolution

304292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 309: printer

Specifies the y-resolution, in dots per inch, of the printer. If the printer initializes this member, the dmPrintQuality member specifies the x-resolution, in dots per inch of the printer.

dmTTOption Specifies how TrueType® fonts should be printed. This member can be one of the following values.

Value MeaningDMTT_BITMAP Prints TrueType fonts as graphics. This is the default

action for dot-matrix printers.DMTT_DOWNLOAD Downloads TrueType fonts as soft fonts. This is the

default action for Hewlett-Packard printers that use Printer Control Language (PCL).

DMTT_DOWNLOAD_OUTLINE Window 95/98, Windows NT 4.0, and later: Downloads TrueType fonts as outline soft fonts.

DMTT_SUBDEV Substitutes device fonts for TrueType fonts. This is the default action for PostScript® printers.

dmUnusedPadding Used to align the structure to a DWORD boundary. This should not be used or referenced. It’s name and usage is reserved and can change in future releases.

dmCollate Specifies whether collation should be used when printing multiple copies. (This member is ignored unless the printer driver indicates support for collation by setting the dmFields member to DM_COLLATE.) This member can be be one of the following values.

Value MeaningDMCOLLATE_TRUE Collate when printing multiple copies.DMCOLLATE_FALSE Do not collate when printing multiple copies.

Using DMCOLLATE_TRUE provides faster, more efficient output for collation, since the data is sent to the device driver just once, no matter how many copies are required. The printer is told to simply print the page again.

dmFormName Windows XP/W2K and NT or later: Specifies the name of the form to use; for example, "Letter" or "Legal". A complete set of names can be retrieved by using the EnumForms function.

Windows 95: Printer drivers do not use this member.

305292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 310: printer

dmLogPixels Specifies the number of pixels per logical inch. Printer drivers do not use this member.

dmBitsPerPel Specifies the color resolution, in bits per pixel, of the display device (for example: 4 bits for 16 colors, 8 bits for 256 colors, or 16 bits for 65,536 colors). For example, display drivers use this member in the ChangeDisplaySettings function. Printer drivers do not use this member.

dmPelsWidth Specifies the width, in pixels, of the visible device surface. For example, display drivers use this member in the ChangeDisplaySettings function. Printer drivers do not use this member.

dmPelsHeight Specifies the height, in pixels, of the visible device surface. For example, display drivers use this member in the ChangeDisplaySettings function. Printer drivers do not use this member.

dmDisplayFlags Specifies the device's display mode. This member can be a combination of the following values.

Value MeaningDM_GRAYSCALE Specifies that the display is a non-color device. If this flag is not

set, color is assumed.DM_INTERLACED Specifies that the display mode is interlaced. If the flag is not

set, non-interlaced is assumed.

For example, display drivers use this member in the ChangeDisplaySettings function. Printer drivers do not use this member.

dmNup Specifies where the NUP is done. It can be one of the following.

Value MeaningDMNUP_SYSTEM The print spooler does the NUP. DMNUP_ONEUP The application does the NUP.

dmDisplayFrequency Specifies the frequency, in hertz (cycles per second), of the display device in a particular mode. This value is also known as the display device's vertical refresh rate. Display drivers use this member. For example, it is used in the ChangeDisplaySettings function. Printer drivers do not use this member.

When you call the EnumDisplaySettings function, the dmDisplayFrequency member may return with a value of 0 or 1. These values represent the display hardware's default

306292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 311: printer

refresh rate. This default rate is typically set by switches on a display card or computer motherboard or by a configuration program that does not use Win32 display functions such as ChangeDisplaySettings.

dmICMMethod Windows 95/98/ME and later; Windows XP/W2K and NT or later: Specifies how ICM is handled. For a non-ICM application, this member determines if ICM is enabled or disabled. For ICM applications, the system examines this member to determine how to handle ICM support. This member can be one of the following predefined values, or a driver-defined value greater than or equal to the value of DMICMMETHOD_USER.

Value MeaningDMICMMETHOD_NONE Specifies that ICM is disabled.DMICMMETHOD_SYSTEM Specifies that ICM is handled by Windows.DMICMMETHOD_DRIVER Specifies that ICM is handled by the device driver.DMICMMETHOD_DEVICE Specifies that ICM is handled by the destination

device.

The printer driver must provide a user interface for setting this member. Most printer drivers support only the DMICMMETHOD_SYSTEM or DMICMMETHOD_NONE value. Drivers for PostScript printers support all values.

dmICMIntent Windows 95/98/ME, Windows XP/W2K and NT or later: Specifies which color matching method or intent should be used by default. This member is primarily for non-ICM applications. ICM applications can establish intents by using the ICM functions. This member can be one of the following predefined values or a driver defined value greater than or equal to the value of DMICM_USER.

Value MeaningDMICM_ABS_COLORIMETRIC Color matching should optimize to match the exact

color requested without white point mapping. This value is most appropriate for use with proofing.

DMICM_COLORMETRIC Color matching should optimize to match the exact color requested. This value is most appropriate for use with business logos or other images when an exact color match is desired.

DMICM_CONTRAST Color matching should optimize for color contrast. This value is the most appropriate choice for scanned or photographic images when dithering is desired.

DMICM_SATURATE Color matching should optimize for color saturation.

307292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 312: printer

This value is the most appropriate choice for business graphs when dithering is not desired.

dmMediaType Windows 95/98/ME, Windows XP/W2K and NT or later: Specifies the type of media being printed on. The member can be one of the following predefined values or a driver-defined value greater than or equal to the value of DMMEDIA_USER.

Value MeaningDMMEDIA_STANDARD Plain paper.DMMEDIA_GLOSSY Glossy paper.DMMEDIA_TRANSPARENCY Transparent film.

Whistler: To retrieve a list of the available media types for a printer, use the DeviceCapabilities function with the DC_MEDIATYPES flag.

dmDitherType Windows 95/98/ME, Windows XP/W2K and NT or later: Specifies how dithering is to be done. The member can be one of the following predefined values, or a driver-defined value greater than or equal to the value of DMDITHER_USER.

Value MeaningDMDITHER_NONE No dithering.DMDITHER_COARSE Dithering with a coarse brush.DMDITHER_FINE Dithering with a fine brush.DMDITHER_LINEART Line art dithering, a special dithering method that

produces well defined borders between black, white, and gray scalings. It is not suitable for images that include continuous graduations in intensisty and hue, such as scanned photographs.

DMDITHER_ERRORDIFFUSION Windows 95/98/ME: Dithering in which an algorithm is used to spread, or diffuse, the error of approximating a specified color over adjacent pixels. In contrast, DMDITHER_COARSE, DMDITHER_FINE, and DMDITHER_LINEART use patterned half toning to approximate a color..

DMDITHER_GRAYSCALE Device does gray scaling.

dmReserved1 Windows 95/98/ME, Windows XP/W2K and NT or later: Not used; must be zero.

308292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 313: printer

dmReserved2 Windows 95/98/ME, Windows XP/W2K and NT or later: Not used; must be zero.

Black Ice DEVMODEThe BlackIceDEVMODE is defined in the 'devmode.h' file located in the Resource Toolkit under the Install\InstallDll\ directory. (by default C:\Program Files\Black Ice Software, Inc\TIFF Printer Driver Resource Toolkit\Install\InstallDLL\devmode.h)

The BlackIceDEVMODE data structure contains the Windows DEVMODE and additional members:

On Windows XP/W2K and NT the application that uses this structure should set the structure member alignment to 1 in the project settings and the following value should be defined in the project: _WIN32_WINNT=0x0400. Without this, the size of the of the BlackIceDEVMODE structure will not be correct and some structure members will be shifted.

The BlackIceDEVMODE is defined in the 'devmode.h' file located in the Resource Toolkit under the Install\InstallDll\ directory. (by default C:\Program Files\Black Ice Software, Inc\TIFF Printer Driver Resource Toolkit\Install\InstallDLL\devmode.h)

Access the members of the BlackIceDEVMODE through the functions defined in the devmode.cpp file, located in the RTK in the Install\InstallDll\ directory.

Example:

The InterfaceName member of the devmode can be accessed through the DEVMODE_GetInterfaceName(BlackIceDEVMODE* pDevMode) and DEVMODE_SetInterfaceName(BlackIceDEVMODE* pDevMode, LPCTSTR InterfaceName);

TCHAR InterfaceName[MAX_PATH]:A TCHAR string type member. The InterfaceName member stores the name of the messaging interface. For Windows 95/98/ME is the name of the Windows Message broadcasted by the driver. Access functions: LPCTSTR DEVMODE_GetInterfaceName(BlackIceDEVMODE* pDevMode);void DEVMODE_SetInterfaceName(BlackIceDEVMODE* pDevMode, LPCTSTR InterfaceName);

The definition of the BlackIceDEVMODE structuretypedef struct{

309292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 314: printer

DEVMODE DM; DWORD BliceMode; DWORD Format; DWORD ColorMode; DWORD FAXheader; DWORD LossRatio; DWORD Dithering; DWORD Brightness; DWORD PaperWidthInPixels;

DWORD PaperHeightInPixels;TCHAR ApplicationPath[MAX_PATH];DWORD LaunchFlags;

DWORD FileNameGenerationFlags; TCHAR OutputDirectory[MAX_PATH]; TCHAR ImageFileName[MAX_PATH]; TCHAR FileNamePrefix[MAX_PREFIX_LENGTH+1]; TCHAR FileExtension[MAX_FILE_EXTENSION_LENGTH+1]; TCHAR InterfaceName[MAX_PATH]; TCHAR INIFileName[MAX_PATH]; TCHAR TIFFDLLName[MAX_PATH]; TCHAR JPEGDLLName[MAX_PATH]; TCHAR ResourceDLLName[MAX_PATH]; DWORD SessionID; DWORD UserFlags; TCHAR szUser1[128]; TCHAR szUser2[128];}BlackIceDEVMODE, *LPBlackIceDEVMODE;

MEMBERS OF THE BlackIceDEVMODE STRUCTUREAll the members can be read, changed or set programmatically; however they should never be accessed directly, only through the designated functions. All these functions are declared in the devmode.h file and are implemented in the devmode.cpp file.

DEVMODE DM : The Windows DEVMODE data structure.

DWORD BliceMode :A DWORD type member. Each bit of BliceMode represents a flag used by the printer driver. If the bit is set the valueis TRUE, if it is not the value is FALSE. The flags and their values are the following:

BLF_INTERNETTIFF 0x00000004BLF_PAGENUMBERING 0x00000008BLF_REVERSEFILLORDER 0x00000010BLF_MULTIIMAGE 0x00000020BLF_WRITETEXT 0x00000040BLF_UNICODETEXT 0x00000080

310292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 315: printer

BLF_MAILMERGE 0x00000100BLF_ADVANCEDTEXT 0x00000200BLF_DISABLEIMAGE 0x00000400BLF_DISABLEGROUPFILE 0x00000800BLF_ADOBEDETECT 0x00001000BLF_SENDMESSAGE 0x00002000BLF_ENABLETIFFDLL 0x00004000BLF_ENABLEJPEGDLL 0x00008000BLF_FAXOUTPUT 0x00010000BLF_GLYPHSUPPORT 0x00020000BLF_ROTATEPAPER 0x00040000BLF_DELETEGROUPFILE 0x00080000BLF_KEEPFILES 0x00100000BLF_ADVANCEDPAPERSIZE 0x00200000BLF_CUSTOMEXT 0x00400000

Description of the flags:

BLF_INTERNETTIFF : The value of the ‘Internet TIFF format’ checkbox. Access functions: BOOL DEVMODE_IsInternetTiffFormatEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableInternetTiffFormat(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableInternetTiffFormat(BlackIceDEVMODE* pDevMode);

BLF_PAGENUMBERING: The value of the ‘Add Page Numbering Tag’ checkbox. Access functions: BOOL DEVMODE_IsPageNumberingEnabled(BlackIceDEVMODE* pDevMode); void DEVMODE_EnablePageNumbering(BlackIceDEVMODE* pDevMode);void DEVMODE_DisablePageNumbering(BlackIceDEVMODE* pDevMode);

BLF_REVERSEFILLORDER: The value of the ‘Reverse Bit Order in TIFF’ checkbox. Access functions: BOOL DEVMODE_IsReverseBitOrderEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableReverseBitOrder(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableReverseBitOrder(BlackIceDEVMODE* pDevMode);

BLF_MULTIIMAGE: The value of the ‘Create Multipage Image’ checkbox. Access functions: BOOL DEVMODE_IsAppendImageEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableAppendImage(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableAppendImage(BlackIceDEVMODE* pDevMode);

BLF_WRITETEXT: The value of the ‘WriteText File’ checkbox. Access functions: BOOL DEVMODE_IsWriteTextEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableWriteText(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableWriteText(BlackIceDEVMODE* pDevMode);

BLF_UNICODETEXT: Used only by the NT driver.

BLF_MAILMERGE: The value of the ‘Mail Merge’ checkbox. Access functions:

311292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 316: printer

BOOL DEVMODE_IsMailMergeEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableMailMerge(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableMailMerge(BlackIceDEVMODE* pDevMode);

BLF_ADVANCEDTEXT: The value of the ‘Save position and style’ checkbox. Access functions: BOOL DEVMODE_IsAdvancedTextEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableAdvancedText(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableAdvancedText(BlackIceDEVMODE* pDevMode);

BLF_DISABLEIMAGE: The value of the ‘Disable Image’ checkbox. Access functions: BOOL DEVMODE_IsImageDisabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableDisableImage(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableDisableImage(BlackIceDEVMODE* pDevMode);

BLF_DISABLEGROUPFILE: The value of the ‘Disable Group File’ checkbox. Access functions: BOOL DEVMODE_IsGroupFileDisabled(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableGroupFile(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableGroupFile(BlackIceDEVMODE* pDevMode);

BLF_SENDMESSAGE: The value of the ‘Disable the Messaging Interface’ checkbox. Access functions: BOOL DEVMODE_IsMessagingInterfaceEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableMessagingInterface(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableMessagingInterface(BlackIceDEVMODE* pDevMode);

BLF_ENABLETIFFDLL: If set the using of the TIFF32.DLL is enabled. Can be set only programmatically.Access functions: BOOL DEVMODE_IsTiffDllEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableTiffDll(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableTiffDll(BlackIceDEVMODE* pDevMode);

BLF_FAXOUTPUT: The value of the ‘Create Faxable Image’ checkboxAccess functions: BOOL DEVMODE_IsFaxOutputEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableFaxOutput(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableFaxOutput(BlackIceDEVMODE* pDevMode);

BLF_GLYPHSUPPORT: The value of the ‘Eastern Character Support’ checkboxAccess functions: BOOL DEVMODE_IsEasternCharSupportEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableEasternCharSupport(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableEasternCharSupport(BlackIceDEVMODE* pDevMode);

BLF_ROTATEPAPER: The value of the ‘Rotate Landscape image to Portrait’ checkbox

312292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 317: printer

Access functions: BOOL DEVMODE_IsRotatePaperEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableRotatePaper(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableRotatePaper(BlackIceDEVMODE* pDevMode);

BLF_DELETEGROUPFILE: The value of the ‘Delete Group File After Printing’ checkboxAccess functions: BOOL DEVMODE_IsDeleteGroupFileEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableDeleteGroupFile(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableDeleteGroupFile(BlackIceDEVMODE* pDevMode);

BLF_KEEPFILES: The value of the ‘Keep existing files’ checkboxAccess functions: BOOL DEVMODE_IsKeepExistingFilesEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableKeepExistingFiles(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableKeepExistingFiles(BlackIceDEVMODE* pDevMode) ;

BLF_ADVANCEDPAPERSIZE: The value of the ‘Advanced Papersize’ checkboxAccess functions: BOOL DEVMODE_IsAdvancedPaperSizeEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableAdvancedPaperSize(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableAdvancedPaperSize(BlackIceDEVMODE* pDevMode);

BLF_CUSTOMEXT: The value of the ‘Use Custom Extension’ checkboxAccess functions: BOOL DEVMODE_IsCustomExtensionEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableCustomExtension(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableCustomExtension(BlackIceDEVMODE* pDevMode)

DWORD Format :A DWORD type member. Specifies the file format used by the driver. The available file formats are enumerated in the devmode.h

enum TEFileFormats{ FFR_BMP, FFR_PCX, FFR_DCX, FFR_TIFF_UNC, FFR_TIFF_G31D,FFR_TIFF_G31DNOEOL, FFR_TIFF_G32D, FFR_TIFF_G4, FFR_TIFF_PACK,FFR_TIFF_LZW, FFR_TIFF_JPEG, FFR_CALS, FFR_RAW_G31D, FFR_RAW_G31DNOEOL,FFR_RAW_G32D, FFR_RAW_G4, FFR_JPEG,

313292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 318: printer

FFR_JPEG_LAB, FFR_EMF, FFR_MMR, FFR_END

};

Access functions: DWORD DEVMODE_GetFileFormat(BlackIceDEVMODE* pDevMode);void DEVMODE_SetFileFormat(BlackIceDEVMODE* pDevMode, DWORD Format);

NOTE: In the Monochrome driver only the monochrome file formats are available, such as TIFF. The Metafile driver creates only Enhanced Metafile Format (EMF).

DWORD ColorMode:A DWORD type member.Specifies the color depth used by the printer. The values are enumerated in the

devmode.h

enum ColorMode { BITS_1, BITS_8GRAY, BITS_8, BITS_24, BITS_END

};

Access functions: DWORD DEVMODE_GetColorDepth(BlackIceDEVMODE* pDevMode);void DEVMODE_SetColorDepth(BlackIceDEVMODE* pDevMode, DWORD ColorDepth);

NOTE: In the Monochrome driver only the BITS_1 ColorMode is available. The Metafile driver accepts only the BITS_24 value..

DWORD FAXheader: A DWORD type member.Specifies the height in pixels of the fax header.

Access functions: DWORD DEVMODE_GetFaxHeader(BlackIceDEVMODE* pDevMode);void DEVMODE_SetFaxHeader(BlackIceDEVMODE* pDevMode, DWORD nPixels);

DWORD LossRatio: A DWORD type member.Specifies the loss ratio of the jpeg image.

Access functions: DWORD DEVMODE_GetLossRatio(BlackIceDEVMODE* pDevMode);void DEVMODE_SetLossRatio(BlackIceDEVMODE* pDevMode, DWORD dwLossRatio);

314292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 319: printer

DWORD Dithering: A DWORD type member.Specifies the dithering method for the monochrome image. The available values are defined in the devmode.h

#define DITHER_NONE 0#define DITHER_FS4 1#define DITHER_JJN 2#define DITHER_SMOOTH 3#define DITHER_SHARP 4#define DITHER_STUCKI 5

Access functions: DWORD DEVMODE_GetDithering(BlackIceDEVMODE* pDevMode);void DEVMODE_SetDithering(BlackIceDEVMODE* pDevMode, DWORD dwDithering);

DWORD Brightness: A DWORD type member.Specifies the brightness value.

Access functions: DWORD DEVMODE_GetBrightness(BlackIceDEVMODE* pDevMode);void DEVMODE_SetBrightness(BlackIceDEVMODE* pDevMode, DWORD dwBrightness);

DWORD PaperWidthInPixels: A DWORD type member.Specifies the Paper Width value in pixels.

Access functions: DWORD DEVMODE_GetPageWidthInPixels(BlackIceDEVMODE* pDevMode);void DEVMODE_SetPaperWidthInPixel(BlackIceDEVMODE* pDevMode, DWORD nPixels);

DWORD PaperHeightInPixels: A DWORD type member.Specifies the Paper Width value in pixels.

Access functions: DWORD DEVMODE_GetPageHeightInPixels(BlackIceDEVMODE* pDevMode);void DEVMODE_SetPaperHeightInPixel(BlackIceDEVMODE* pDevMode, DWORD nPixels);

TCHAR ApplicationPath[MAX_PATH]: A string type member.Specifies the name and the path of the application to be started after printing.

Access functions: LPCTSTR DEVMODE_GetApplicationPath(BlackIceDEVMODE* pDevMode);void DEVMODE_SetApplicationPath(BlackIceDEVMODE* pDevMode, LPCTSTR

ApplicationPath);

315292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 320: printer

DWORD LaunchFlags :A DWORD type member. Each bit of LaunchFlags represents a flag used by the printer driver. If the bit is set the value is TRUE, if it is not the value is FALSE. The flags and their values are the following:

BLF_LAUNCHAPP 0x00000001BLF_STARTBEFOREPRINT 0x00000002BLF_PASSPARAMETERS 0x00000004BLF_STARTNORMAL 0x00000008BLF_STARTMINIMIZED 0x00000010BLF_STARTHIDDEN 0x00000020

BLF_LAUNCHAPP: The value of the ‘Enable Start Application’ checkbox. Access functions: BOOL DEVMODE_IsStartApplicationEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableStartApplication(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableStartApplication(BlackIceDEVMODE* pDevMode);

BLF_STARTBEFOREPRINT: The value of the ‘Start Before Printing’ and ‘Start After Printing’ radio button. If TRUE the ‘Start Before Printing’ radio button is selected, otherwise the ‘Start After Printing’ radio button is selected.Access functions: BOOL DEVMODE_IsStartBeforePrint(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableStartBeforePrint(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableStartBeforePrint(BlackIceDEVMODE* pDevMode) ;

BLF_PASSPARAMETERS: The value of the ‘Pass Parameters’ checkbox. Access functions: BOOL DEVMODE_IsPassParametersEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnablePassParameters(BlackIceDEVMODE* pDevMode);void DEVMODE_DisablePassParameters(BlackIceDEVMODE* pDevMode) ;

BLF_STARTNORMAL: The value of the ‘Normal’ radio button. Access functions: BOOL DEVMODE_IsStartNormal(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableStartNormal(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableStartNormal(BlackIceDEVMODE* pDevMode) ;

BLF_STARTMINIMIZED: The value of the ‘Minimized’ radio button. Access functions: BOOL DEVMODE_IsStartMinimized(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableStartMinimized(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableStartMinimized(BlackIceDEVMODE* pDevMode) ;

BLF_STARTHIDDEN: The value of the ‘Hidden’ radio button. Access functions: BOOL DEVMODE_IsStartHidden(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableStartHidden(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableStartHidden(BlackIceDEVMODE* pDevMode) ;

316292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 321: printer

DWORD FileNameGenerationFlags :A DWORD type member. The FileNameGenerationFlags member represents the method used by the printer driver to generate the files. This setting is in the ‘Name generation Method’ combo. The available values are defined in the devmode.h and must be one of the followings:

enum { FILENAME_PREFIX_DEVMODE, FILENAME_PREFIX_REGISTRY,FILENAME_PREFIX_INI, FILENAME_EXACT_DEVMODE, FILENAME_EXACT_REGISTRY,

FILENAME_EXACT_INI, FILENAME_DOCUMENT_NAME,

FILENAME_LAST };

Access functions: DWORD DEVMODE_GetFileGenerationMethod(BlackIceDEVMODE* pDevMode);void DEVMODE_SetFileGenerationMethod(BlackIceDEVMODE* pDevMode, DWORD dwGenMethod);

TCHAR OutputDirectory[MAX_PATH]:A TCHAR string type member. The OutputDirectory member stores the path where the printer driver generates the

files.

Access functions: void DEVMODE_SetOutputDirectory(BlackIceDEVMODE* pDevMode, LPCTSTR OutputDir);LPCTSTR DEVMODE_GetOutputDirectory(BlackIceDEVMODE* pDevMode);

TCHAR FileImageName[MAX_PATH]:A TCHAR string type member. The FileImageName member stores the file name if the file generation method is “Exact Filename”.

Access functions: LPCTSTR DEVMODE_GetImageFileName(BlackIceDEVMODE* pDevMode);void DEVMODE_SetImageFileName(BlackIceDEVMODE* pDevMode, LPCTSTR ImageFileName);

TCHAR FileNamePrefix[MAX_PREFIX_LENGTH +1]:A TCHAR string type member. The FileNamePrefix member stores the prefix of the generated file name if the file generation method is FILENAME_PREFIX_DEVMODE. The max length of the prefix is 3 characters, if it is longer, it will be truncated to the first 3 characters.

Access functions: LPCTSTR DEVMODE_GetFileNamePrefix(BlackIceDEVMODE* pDevMode);

317292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 322: printer

void DEVMODE_SetFileNamePrefix(BlackIceDEVMODE* pDevMode, LPCTSTR FileNamePrefix);

TCHAR FileExtension[MAX_FILE_EXTENSION_LENGTH +1]:A TCHAR string type member. The FileExtension member stores the extension of the generated file name if the file generation method is FILENAME_PREFIX_DEVMODE. The max length of the extension is 3 characters, if it is longer, it will be truncated to the first 3 characters.

Access functions: LPCTSTR DEVMODE_GetFileExtension(BlackIceDEVMODE* pDevMode);void DEVMODE_SetFileExtension(BlackIceDEVMODE* pDevMode, LPCTSTR FileExtension);

TCHAR InterfaceName[MAX_PATH]:A TCHAR string type member. The InterfaceName member stores the name of the messaging interface. For Windows 95/98/ME is the name of the Windows Message broadcasted by the driver. Access functions: LPCTSTR DEVMODE_GetInterfaceName(BlackIceDEVMODE* pDevMode);void DEVMODE_SetInterfaceName(BlackIceDEVMODE* pDevMode, LPCTSTR InterfaceName);

TCHAR INIFileName[MAX_PATH]:A TCHAR string type member. The INIFileName member stores the name of the INI file which contains the information depending on the filename generation information.

For FILENAME_PREFIX_INI, the content of the INI file should be like:

[Black Ice Color Printer]File name prefix=ABCFile name extension=TIFF

For FILENAME_EXACT_INI, the content of the INI file should be like:

[Black Ice Color Printer]File name =C:\Output\page.tiff

Access functions: LPCTSTR DEVMODE_GetINIFileName(BlackIceDEVMODE* pDevMode);Void DEVMODE_SetINIFileName(BlackIceDEVMODE* pDevMode, LPCTSTR INIFileName);

TCHAR TIFFDLLName[MAX_PATH]:

318292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 323: printer

A TCHAR string type member. The TIFFDLLName member stores the name and path of the TIFF32.DLL. This DLL

encodes the TIFF files. The file is needed for TIFF output. Access functions: LPCTSTR DEVMODE_GetTIFFDLLName(BlackIceDEVMODE* pDevMode);void DEVMODE_SetTIFFDLLName (BlackIceDEVMODE* pDevMode, LPCTSTR TIFFDLLName);

TCHAR JPEGDLLName[MAX_PATH]:A TCHAR string type member. The JPEGDLLName member stores the name and path of the JPEG32.DLL. This DLL encodes the Jpeg files. The file is needed for Jpeg output. Access functions: LPCTSTR DEVMODE_GetJPEGDLLName(BlackIceDEVMODE* pDevMode);void DEVMODE_SetJPEGDLLName (BlackIceDEVMODE* pDevMode, LPCTSTR JPEGDLLName);

TCHAR ResourceDLLName[MAX_PATH]:A TCHAR string type member. The resources of the driver – such as the driver property dialogs - are stored in a separate DLL file. The look of the property sheets of the printer driver can be modified by moving or hiding controls. Also, all the names of the paper formats, DPI setting and file name generation methods are stored in this DLL and can be changed as well.The ResourceDLLName member stores the name and path of the driver resource DLL. Access functions: LPCTSTR DEVMODE_GetResourceDLLName(BlackIceDEVMODE* pDevMode);void DEVMODE_SetResourceDLLName(BlackIceDEVMODE* pDevMode, LPCTSTR ResourceDLLName);

DWORD SessionID:Reserverd.

DWORD UserFlags::A DWORD value.Reserved for extra programming possibilities.

TCHAR szUser1[128]:A TCHAR string type member. Reserved for extra programming possibilities.

TCHAR szUser2[128]:A TCHAR string type member.

319292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 324: printer

Reserved for extra programming possibilities.

320292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 325: printer

Messaging Interface All the Black Ice Printer Drivers have a messaging interface. The printer driver can communicate with applications through this interface. The applications capture and process the messages sent by the driver. The driver can communicate with an application two different ways.

4. Method I: Through the WM_COPYDATA Windows message.The WM_COPYDATA message is sent by the driver to a specific window. The driver has to know the application’s window handle. To pass the window handle to the driver, the application, when it starts, should write it’s window handle using the WritePrinterData() function to the PRINTER_DATA_WINDOW_HANDLE_KEY key.The driver sends a WM_COPYDATA message to the application’s window. The application extracts the information from the data structure arrived with the message. Before the application exits, it should overwrite the window handle in the registry to 0 by setting the PRINTER_DATA_WINDOW_HANDLE_KEY to 0.

5. Method II. Through a windows message registered with RegisterWindowMessage ().The driver registers a message with the RegisterWindowMessage () function and then starts broadcasting the message. The application has to register the same message as the driver. To accomplish this, use the string from the InterfaceName member of the BlackIceDEVMODE structure. The application will then capture and process the messages. The data will be written to an ini file by the driver defined in devmode.h.

#define BLACK_ICE_DEFAULT_INIFILE TEXT("bi_group.ini")

The application will read the ini file when the BLACKICE_MESSAGE_STARTDOC message arrives in order to get the name of the group file.. The driver writes all the information about the generated images in the group file. See the ‘Description of the Black Ice Printer Messages’ and the “Group File Description” sections in this manual for more detail.

The WM_COPYDATA Windows MessageAn application sends the WM_COPYDATA message to pass data to another

application. To send this message, call the SendMessage function with the following parameters (do not call the PostMessage function).

SendMessage( (HWND) hWnd, // handle to destination window WM_COPYDATA, // message to send (WPARAM) wParam, // handle to window (HWND) (LPARAM) lParam // data (PCOPYDATASTRUCT)

321292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 326: printer

);

ParameterswParam

Handle to the window passing the data. lParam

Pointer to a COPYDATASTRUCT structure that contains the data to be passed.

Return Values

If the receiving application processes this message, it should return TRUE; otherwise, it should return FALSE.

Remarks

The data being passed must not contain pointers or other references to objects not accessible to the application receiving the data.

While this message is being sent, the referenced data must not be changed by another thread of the sending process.

The receiving application should consider the data read-only. The lParam parameter is valid only during the processing of the message. The receiving application should not free the memory referenced by lParam. If the receiving application must access the data after SendMessage returns, it must copy the data into a local buffer.

When you send a WM_COPYDATA message, SendMessage allocates a block of memory cbData bytes in size and copies the data from the caller's address space to this block. It then sends the message to the destination window. When the receiving window procedure processes this message, the lParam parameter is a pointer to a COPYDATASTRUCT structure that exists in the address space of the receiving process. The lpData member is a pointer to the copied block of memory and the address reflects the memory location in the receiving process's address space.

The COPYDATASTRUCT structure The COPYDATASTRUCT structure contains data to be passed to another application by the WM_COPYDATA message.

typedef struct tagCOPYDATASTRUCT { ULONG_PTR dwData; DWORD cbData; PVOID lpData;

322292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 327: printer

} COPYDATASTRUCT, *PCOPYDATASTRUCT;

MembersdwData

Specifies data to be passed to the receiving application. cbData

Specifies the size, in bytes, of the data pointed to by the lpData member. lpData

Pointer to data to be passed to the receiving application. This member can be NULL.

The BLACKICE_PRINTER_MESSAGE structure The BLACKICE_PRINTER_MESSAGE structure contains data to be passed to another application. The data is passed by the WM_COPYDATA message. The dwData member of the COPYDATASTRUCT structure is a pointer to a BLACKICE_PRINTER_MESSAGE structure.

The BLACKICE_PRINTER_MESSAGE structure is defined in the devmode.h header file.

typedef struct _BLACKICE_PRINTER_MESSAGE{

DWORD dwBlackIceFlag; DWORD dwSize;DWORD dwMessage;TCHAR szFileName[MAX_PATH];TCHAR szInterfaceName[MAX_PATH];

}BLACKICE_PRINTER_MESSAGE;

Members DWORD dwBlackIceFlag:

This constant value identifies the message. The value of this member should be BLACK_ICE_FLAG (defined in devmode.h).

DWORD dwSize:The size of the BLACKICE_PRINTER_MESSAGE structure.

DWORD dwMessage:The ID of the message. The messages are defined in the devmode.h.

#define BLACKICE_MESSAGE_STARTDOC 0x00000001 #define BLACKICE_MESSAGE_STARTPAGE 0x00000002 #define BLACKICE_MESSAGE_ENDPAGE 0x00000003#define BLACKICE_MESSAGE_ENDDOC 0x00000004#define BLACKICE_MESSAGE_ABORT 0x00000005

323292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 328: printer

TCHAR szFileName[MAX_PATH]:A string passed with the message. The string content depends on the message. It can be the group file name, the image name, or an error code.

TCHAR szInterfaceName[MAX_PATH]:This string identifies a printer driver (can be than more than one printer driver). The printer driver fills the szInterfaceName[MAX_PATH] member with the value of the InterfaceName member of the BlackIceDEVMODE structure. When the application captures the WM_COPYDATA message, the application should compare the InterfaceName member of the designated printer driver’s devmode data structure with the szInterfaceName.

Description of the Black Ice Printer Messages

The BLACKICE_MESSAGE_STARTDOC message: The driver sends this message when it starts to print a new document.

Method I. When this message arrives the driver writes the name of the group file in the bi_group.ini file defined in the devmode.h. When this message arrives, the application can read the name of the group file. The driver will write all other information into this group file. #define BLACK_ICE_DEFAULT_INIFILE TEXT("bi_group.ini")Method II. With this message the driver sends the name of the group file in the szFileName member of the BLACKICE_PRINTER_MESSAGE structure.

The BLACKICE_MESSAGE_STARTPAGE message: The driver sends this message at the beginning of each new page.

Method I. Nothing is written to the group file now. The application can increment the number of pages here.Method II.With this message the driver sends the name of the image file in the szFileName member of the BLACKICE_PRINTER_MESSAGE structure.

The BLACKICE_MESSAGE_ENDPAGE message: The driver sends this message when it is finished printing a page. Method I. The name of the image file is already written to the group file. The application can read the name of the generated image from the group file.Method II.With this message the driver sends the name of the image file in the szFileName member of the BLACKICE_PRINTER_MESSAGE structure.

The BLACKICE_MESSAGE_ENDDOC message: The driver sends this message when it finishes printing a document.

324292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 329: printer

Method I. When this message arrives the driver is finished printing. If the “Delete Group File after printing” option is checked, the group file will be deleted. Method II. With this message the driver sends the name of the group file in the szFileName member of the BLACKICE_PRINTER_MESSAGE structure.

The BLACKICE_MESSAGE_ABORT message: The driver sends this message when an error occurs or the user cancels the document printing.

Method I. The driver writes the error code into the group file to the GROUPFILE_ERROR_KEY section, defined in the devmode.h.#define GROUPFILE_ERROR_KEY TEXT("Print status")Method II. With this message the driver sends the error code as a string in the szFileName member of the BLACKICE_PRINTER_MESSAGE structure.

325292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 330: printer

Command Line ParametersThe printer driver can start an application before or after printing. This can be set by

checking the “Start Application” checkbox, or programmatically set the the BLF_LAUNCHAPP flag in the LaunchFlags member of the devmode of the printer.

If the driver is configured to launch the application after the printing and the ‘Pass Parameters’ checkbox is checked. the parameters are passed in the command line to the application.

The passed parameters are separated by a space character. The string type parameters are between quotes. The following parameters are passed by the driver:

Document name - STRINGGroup file name - STRINGPrinter name - STRING Numer of pages - NUMBERMultipage - NUMBER, the value is 1 of 0. The 1 means the image is

multipage, 0 the image is not multipageOrientation - NUMBER, the value is 1 of 0. The 1 means the image

orientation is portrait, 0 the image orientation is landscape.

Examlpe:

MyApp.exe “Cutomer.doc” “customer.grp” “Black Ice Color” 4 0 1

326292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 331: printer

Group File DescriptionGroup files are generated for every document printed unless the “Disable Group File” option is set on the “File Name Generation” sheet of the properties. The group file contains critical information about the printed images and it offers an easy, simple way to communicate with the driver. The group file may be created for temporary if the “Delete group file after printing” option is set on the “File Name Generation” sheet of the properties. Please read “Delete group file after printing” section for details.

Group File Content. The following listing is a typical group file.

[Color Printer]

Image Format=JPEG

Append Image Enabled=No

Bits Per Pixel=24

Print status=Printing finished successfully

Total number of pages=3Document Name=Document1

[Page 1]

FileName=c:\temp\AAA13340001.JPG

TextFileName=c:\temp\AAA13340001.TXT

[Page 2]

FileName=c:\temp\AAA43840002.JPG

TextFileName=c:\temp\AAA43840002.TXT

[Page 3]

FileName=c:\temp\AAA60D30003.JPG

TextFileName=c:\temp\AAA60D30003.TXT

Group file header section

[Color Printer]

The printer driver type. The printer driver type can be Monochrome, Color, or Metafile.

327292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 332: printer

Image Format=JPEG

Image format can be

Microsoft Bitmap format - “BMP"Paint Brush format - "PCX"Intel format - "DCX"

- "TIFF Group 3 1D No EOL"- "TIFF Uncompressed"- "TIFF Group 3 2D"- "TIFF Group 4"- "TIFF Packed"- "TIFF LZW"- "TIFF JPEG"- "TIFF Group 3 1D"- "CALS"- "RAW TIFF Group 3 1D"- "RAW TIFF Group 3 1D No EOL"- "RAW TIFF Group 3 2D"- "RAW TIFF Group 4"- "JPEG"

Color Fax Format - "JPEG L*a*b"- "Extended Metafile"

Append Image Enabled=No

The “Append Image Enabled” field shows that the printer driver generated a single files with multiple images in it, or a separate file for every page. If a single file is generated with multiple images then there would be a single image per page. Also the file name will be repeated for every page in the Page section of the group file. See detail below.

Bits Per Pixel=24

The “Bits Per Pixel” field shows the generated image color depth. The values can be 1 for monochrome, 8 and 24 for color images.

Print status=Printing finished successfully

The printed job status. In case of failed printing and error message will appear in the status field.

The message "Printing finished successfully" shown on successful printing.The message "Internal error 99" followed by two numbers shown when an internal error occurs. Please contact technical support with error number for details.

328292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 333: printer

The message "Out of memory" shown when the driver fail to allocate memory. Resolution is to add more physical memory and make sure that there is enough disk space for virtual memory.The message "TIFF32.DLL cannot be loaded" shown if driver failed to load the TIFF3 DLL.The message "JPEG32.DLL cannot be loaded" shown f driver failed to load the JPEG DLL.

Total number of pages=3

The total number of pages printed in the print job.

Group file body

For every page printed in the document a page number section is created.

[Page 1]

The page number.

FileName=c:\temp\AAA13340001.JPG

The “FileName” is the generated raster image file name with full path. If “Create a multi page image” is selected on the File Formats sheet, the file name will be the same for every page.

TextFileName=c:\temp\AAA13340001.TXT

The “TextFileName” is the generated text file name with full path. If “Create a multi page image” is selected on the File Formats sheet, the file name will be the same for every page. The driver will create “TextFileName” section entry only if “Write Text File” is selected on the File Formats sheet.

[Page 2]

FileName=c:\temp\AAA43840002.JPG

TextFileName=c:\temp\AAA43840002.TXT

[Page 3]

FileName=c:\temp\AAA60D30003.JPG

TextFileName=c:\temp\AAA60D30003.TXT

329292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 334: printer

330292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 335: printer

Message Capture OCX ControlThe Message Capture OCX control is provided to help VB, Delphi, Visual FoxPro programmers handle printer driver messages easily from their application. The name of the OCX control is BiPrnDrv.ocx and it should be installed into the SYSTEM directory.

The Capture OCX can be found in the OCX directory in your RTK installation folder.To redistribute the OCX, you have to register the OCX with regsvr32.exe or with your installation package.

The OCX does not have any Black Ice DLL or OCX file dependency.

The BiPrnDrv.ocx file loads the following system DLLs:

-MFC42.DLL-MSVCRT.DLL-ADVAPI32.DLL-OLEAUT32.DLL-KERNEL32.DLL-GDI32.DLL-USER32.DLL-WINSPOOL.DRV-OLE32.DLL

If any of the above DLL is missing, the BiPrnDrv.ocx will not register correctly.

The Message Capture OCX control does not require a license file.

The OCX control exports the following Properties and Events:

PrinterName PropertyThis property contains the name of the printer the application wants to capture messages from.

StartDoc eventThe StartDoc event is fired when the selected printer starts to print a document. The parameter of this event is the name (with the full path) of the generated group file.

StartPage eventThe StartPage event is fired when the selected printer starts to print a new page. The parameter of this event is the actual page number.

EndPage eventThe EndPage event is fired when the selected printer finishes printing a page. The parameter of this event is the name (with the full path) of the generated image file.

331292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 336: printer

EndDoc eventThe EndDoc event is fired when the selected printer finishes printing a document. The parameter of this event is the name (with the full path) of the generated group file.

-

332292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 337: printer

Sample code for changing the printer settings programmatically

Changing the DEVMODE structure under Win 95/98 & METhe following sample code demonstrates how to change the printer settings under Windows 95/98 and ME. The preferred way to do this is by using the DocumentProperties() Win32 API call.

3. Open the printer.

TCHAR s[255];PRINTER_DEFAULTS printerDefaults;ACCESS_MASK DesiredAccess = PRINTER_ALL_ACCESS;printerDefaults.DesiredAccess = DesiredAccess;printerDefaults.pDevMode = pdevModeTemp = NULL;printerDefaults.pDatatype= NULL;

//Open the printerif (!OpenPrinter(PRINTER_NAME,&hPrinter, &printerDefaults)){

wsprintf(s,TEXT("Error opening \" %s \" printer. Error: %d"), PRINTER_NAME, GetLastError());

OutputDebugString(s);return false;

}

4. Retrieve the size of the DEVMODE structure of the printer.

DWORD Size= DocumentProperties(NULL, hPrinter, PRINTER_NAME, NULL, NULL, NULL);

if ( Size <0 ){

wsprintf(s,TEXT("DocumentProperties failed, Error: %d\n"), GetLastError());OutputDebugString (s);

}5. The returned size should be the same as the size of the BlackIceDEVMODE structure. If

the returned size is not the same as the size of the BlackIceDEVMODE structure, please check the following:

a. Make sure that the printer handle you specified as the second parameter in the DocumentProperties function call was obtained by calling the OpenPrinter

333292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 338: printer

function with a Black Ice printer. Non Black Ice printers will have a different DEVMODE structure and this is the reason why the size is not correct.

6. Allocate memory for the BlackIceDEVMODE structure.

BlackIceDEVMODE* pdevModeTemp= (BlackIceDEVMODE*) new BYTE[Size];if ( !pdevModeTemp ) {

OutputDebugString(TEXT("Not enough memory."));return false ;

}7. Retrieve the printer’s current BlackIceDEVMODE structure. This structure will contain

the current printer settings.

DocumentProperties(m_hWnd, hPrinter, PRINTER_NAME, pdevModeTemp, NULL, DM_OUT_BUFFER);

8. Modify the printer settings by modifying members of the BlackIceDEVMODE structure. The devmode.h and devmode.cpp file provides a set of functions that access and modify members of the structure. It is not recommended modifying any structure member directly, but through the functions from the devmode.h file. The following code sample sets the output directory to “c:\temp” and sets the printer to use the “image.tif” file name as image file name for the printed document.

DEVMODE_SetOutputDirectory(pDevMode, TEXT("C:\\TEMP"));DEVMODE_SetFileGenerationMethod(pDevMode, FILENAME_EXACT_DEVMODE);DEVMODE_SetImageFileName(pDevMode, TEXT(“IMAGE.TIF”));

9. Save the new printer settings.

lRet = DocumentProperties(m_hWnd, hPrinter, PRINTER_NAME, NULL, (DEVMODE*)pDevMode, DM_IN_BUFFER|DM_UPDATE );if ( lRet <0 ){

wsprintf(s,TEXT("DocumentProperties failed, Error: %d\n"), GetLastError());OutputDebugString(s);

}

334292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 339: printer

Fax BoardsGammaLink Fax BoardsIn order to generate images for the GammaFax board use the following settings:

File Format = “Tiff Group 3. 1 Dimension with Fillbits”

Paper Size =“Fax Paper” or “Create faxable Image” checkbox checked.

Graphic Resolution = “Fine FAX Resolution” or “Standard FAX Resolution”

At this point the DPI setting has to be 204 x 98 or 204 x 196.

The “Reverse Bit Order” checkbox should be checked.

Dialogic VFX Fax BoardsThe driver settings for Dialogic fax boards are the same as the GammaLink settings above.

Bicom Fax BoardThe Win95 printer driver settings must be the following:

File Format = “Tiff Group 3 1 Dimension with Fillbits”

Paper Size =“Fax Paper” or “Create faxable Image” checkbox checked.

Graphic Resolution = “Fine FAX Resolution” or “Standard FAX Resolution”

At this point the DPI setting has to be 204 x 98 or 204 x 196.

The “Reverse Bit Order” checkbox should be unchecked.

Commetrex Fax BoardSame as Bicom Fax Boards.

Natural Micro Systems Fax BoardSame as Bicom Fax Boards.

335292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 340: printer

Win95/98 and ME Resource ToolkitDirectory structure of the Resource ToolkitRun Setup.exe on the installation CD to install the Resource Toolkit. In the specified destination directory you will have the following subdirectories (see the ‘Components of the Resource Toolkit’ chapter below for a detailed description about the contents of the individual directories):

Driver Install Project\Install Shield project: Sample InstallShield project that demonstrates how to install the printer driver.

Driver Install Project \InstallDLL: Sample installation DLL that is used by InstallShield to install the printer driver.

Driver Install Project \UninstallDLL: Sample un-installation DLL that is used by InstallShield to remove the printer driver.

OCX The BiPrnDrv.ocx file. This OCX is used to capture printer driver messages.

Message Capture Sample: Visual C++ application that demonstrates how to capture printer driver messages.

ResourceDLL: The source code for the resource DLL used by the driver.VB Message Capture Sample: VB 6 application that demonstrates how to capture printer

driver messages.

337292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 341: printer

Components of the Resource Toolkit1. InstallThe Install directory contains samples that demonstrate how to install the printer driver. There is an Install DLL, Uninstall DLL and an Install Shield project.The Install Shield project calls functions that are implemented in the Install DLL. The DLL can be compiled with Visual C++ and it should be placed into the “Setup Files\Compressed Files\Language Independent\OS Independent” folder in the Install Shield projects directory structure.

1.1 The Install DLLThe Install DLL (MyDll.dll) is used by the Install Shield project. The Install DLL contains functions to add and remove components of the driver like the Port Monitor, Print Processor, Driver and Printer. The functions of the Install DLL can also be used to change the DEVMODE members’ values and set the printer driver settings at install time.

NOTE: For the ME/98/95 driver, the Install DLL has to be compiled with the following project settings:

The Structure Alignment must be 1 byte.

To change a member of the DEVMODE at install time, follow the steps below:

5. Call the dSetParameter() function from the Install DLL to set a member of the DEVMODE structure.

6. Repeat step 1 for each member of the DEVMODE you wish to set.When all the members are set to the required values, call the dDocumentProperties() function from the Install DLL to write the new settings to the printer.

1.2 The dSetParameter() functionCall the dSetParameter() function from the Install DLL to set a member of the DEVMODE.

dSetParameter(HWND MainWnd, LPLONG lpLong, LPSTR lpStringTmp)

The parameters of the function are:

HWND MainWnd - a window handle (can be NULL)LPLONG lpLong - a pointer to a long value. Represents the member of the DEVMODE to be changed. The valid values are defined in the ‘setup.h’ file

// Parameters to call dSetParameter()

338292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 342: printer

#define PAR_INIC_PARAMETERS 0 // clear ALL parameters & set default values.#define PAR_DRIVER_VERZIO 1 // numeric#define PAR_DRIVER_NAME 2 // string#define PAR_DRIVER_DRIVERFILE 3 // string#define PAR_DRIVER_DATAFILE 4 // string#define PAR_DRIVER_CONFIGFILE 5 // string#define PAR_PRINTER_NAME 101 // string#define PAR_PRINTER_PORT 102 // string#define PAR_PRINTER_PROCESS 103 // string#define PAR_PRINTER_DATATYPE 104 // string

// members of the Windows DEVMODE (BlackIceDEVMODE.DM)#define PAR_DEVMODE_ORIENT 201 // numeric (VAL_LANDSCAPE or VAL_PORTRAIT)#define PAR_DEVMODE_PAPERSIZE 202 // numeric (VAL_PAPER_xxx)#define PAR_DEVMODE_PAPERLENGTH 203 // numeric#define PAR_DEVMODE_PAPERWIDTH 204 // numeric#define PAR_DEVMODE_DITHER 205 // numeric (VAL_DITHER_xx)#define PAR_DEVMODE_XDPI 206 // numeric#define PAR_DEVMODE_YDPI 207 // numeric

// members of the BlackIceDEVMODE#define PAR_DEVMODE_FILEFORMAT 301 // mumeric (VAL_xxx_INDX(_xxx))#define PAR_DEVMODE_RENAMEDLGBOX 302 // VAL_YES or VAL_NO#define PAR_DEVMODE_OUTDIR 303 // string#define PAR_DEVMODE_FAXHEADER 304 // numeric#define PAR_DEVMODE_APPENDIMAGE 305 // VAL_YES or VAL_NO#define PAR_DEVMODE_STARTAPPLICATION 306 // VAL_YES or VAL_NO#define PAR_DEVMODE_APPLICATIONPATH 307 // string#define PAR_DEVMODE_SERVERKEY 308 // string#define PAR_DEVMODE_PAGENUMBERING 309 // VAL_YES or VAL_NO#define PAR_DEVMODE_WRITETEXT 310 // VAL_YES or VAL_NO#define PAR_DEVMODE_ADVTEXT 311 // VAL_YES or VAL_NO#define PAR_DEVMODE_REVERSEFILLORDER 312 // VAL_YES or VAL_NO#define PAR_DEVMODE_CREATEFAXABLEIMAGE 313 // VAL_YES or VAL_NO#define PAR_DEVMODE_FILENAMEGEN 314 // numeric#define PAR_DEVMODE_GLYPHSUPPORT 315 // numeric#define PAR_DEVMODE_DITHERING 316 // numeric#define PAR_DEVMODE_BRIGHTNESS 317 // numeric#define PAR_DEVMODE_COLORDEPTH 318 // numeric#define PAR_DEVMODE_RESOURCEDLLNAME 319 // string#define PAR_DEVMODE_APPLICATION_STARTBEFOREPRINT 320 // VAL_YES or VAL_NO#define PAR_DEVMODE_PASSPARAMETERS 321 // VAL_YES or VAL_NO#define PAR_DEVMODE_SHOWAPPLICATIONWINDOW 322 // numeric VAL_START_NORMAL #define PAR_DEVMODE_DISABLE_MESSAGING_INTERFACE 323 // VAL_YES or VAL_NO#define PAR_DEVMODE_EXTENSION 324 // string#define PAR_DEVMODE_INTERFACENAME 325 // string

LPSTR lpStringTmp - Represents the new value of the DEVMODE member specified in the lpLong parameter.

339292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 343: printer

Return ValueThe dSetParameter() will return FALSE if the value passed in the lpLong parameter is not valid (code to set the specified DEVMODE member is not present in the dSetParameter() function) , otherwise TRUE. Check the ‘How to add code to set a member of the DEVMODE’ section for more information on how to implement your own code to set the DEVMODE members.

1.3 The dDocumentProperties() function

The dDocumentProperties() function is called from the Install DLL by the Install Shield project to write the changes of the devmode to the printer.

dDocumentProperties(HWND MainWnd, LPLONG lpLong, LPTSTR lpString)

HWND MainWnd - handle to a window (can be NULL)LPLONG lpLong - pointer to a long value. The value is not used, can be NULL;LPTSTR lpString - pointer to a string value. The value is not used, can be NULL;

All of these parameters are only necessary, because of the Install Shield DLL calling format.

1.4 Example to set a member of the DEVMODE at install timeFor example, we will set the horizontal DPI for the printer driver in the Install Shield RUL file to 300 DPI.:

STRING G_DllFileName;STRING DllProc;STRING ParamValue;LONG tmpLong;NUMBER nResult;

G_DllFileName = SUPPORTDIR ^ "MYDLL.DLL";

DllProc = "dSetParameter";tmpLong = PAR_DEVMODE_XDPI;

ParamValue = "300"; CallDLLFx( G_DllFileName, DllProc, tmpLong, ParamValue);

DllProc = "dDocumentProperties"; tmpLong = 0; ParamValue = ""; CallDLLFx( G_DllFileName, DllProc, tmpLong, ParamValue ); 1.5 How to add code to set a member of the DEVMODEYou can add code to the Install DLL and/or to your Install Shield project to set any member of the DEVMODE.

340292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 344: printer

For example, set the printer at install time to enable text output. To enable text output we have to set the BLF_WRITETEXT flag of the BliceMode member of the BlackIceDEVMODE structure.

The BlackIceDEVMODE structure is defined in the ‘devmode.h’ file in the Install DLL project.In the devmode.cpp file there are several functions defined to access the members of the BlackIceDEVMODE structure. You can use the following functions to access the BliceMode member:

BOOL DEVMODE_IsWriteTextEnabled(BlackIceDEVMODE* pDevMode);void DEVMODE_EnableWriteText(BlackIceDEVMODE* pDevMode);void DEVMODE_DisableWriteText(BlackIceDEVMODE* pDevMode)

1. Define a new value in the ‘setup.h’ file in the Install DLL project for each member you want to access:

#define PAR_DEVMODE_ADVTEXT 311

2. Modify the dSetParameter() function in the ‘setupdll.cpp’ file in the Install DLL project. Add the following to the ‘switch’ statement:

case PAR_DEVMODE_ADVTEXT: if ( _ttoi(lpString))

DEVMODE_ EnableWriteText (&BliceDevMode);else

DEVMODE_ DisableWriteText (&BliceDevMode);break;

7. Modify the dDocumentProperties() function in the ‘setupdll.cpp’ file in the Install DLL project. Add the following code to the dDocumentProperties(), before the last call of the DocumentProperties() function:

if (DEVMODE_IsWriteTextEnabled(&BliceDevMode))DEVMODE_EnableWriteText (pInPut);

elseDEVMODE_DisableWriteText (pInPut);

8. Rebuild the Install DLL and copy the file to the Install Shield project “Setup Files\Compressed Files\Language Independent\OS Independent” folder.

Open the Install Shield project and the script file. Add the following code to the RUL file:

STRING G_DllFileName;STRING DllProc;STRING ParamValue;LONG tmpLong;NUMBER nResult;

341292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 345: printer

G_DllFileName = SUPPORTDIR ^ "MYDLL.DLL";

DllProc = "dSetParameter";tmpLong = PAR_DEVMODE_ADVTEXT;

ParamValue = VAL_YES; CallDLLFx( G_DllFileName, DllProc, tmpLong, ParamValue);

DllProc = "dDocumentProperties"; tmpLong = 0; ParamValue = ""; CallDLLFx( G_DllFileName, DllProc, tmpLong, ParamValue );

NOTE: Important! The printer must be installed correctly before you call the dSetParameter() and dDocumentProprieties() functions to change the settings.

1.6 Functions of the Install DLLThe Install directory contains samples that demonstrate how to install the printer driver. There is an Install DLL, Uninstall DLL and an Install Shield project.The Install Shield project calls functions that are implemented in the Install DLL. The Install DLL can be compiled with Visual C++ and it should be placed into the “Setup Files\Compressed Files\Language Independent\OS Independent” folder in the Install Shield projects directory structure.The Install DLL (MyDll.dll) is used by the Install Shield project. The Install DLL contains functions to add and remove components of the driver like the Port Monitor, Print Processor, Driver and Printer. The functions of the Install DLL can be also be used to change the DEVMODE members’ values and set the printer driver settings at install time.

dIsInstalledPrinterDriver(LPSTR szDriverName) -Returns TRUE if the printer driver is already installed.

dDeletePrinterDriver(HWND MainWnd, LPLONG lpLong, LPSTR lpStringTmp)) – deletes the specified printer driver– MainWnd - windows handle– LpLong - not used, the value can be NULL;– lpStringTmp - Specifies the name of the printer driver to be deleted.– Return FALSE if the printer driver could not be deleted.

dIsPrintProcessorInstalled(LPSTR lpPrintProcessorName)- Return TRUE if the specified print processor is already installed

dDeletePrintProcessor(LPSTR lpPrintProcessor)- Deletes the specified print processor.- Returns TRUE if the print processor was deleted, otherwise return the GetLastError() value.

dAddPrintProcessor(LPSTR lpProcessorDllName, LPSTR lpProcessorName)- Adds the specified print processor to the system.- lpProcessorDllName - the name of the print processor dll- lpProcessorName - the name of the print processor

342292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 346: printer

- Returns 0 on success GetLastError() otherwise.

dIsPortMonitorInstalled(LPSTR lpMonitorName)- Returns TRUE if the specified port monitor is installed

dAddPortMonitor(LPSTR lpMonitorDllName, LPSTR lpMonitorName)- adds the specified port monitor to the system- lpMonitorDllName - the dll file name- lpMonitorName - the name of the port monitor- Returns 0 if the port monitor was successfully added, otherwise returns the GetLastError();

dIsPortInstalled(LPSTR lpPortName, LPSTR lpMonitorName)- Returns TRUE if the port is already installed, otherwise FALSE- lpPortName - the name of the port - lpMonitorName - the name of the port monitor

dAddPort(LPSTR lpPortName, LPSTR lpMonitorName)- Adds the specified port to the specified port monitor- lpPortName - the name of the port to be added- lpMonitorName - the name of the port monitor to add the port to

dAddPrinterDriver(HWND MainWnd, LPLONG lpLong, LPSTR lpStrTemp)- Adds the specified printer driver to the system- MainWnd - handle to a window- lpLong - pointer to a long value. Not used, the value can be 0.- lpStrTemp - the name of the driver to be installed- Returns 1 if the driver is already installed. Returns GetLastError() if adding the driver

failed. Returns 0 on success.

dAddPrinter( LPSTR szPrinterNameTmp, LPSTR szPrinterPortTmp, LPSTR szDriverNameTmp, LPSTR szPrintProcessorTmp )

- Adds the specified printer to the system- szPrinterName - the name of the printer to be added- szPrinterPort - specifies the name of the port the printer will be connected to- szDriverName - the name of the printer driver- szPrintProcessor - the name of the print processorNOTE: The printer driver, the port and the print processor must be installed before calling the dAddprinter() function.

dDocumentProperties(HWND MainWnd, LPLONG lpLong, LPTSTR lpString)- writes the settings modified by the dSetParameters() function to the installed printer- MainWnd - handle to a window. Not used.- lpLong - pointer to a value. Not used, the value can be null.

343292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 347: printer

- lpString - a string value. Not used.

dSetParameter(HWND MainWnd, LPLONG lpLong, LPSTR lpStringTmp)- Modifies the settings of the printer, one at a time. After calling this function for all the

required settings, the dDocumentProperties() must be called to write the settings to the printer.

- MainWnd - handle to a window- lpLong - pointer to a long value. Represents the member of the DEVMODE to be

changed. The valid values are defined in the ‘setup.h’ file See “1.2 The dSetParameter()” for details

- lpStringTmp - Represents the new value of the DEVMODE member specified in the lpLong parameter.

- Return Value - The dSetParameter() will return FALSE if the value passed in the lpLong parameter is not valid (code to set the specified DEVMODE member is not present in the dSetParameter() function) , otherwise TRUE. Check the ‘How to add code to set a member of the DEVMODE’ section for more information on implementing your own code to set the DEVMODE members.

Which are the right parameters for the dSetParameter() function to install the printer driver ?To correctly install the Win95 driver from an Install Shield script call the dSetParameter() function from the install DLL with the following parameters. Use the install dll (mydll.dll) from the Win95 resource toolkit.

DllProc = "dSetParameter"; tmpLong = PAR_INIC_PARAMETERS; ParamValue = VAL_INIC_BLICENT; nResult = CallDLLFx(G_DllFileName, DllProc, tmpLong, ParamValue);

DriverFiles = G_DriverDir ^ @DRIVER_FILE; // the driver file name with full path (BiMDrv95.drv) tmpLong = PAR_DRIVER_CONFIGFILE; nResult = CallDLLFx(G_DllFileName, DllProc, tmpLong, DriverFiles);

DriverFiles = G_DriverDir ^ @DRIVER_FILE; // the driver file name with full path (BiMDrv95.drv) tmpLong = PAR_DRIVER_DRIVERFILE; nResult = CallDLLFx(G_DllFileName, DllProc, tmpLong, DriverFiles);

DriverFiles = G_DriverDir ^ @DRIVER_FILE; // the driver file name with full path (BiMDrv95.drv) tmpLong = PAR_DRIVER_DATAFILE; nResult = CallDLLFx(G_DllFileName, DllProc, tmpLong, DriverFiles);

DriverFiles = @PROCESSOR_NAME; // the print processor name "TIFF Print Processor" tmpLong = PAR_PRINTER_PROCESS; nResult = CallDLLFx(G_DllFileName, DllProc, tmpLong, DriverFiles); DriverFiles = @PORT_NAME; // the port name IcePortMR: tmpLong = PAR_PRINTER_PORT;

344292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 348: printer

nResult = CallDLLFx(G_DllFileName, DllProc, tmpLong, DriverFiles);

Then call the following function to install the printer:

dAddPrintProcessor(PrintProcessorFileName, PrintProcessorName); The name of the print processor file is BiMPro95.dll

dAddPortMonitor(PortMonitorFileName, PortMonitorName); The name of the monitor file is BiMMon95.dll

dAddPort( PORT_NAME, MONITOR_NAME)and

dAddPrinter() passing the printer name in the string parameter.

Where to find the most recent driver files ? In order to build a new installation for the driver use the Install Shiled sample project

shipped with the driver located in the Resource Toolkit. Please remember that the Install Shield project is only a sample to show how to install the printer driver. The sample project may NOT contain the most recent version of the driver files. The most recent version of the driver files are always installed with the printer driver. They are located by default in the "C:\Program Files\Black Ice Software, Inc\Black Ice Color Printer\Distribution" folder. (for the color driver for example) Replace the driver files from the Install Shield sample project with the most recent driver files from the "Distribution" folder.

Description of the files for the color driver: ...\Distribution\ BiCDrv95.drv - Driver file for ME/98/95 ...\Distribution\ BiCMon95.dll - Port Monitor file for ME/98/95 ...\Distribution\ BiCRes95.dll - Resource file for ME/98/95 ...\Distribution\ BiCRmv95.dll - Library for the driver uninstall for ME/98/95 ...\Distribution\ BiCPro95.dll - Print processor file for ME/98/95 ...\Distribution\ BiImg.dll - file for ME/98/95 ...\Distribution\ JPEG32.DLL - file for ME/98/95 ...\Distribution\ TIFF32.DLL - file for ME/98/95

Description of the files for the TIFF (monochrome) driver: ...\Distribution\ BiMDrv95.drv - Driver file for ME/98/95 ...\Distribution\ BiMMon95.dll - Port Monitor file for ME/98/95 ...\Distribution\ BiMRes95.dll - Resource file for ME/98/95 ...\Distribution\ BiMRmv95.dll - Library for the driver uninstall for ME/98/95 ...\Distribution\ BiMPro95.dll - Print processor file for ME/98/95 ...\Distribution\ BiImg.dll - file for ME/98/95 ...\Distribution\ JPEG32.DLL - file for ME/98/95 ...\Distribution\ TIFF32.DLL - file for ME/98/95

Description of the files for the EMF (Enhanced metafile) driver:

345292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 349: printer

...\Distribution\ BiEDrv95.drv - Driver file for ME/98/95 ...\Distribution\ BiEMon95.dll - Port Monitor file for ME/98/95 ...\Distribution\ BiERes95.dll - Resource file for ME/98/95 ...\Distribution\ BiERmv95.dll - Library for the driver uninstall for ME/98/95 ...\Distribution\ BiEPro95.dll - Print processor file for ME/98/95 ...\Distribution\ BiImg.dll - file for ME/98/95 ...\Distribution\ JPEG32.DLL - file for ME/98/95 ...\Distribution\ TIFF32.DLL - file for ME/98/95

How to install the printer driver with a different package other than Install Shield?To install the printer driver with another installation building package other than Install Shield, please follow the steps below:

3. Make sure that the installation builder you are using can call functions from external DLLs. In order to install and configure the printer driver, you will need to call functions from the Install DLL.

4. Before trying to install the printer driver, make sure that the driver is not currently installed. To check, call the dIsInstalledPrinterDriver function from the Install DLL. If the driver is currently installed you need to delete the printer driver by calling the dDeletePrinterDriver function. Copy the printer driver files to the right location. The following table shows the files needed by each printer driver and the location where the files should be copied.

346292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 350: printer

Printer driver File description Filename Target locationMonochrome printer driver for Windows 95/98/ME

Driver file BiMDrv95.drv <SYSTEM>Print processor file BiMProc95.dll <SYSTEM>Port monitor file BiMMon95.dll <SYSTEM>User Interface DLL BiMRes95.dll <SYSTEM>Driver Remove DLL BiMRmv95.dll <SYSTEM>TIFF DLL Tiff32.dll <SYSTEM>,

<WINDOWS>JPEG DLL JPEG32.dll <SYSTEM>,

<WINDOWS>Port monitor utility DLL

BiImg.dll <SYSTEM>, <WINDOWS>

Color printer driver for Windows 95/98/ME

Driver file BiCDrv95.drv <SYSTEM>Print processor file BiCProc95.dll <SYSTEM>Port monitor file BiCMon95.dll <SYSTEM>User Interface DLL BiCRes95.dll <SYSTEM>Driver Remove DLL BiCRmv95.dll <SYSTEM>TIFF DLL Tiff32.dll <SYSTEM>,

<WINDOWS>JPEG DLL JPEG32.dll <SYSTEM>,

<WINDOWS>Port monitor utility DLL

BiImg.dll <SYSTEM>, <WINDOWS>

Metafile printer driver for Windows 95/98/ME

Driver file BiEDrv95.drv <SYSTEM>Print processor file BiEProc95.dll <SYSTEM>Port monitor file BiEMon95.dll <SYSTEM>User Interface DLL BiERes95.dll <SYSTEM>Driver Remove DLL BiERmv95.dll <SYSTEM>TIFF DLL Tiff32.dll <SYSTEM>,

<WINDOWS>JPEG DLL JPEG32.dll <SYSTEM>,

<WINDOWS>Port monitor utility DLL

BiImg.dll <SYSTEM>, <WINDOWS>

<SYSTEM> The default location for the driver files is the \WINDOWS\system directory. <WINDOWS>The Windows directory.

347292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 351: printer

10. Set the printer driver installation parameters by using the dSetParameters function from the InstallDLL. The following parameters should be set: - Initialize default values by calling dSetParameter with PAR_INIC_PARAMETERS and VAL_INIC_BLICENT.- Set the name of the printer driver user interface DLL file by calling dSetParameter with PAR_DRIVER_CONFIGFILE and specify the name of the DLL.- Set the name of the driver file by calling dSetParameter with PAR_DRIVER_FILE and specify the name of the driver file.- Set the name of the driver config file by calling dSetParameter PAR_DRIVER_DRIVERFILE. - Set the print processor name by calling dSetParameter with PAR_PRINTER_PROCESS- Set the port name by calling dSetParameter with PAR_PRINTER_PORT

11. Install the printer driver by calling the "dAddPrinterDriver" function with the name of the Printer driver you want to use.

12. Install the Black Ice print processor by calling the dAddPrintProcessor function from the InstallDLL.

13. Install the Black Ice port monitor by calling the dAddPortMonitor function from the InstallDLL.

14. Install a new Black Ice port by calling the dAddPort function from the InstallDLL.

15. Install the printer by calling the "dAddPrinter" function with the name of the printer you want to install.

16. To modify values in the DEVMODE structure and make changes in the printer driver settings, call the dSetParameter function. The different values that can be changed are listed in the devmode.h file in the InstallDLL project.

17. After modifying the printer driver settings, call "dDocumentProperties" to store the modified settings.

18. Close the printer by calling dClosePrinter.

How to install the printer with a custom name?If you want to install the printer and all the printer components with a custom name, please follow these steps:1. Open the sample InstallShield project provided in the printer driver Resource Toolkit.2. The project contains a String table with the names of all the printer driver files and printer

driver components.3. Make the modifications you want. Also, if you renamed one or more files do not forget to

rename the files themselves and update the File groups that contain the renamed files.4. Rebuild the installation kit.

348292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 352: printer

How to install more than one printers?

Please follow the steps below to install more than one printer:You have to rename all the printer files except for BiImg.DLL.During the installation process, specify a separate print processor, port monitor, printer driver, port and printer names for each printer.(VERY IMPORTANT) Follow these steps for each printer.

2. Message Capture SampleThe “Message Capture Sample” directory contains a Visual C++ sample which demonstrates how to handle window messages sent by the printer driver and how to retrieve the name of the group file and the name and location of the generated image file.

3. Source of the User Interface DLLThis DLL contains the dialog box templates and all the string resources used by the printer driver. The resources can be modified, but no resource can be deleted. Deleting a resource will produce unpredictable results. If one or more controls from a dialog box should be hidden, do not delete the control, but hide it.The source code of this DLL can be located in the “ResourceDLL” folder.

4. Message Capture OCX ControlThe Message Capture OCX control is provided to help VB, Delphi, Visual FoxPro programmers handle printer driver messages easily from their application. The name of the OCX control is BiPrnDrv.ocx and it should be installed into the SYSTEM directory.

The Capture OCX can be found in the OCX directory in your RTK installation folder.To redistribute the OCX, you have to register the OCX with regsvr32.exe or with your installation package.

The OCX does not have any Black Ice DLL or OCX file dependency.

The BiPrnDrv.ocx file loads the following system DLLs:

-MFC42.DLL-MSVCRT.DLL-ADVAPI32.DLL-OLEAUT32.DLL-KERNEL32.DLL-GDI32.DLL-USER32.DLL

349292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 353: printer

-WINSPOOL.DRV-OLE32.DLL

If any of the above DLL is missing, the BiPrnDrv.ocx will not register correctly.

The Message Capture OCX control does not require a license file.

The OCX control exports the following Properties and Events:

PrinterName PropertyThis property contains the name of the printer the application wants to capture messages from.

StartDoc eventThe StartDoc event is fired when the selected printer starts to print a document. The parameter of this event is the name (with the full path) of the generated group file.

StartPage eventThe StartPage event is fired when the selected printer starts to print a new page. The parameter of this event is the actual page number.

EndPage eventThe EndPage event is fired when the selected printer finishes printing a page. The parameter of this event is the name (with the full path) of the generated image file.

EndDoc eventThe EndDoc event is fired when the selected printer finishes printing a document. The parameter of this event is the name (with the full path) of the generated group file.

5. VB Message Capture SampleThis sample demonstrates how to handle window messages sent by the printer driver and how to retrieve the name of the group file and the name and location of the generated image file.The VB 6 source code of this sample can be found in the “VB Message Capture sample” folder.

6 The BlackIceDEVMODE.DLLThe “BlackiceDEVMODE.DLL”is a tool to retrieve, modify and set the values of the printer DEVMODE. Setting the values of the printer DEVMODE will change the settings of the printer. The BlackiceDEVMODE.DLL can be found in the Resource Toolkit

350292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 354: printer

6.1 Description of the DLLThis DLL contains functions that can be used to modify the DevMode structure. You can set or retrieve the printer DevMode using the functions of the BlackIceDEVMODE.dll. You can open the DevMode, read and update values of members of DevMode structure and you can save changes to the selected Black Ice printer.

6.2 How to use the BlackIceDEVMODE.dllThe BlackIceDEVMODE.DLL can be linked statically or dynamically.For a static link, use the BlackIceDEVMODE.lib file. For a dynamic link, load the library with the LoadLibrary() API function and then use the GetProcAddress() API function to load the required functions from the BlackIceDEVMODE.DLL.

/* retrieve a function address from the dll */BOOL InitDll() { HMODULE hDLL; hDLL = LoadLibrary( DLL_PATH); if (hDLL) {

GetOrientation = (_GetOrientation)GetProcAddress(hDLL,szGetOrientation);if (!GetOrientation) {

AfxMessageBox("Error loading function"),MB_OK,0);return FALSE;

}}

/* declare a pointer to the BlackIceDEVMODE structure. The LoadBlackIceDEVMODE() function will allocate the required amount of memory for the pointer. */

BlackIceDEVMODE* pDevMode;

/* Before use other functions, load the devmode from the printer with the LoadBlackIceDEVMODE() function. */

pDevMode = LoadBlackIceDEVMODE(“Black Ice Color”);

if (!pDevMode) {sprintf(szMessage, "Error loading the devmode. Error no.: %d”,

BlackIce_GetLastError());AfxMessageBox(szMessage,MB_OK,0);return(0);

}if (!GetOrientation){

AfxMessageBox("Function not loaded from the DLL,MB_OK,0);}else {

351292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 355: printer

if( GetOrientation(pDevMode) == 1) {

// Portrait}else {

if( GetOrientation(pDevMode) == 2) {

// Landscape)else{

// wrong value;}

}}

/* To save the printer settings call the SaveBlackIceDEVMODE function. */

bSuccess = SaveBlackIceDEVMODE(“Black Ice Color”, pDevMode);if (!bSuccess){

wsprintf(szMessage, "Error saving the devmode. Error no.: %d", BlackIce_GetLastError());

AfxMessageBox(szMessage,MB_OK,0);}

/* At the end you should release the DEVMODE buffer allocated by the LoadBlackIceDEVMODE() function. You can use the ReleaseBlackIceDEVMODE function */

ReleaseBlackIceDEVMODE(pDevMode);

6.3 DLL Functions6.3.1The initialization functions

The BlackIceDEVMODE.DLL contains functions for loading and saving the DEVMODE.

6.3.1.1 BlackIce_GetLastErrorReturns the error code that occurred last in the system. This function helps to debug programs.

DWORD BlackIce_GetLastError();

Return value - The error code

6.3.1.2 LoadBlackIceDEVMODE

This function returns a pointer to a BlackIceDEVMODE structure. The settings of the specified printer can be accessed through the BlackIceDEVMODE structure. The function allocates the required amount of memory for the structure. The allocated memory must be freed by calling the ReleaseBlackIceDEVMODE() function.

352292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 356: printer

BlackIceDEVMODE* LoadBlackIceDEVMODE(LPCTSTR printername);

Input value: printer name - Printer Name (string)Return value - pointer to the BlackIceDEVMODE structure or NULL if loading

the DevMode failed.

6.3.1.3 ReleaseBlackIceDEVMODEThis function releases the memory allocated by the LoadBlackIceDEVMODE () function.

void ReleaseBlackIceDEVMODE(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure

6.3.1.4 SaveBlackIceDEVMODEUse this function to save the new settings to the printer.

BOOL SaveBlackIceDEVMODE(LPTSTR szPrinterName, BlackIceDEVMODE* pDevMode);

Input value: szPrinterName - Printer Name (string).Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the DevMode was successfully updated, otherwise

FALSE.

6.3.2Change the values of the DEVMODEThe description of the functions from the BlackIceDEVMODE.DLL are organized as the controls of the Printer Driver User Interface.

The Black Ice Printer Driver User Interface driver has 4 tab controls. 1. Device Settings2. File Formats3. Filename Generation4. Start Application

All the values from the user interface can be set programmatically using the functions from the BlackIceDEVMODE.DLL.

353292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 357: printer

6.3.3The “Device Settings” functions6.3.3.1 GetPaperSize

Returns the value of the dmPaperSize member of the DevMode. Represents the value of the 'Paper Size' combo box.

int GetPaperSize(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - paper size (integer number)

6.3.3.2 SetPaperSizeSets the dmPaperSize member of the DevMode. Sets the value of the 'Paper Size' combo box.

BOOL SetPaperSize(int papersize,BlackIceDEVMODE* pDevMode);

Input value: papersize - paper size (integer number).Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.3.3 GetPageWidthInPixelsReturns the value of the PaperWidthInPixels member of the BlackIceDEVMODE. Represents the value of the 'Paper Width' edit box.

DWORD GetPageWidthInPixels(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - paper width in pixels (DWORD number)

6.3.3.4 SetPaperWidthInPixelSets the PaperWidthInPixels member of the BlackIceDEVMODE. Sets the value of the 'Paper Width' edit box.

BOOL SetPaperWidthInPixel(DWORD paperwidth,BlackIceDEVMODE* pDevMode);

Input value: paperwidth - paper width in pixels (DWORD number).Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.3.5 GetPageHeightInPixelsReturns the value of the PaperHeightInPixels member of the BlackIceDEVMODE. Represents the value of the 'Paper Height' edit box.

DWORD GetPageHeightInPixels(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure

354292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 358: printer

Return value - paper height in pixels (DWORD number)

6.3.3.6 SetPaperHeightInPixelSets the PaperHeightInPixels member of the BlackIceDEVMODE. Sets the value of the 'Paper Height' edit box.

BOOL SetPaperHeightInPixel(DWORD paperheight, BlackIceDEVMODE* pDevMode);

Input value: paperheight - paper height in pixels (DWORD number).Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.3.7 GetFaxHeaderReturns the value of the FAXheader member of the BlackIceDEVMODE. Represents the value of the 'Fax header' edit box.

DWORD GetFaxHeader(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - fax header in pixels (DWORD number)

6.3.3.8 SetFaxHeaderSets the FAXheader member of the BlackIceDEVMODE. Sets the value of the 'Fax header' edit box.

BOOL SetFaxHeader(DWORD faxheader, BlackIceDEVMODE* pDevMode);

Input value: faxheader - fax header in pixels (DWORD number).Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.3.9 IsFaxOutputEnabledReturns the value of the BLF_FAXOUTPUT flag. Represents the value of the ‘Create Faxable Image’ checkbox.

BOOL IsFaxOutputEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if the FaxOutput is used, otherwise FALSE

6.3.3.10 EnableFaxOutputSets the BLF_FAXOUTPUT flag. Sets the value of the ‘Create Faxable Image’ checkbox.

BOOL EnableFaxOutput(BlackIceDEVMODE* pDevMode);

355292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 359: printer

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.3.11 DisableFaxOutputSets the BLF_FAXOUTPUT flag to 0 (false). Sets the value of the ‘Create Faxable Image’ checkbox UNCHECKED.

BOOL DisableFaxOutput(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.3.12 IsAdvancedPaperSizeEnabledReturns the value of the BLF_ADVANCEDPAPERSIZE flag. Represents the value of the ‘Advanced Papersize’ checkbox.

BOOL IsAdvancedPaperSizeEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if the Advanced Papersize is used, otherwise FALSE

6.3.3.13 EnableAdvancedPaperSizeSets the BLF_ADVANCEDPAPERSIZE flag. Sets the value of the ‘Advanced Papersize’ checkbox.

BOOL EnableAdvancedPaperSize(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.3.14 DisableAdvancedPaperSizeSets the BLF_ADVANCEDPAPERSIZE flag to 0 (false). Sets the value of the ‘Advanced Papersize’ checkbox UNCHECKED.

BOOL DisableAdvancedPaperSize(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.3.15 GetOrientationReturns the value of the dmOrientation member of the DevMode. Represents the value of the 'Orientation' radio button.

int GetOrientation(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure

356292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 360: printer

Return value - If the value is 1: the orientation is Portrait, if the value is 2: the orientation is Landscape

6.3.3.16 SetOrientationSets the dmOrientation member of the DevMode. Sets the value of the 'Orientation' radio button.

BOOL SetOrientation(int Orientation, BlackIceDEVMODE* pDevMode);

Input value: Orientation - Orientation (integer number) 1: Portrait, 2: Landscape.Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.3.17 IsRotatePaperEnabledReturns the value of the BLF_ROTATEPAPER flag. Represents the value of the ‘Rotate Landscape image to Portrait’ checkbox.

BOOL IsRotatePaperEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if Rotate Landscape image to Portrait is used, otherwise FALSE

6.3.3.18 EnableRotatePaperSets the BLF_ROTATEPAPER flag. Sets the value of the ‘Rotate Landscape image to Portrait’ checkbox.

BOOL EnableRotatePaper(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.3.19 DisableRotatePaperSets the BLF_ROTATEPAPER flag to 0 (false). Sets the value of the ‘Rotate Landscape image to Portrait’ checkbox UNCHECKED.

BOOL DisableRotatePaper(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.3.20 GetXDPIReturns the value of the dmPrintQuality member of the DevMode. Represents the value of the 'Horizontal Resolution' edit box.

int GetXDPI(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - Horizontal Resolution (integer number)

357292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 361: printer

6.3.3.21 SetXDPISets the dmPrintQuality member of the DevMode. Sets the value of the 'Horizontal Resolution' edit box.

BOOL SetXDPI(int xdpi, BlackIceDEVMODE* pDevMode);

Input value: xdpi - Horizontal Resolution (integer number)Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.3.22 GetYDPIReturns the value of the dmYResolutionmember of the DevMode. Represents the value of the 'Vertical Resolution' edit box.

int GetYDPI(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - Vertical Resolution (integer number)

6.3.3.23 SetYDPISets the dmYResolutionmember of the DevMode. Sets the value of the 'Vertical Resolution' edit box.

BOOL SetYDPI(int ydpi, BlackIceDEVMODE* pDevMode);

Input value: ydpi - Vertical Resolution (integer number)Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.he flag was successfully set, otherwise FALSE.

6.3.3.24 IsFaxLowOutputEnabled

Returns the value of the BLF_LOWFAXRES flag. If true, the low fax resolution (204x98) is selected, if false the Fine Fax resolution (204x196) is selected when the ‘Create Faxable Image’ option is selected.

BOOL IsLowFaxOutputEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if Low Fax Output is used, otherwise FALSE

6.3.3.25 EnableLowFaxOutput

358292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 362: printer

Sets the BLF_ LOWFAXRES flag. Sets the value of the fax resolution when the ‘Create Faxable Image’ checkbox is selected.

BOOL EnableLowFaxOutput(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.3.26 DisableLowFaxOutput

Sets the BLF_ LOWFAXRES flag 0 (false). Sets the value of the fax resolution when the ‘Create Faxable Image’ checkbox is selected.

BOOL DisableLowFaxOutput(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.4The “File Formats” functions6.3.4.1 GetFileFormat

Returns the value of the Format member of the BlackIceDEVMODE. Represents the value of the 'File Format' combo box.

DWORD GetFileFormat(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - File Format (DWORD number)

6.3.4.2 SetFileFormatSets the Format member of the BlackIceDEVMODE. Sets the value of the 'File Format' combo box.

BOOL SetFileFormat(DWORD fileformat, BlackIceDEVMODE* pDevMode);

359292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 363: printer

Input value: fileformat - File Format (DWORD number).Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.4.3 GetLossRatioReturns the value of the LossRatio member of the BlackIceDEVMODE. Represents the value of the 'JPEG loss ratio' slider.

DWORD GetLossRatio(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - JPEG loss ratio (DWORD number)

6.3.4.4 SetLossRatioSets the LossRatio member of the BlackIceDEVMODE. Sets the value of the 'JPEG loss ratio' slider.

BOOL SetLossRatio(DWORD lossratio, BlackIceDEVMODE* pDevMode);

Input value: lossratio - JPEG loss ratio (DWORD number).Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.4.5 GetColorDepthReturns the value of the ColorMode member of the BlackIceDEVMODE. Represents the value of the 'Color Depth' radio button.

DWORD GetColorDepth(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - Color Depth (DWORD number)

6.3.4.6 SetColorDepthSets the ColorMode member of the BlackIceDEVMODE. Sets the value of the 'Color Depth' radio button.

BOOL SetColorDepth(DWORD colordepth, BlackIceDEVMODE* pDevMode);

Input value: colordepth - Color Depth (DWORD number).Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.4.7 IsMultipageImageEnabledReturns the value of the BLF_MULTIIMAGE flag. Represents the value of the ‘Create Multipage Image’ checkbox.

BOOL IsMultipageImageEnabled(BlackIceDEVMODE* pDevMode);

360292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 364: printer

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if Create Multipage Image is used, otherwise FALSE

6.3.4.8 EnableMultipageImageSets the BLF_MULTIIMAGE flag. Sets the value of the ‘Create Multipage Image’ checkbox.

BOOL EnableMultipageImage(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.4.9 DisableMultipageImageSets the BLF_MULTIIMAGE flag to 0 (false). Sets the value of the ‘Create Multipage Image’ checkbox UNCHECKED.

BOOL DisableMultipageImage(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.4.10 IsAppendImageEnabledReturns the value of the BLF_MULTIIMAGE flag. Represents the value of the ‘Create Multipage Image’ checkbox.

BOOL IsAppendImageEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if Create Multipage Image is used, otherwise FALSE

6.3.4.11 EnableAppendImageSets the BLF_MULTIIMAGE flag. Sets the value of the ‘Create Multipage Image’ checkbox.

BOOL EnableAppendImage(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.4.12 DisableAppendImageSets the BLF_MULTIIMAGE flag to 0 (false). Sets the value of the ‘Create Multipage Image’ checkbox UNCHECKED.

BOOL DisableAppendImage(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

361292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 365: printer

6.3.4.13 IsDisableImageEnabledReturns the value of the BLF_DISABLEIMAGE flag. Represents the value of the 'Disable Image' checkbox.

BOOL IsDisableImageEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if Disable Image is used, otherwise FALSE

6.3.4.14 EnableDisableImageSets the BLF_DISABLEIMAGE flag. Sets the value of the 'Disable Image' checkbox.

BOOL EnableDisableImage(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.4.15 DisableDisableImageSets the BLF_DISABLEIMAGE flag to 0 (false). Sets the value of the 'Disable Image' checkbox UNCHECKED.

BOOL DisableDisableImage(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.4.16 IsEasternCharSupportEnabledReturns the value of the BLF_GLYPHSUPPORT flag. Represents the value of the 'Eastern Character Support' checkbox.

BOOL IsEasternCharSupportEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if Eastern Character Support is used, otherwise FALSE

6.3.4.17 EnableEasternCharSupportSets the BLF_GLYPHSUPPORT flag. Sets the value of the 'Eastern Character Support' checkbox.

BOOL EnableEasternCharSupport(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

362292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 366: printer

6.3.4.18 DisableEasternCharSupportSets the BLF_GLYPHSUPPORT flag to 0 (false). Sets the value of the 'Eastern Character Support' checkbox UNCHECKED.

BOOL DisableEasternCharSupport(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.4.19 IsWriteTextEnabledReturns the value of the BLF_WRITETEXT flag. Represents the value of the 'Write Text File' checkbox.

BOOL IsWriteTextEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if the Write Text File is used, otherwise FALSE

6.3.4.20 EnableWriteTextSets the BLF_WRITETEXT flag. Sets the value of the 'Write Text File' checkbox.

BOOL EnableWriteText(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.4.21 DisableWriteTextSets the BLF_WRITETEXT flag to 0 (false). Sets the value of the 'Write Text File' checkbox UNCHECKED.

BOOL DisableWriteText(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.4.22 IsMailMergeEnabledReturns the value of the BLF_MAILMERGE flag. Represents the value of the ‘Mail Merge’ checkbox.

BOOL IsMailMergeEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if the WriteText File is used, otherwise FALSE

6.3.4.23 EnableMailMergeSets the BLF_MAILMERGE flag. Sets the value of the ‘Mail Merge’ checkbox.

363292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 367: printer

BOOL EnableMailMerge(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.4.24 DisableMailMergeSets the BLF_MAILMERGE flag to 0 (false). Sets the value of the ‘Mail Merge’ checkbox UNCHECKED.

BOOL DisableMailMerge(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.4.25 IsAdvancedTextEnabledReturns the value of the BLF_ADVANCEDTEXT flag. Represents the value of the 'Save position and style' checkbox.

BOOL IsAdvancedTextEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if Save position and style is used, otherwise FALSE

6.3.4.26 EnableAdvancedTextSets the BLF_ADVANCEDTEXT flag. Sets the value of the 'Save position and style' checkbox.

BOOL EnableAdvancedText(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.4.27 DisableAdvancedTextSets the BLF_ADVANCEDTEXT flag to 0 (false). Sets the value of the 'Save position and style' checkbox UNCHECKED.

BOOL DisableAdvancedText(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.4.28 IsInternetTiffFormatEnabledReturns the value of the BLF_INTERNETTIFF flag. Represents the value of the ‘Internet TIFF format’ checkbox.

BOOL IsInternetTiffFormatEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure

364292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 368: printer

Return value - TRUE if Internet TIFF format is used, otherwise FALSE

6.3.4.29 EnableInternetTiffFormatSets the BLF_INTERNETTIFF flag. Sets the value of the ‘Internet TIFF format’ checkbox.

BOOL EnableInternetTiffFormat(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.4.30 DisableInternetTiffFormatSets the BLF_INTERNETTIFF flag to 0 (false). Sets the value of the ‘Internet TIFF format’ checkbox UNCHECKED.

BOOL DisableInternetTiffFormat(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.4.31 IsReverseBitOrderEnabledReturns the value of the BLF_REVERSEFILLORDER flag. Represents the value of the ‘Reverse Bit Order in TIFF’ checkbox.

BOOL IsReverseBitOrderEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if the Reverse Bit Order in TIFF is used, otherwise FALSE

6.3.4.32 EnableReverseBitOrderSets the BLF_REVERSEFILLORDER flag. Sets the value of the ‘Reverse Bit Order in the TIFF’ checkbox.

BOOL EnableReverseBitOrder(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.4.33 DisableReverseBitOrderSets the BLF_REVERSEFILLORDER flag to 0 (false). Sets the value of the ‘Reverse Bit Order in the TIFF’ checkbox UNCHECKED.

BOOL DisableReverseBitOrder(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

365292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 369: printer

6.3.4.34 IsPageNumberingEnabled Returns the value of the BLF_PAGENUMBERING flag. Represents the value of the ‘Add Page Numbering Tag’ checkbox.

BOOL IsPageNumberingEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if the Add Page Numbering Tag is used, otherwise FALSE

6.3.4.35 EnablePageNumberingSets the BLF_PAGENUMBERING flag. Sets the value of the ‘Add Page Numbering Tag’ checkbox.

BOOL EnablePageNumbering(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.4.36 DisablePageNumberingSets the BLF_PAGENUMBERING flag to 0 (false). Sets the value of the ‘Add Page Numbering Tag’ checkbox UNCHECKED.

BOOL DisablePageNumbering(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.4.37 GetDitheringReturns the value of the Dithering member of the BlackIceDEVMODE. Represents the value of the 'Photo Quality' radio button.

DWORD GetDithering(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - Photo Quality (DWORD number)

6.3.4.38 SetDitheringSets the Dithering member of the BlackIceDEVMODE. Sets the value of the 'Photo Quality' radio button.

BOOL SetDithering(DWORD dithering, BlackIceDEVMODE* pDevMode);

Input value: dithering - Photo Quality (DWORD number).Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

366292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 370: printer

6.3.4.39 GetBrightnessReturns the value of the Brightness member of the BlackIceDEVMODE. Represents the value of the 'Intensity' slider.

DWORD GetBrightness(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - Intensity (DWORD number)

6.3.4.40 SetBrightnessSets the Brightness member of the BlackIceDEVMODE. Sets the value of the 'Intensity' slider.

BOOL SetBrightness(DWORD brightness, BlackIceDEVMODE* pDevMode);

Input value: brightness - Intensity (DWORD number).Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.5The “Filename Generation” functions6.3.5.1 GetFileGenerationMethod

Returns the value of the FileNameGenerationFlags member of the BlackIceDEVMODE. Represents the value of the 'File Name Generation Method' combo box.

DWORD GetFileGenerationMethod(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - File Name Generation Method (DWORD number)

6.3.5.2 SetFileGenerationMethodSets the FileNameGenerationFlags member of the BlackIceDEVMODE. Sets the value of the 'File Name Generation Method' combo box.

BOOL SetFileGenerationMethod(DWORD fnamegen, BlackIceDEVMODE* pDevMode);

Input value: fnamegen - File Name Generation Method (DWORD number).Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.5.3 GetFileNamePrefixReturns the value of the FileNamePrefix member of the BlackIceDEVMODE. Represents the value of the 'File Name Prefix' edit box.

LPCTSTR GetFileNamePrefix(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure

367292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 371: printer

Return value - File Name Prefix (string)

6.3.5.4 SetFileNamePrefixSets the FileNamePrefix member of the BlackIceDEVMODE. Sets the value of the 'File Name Prefix' edit box.

BOOL SetFileNamePrefix(LPCTSTR fnamepref, BlackIceDEVMODE* pDevMode);

Input value: fnamepref - File Name Prefix (string)Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.5.5 GetFileExtensionReturns the value of the FileExtension member of the BlackIceDEVMODE. Represents the value of the 'File Name Extension' edit box.

LPCTSTR GetFileExtension(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - File Name Extension (string)

6.3.5.6 SetFileExtensionSets the FileExtension member of the BlackIceDEVMODE. Sets the value of the 'File Name Extension' edit box.

BOOL SetFileExtension(LPCTSTR fnameext, BlackIceDEVMODE* pDevMode);

Input value: fnameext - File Name Extension (string)

Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.5.7 IsCustomExtensionEnabledReturns the value of the BLF_CUSTOMEXT flag. Represents the value of the 'Use Custom Extension' checkbox.

BOOL IsCustomExtensionEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if the Use Custom Extension is used, otherwise FALSE

6.3.5.8 EnableCustomExtensionSets the BLF_CUSTOMEXT flag. Sets the value of the 'Use Custom Extension' checkbox.

BOOL EnableCustomExtension(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.

368292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 372: printer

Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.5.9 DisableCustomExtensionSets the BLF_CUSTOMEXT flag to 0 (false). Sets the value of the 'Use Custom Extension' checkbox UNCHECKED.

BOOL DisableCustomExtension(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.5.10 GetINIFileNameReturns the value of the INIFileName member of BlackIceDEVMODE. Represents the value of the 'INI File Name'/'Registry path'/etc. edit box.

LPCTSTR GetINIFileName(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - INI File Name/Registry Path/etc. (string)

6.3.5.11 SetINIFileNameSets the INIFileName member of the BlackIceDEVMODE. Sets the value of the 'INI File Name'/'Registry path'/etc. edit box.

BOOL SetINIFileName(LPCTSTR inifname, BlackIceDEVMODE* pDevMode);

Input value: inifname - INI File Name/Registry Path/etc. (string)Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.5.12 GetImageFileNameReturns the value of the FileImageName member of the BlackIceDEVMODE. Represents the value of the 'File Image Name' edit box if the Filename Generation method is ‘Exact filename’.

LPCTSTR GetImageFileName(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - Image Filename (string)

6.3.5.13 SetImageFileNameSets the FileImageName member of the BlackIceDEVMODE. Sets the value of the 'File Image Name' edit box if the Filename Generation method is ‘Exact filename’.

BOOL SetImageFileName(LPCTSTR filename, BlackIceDEVMODE* pDevMode);

Input value: filename - Exact Filename (string)Input value: pDevMode - pointer to the BlackIceDEVMODE structure.

369292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 373: printer

Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.5.14 IsKeepExistingFilesEnabledReturns the value of the BLF_KEEPFILES flag. Represents the value of the 'Keep existing files' checkbox.

BOOL IsKeepExistingFilesEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if Keep existing files is used, otherwise FALSE

6.3.5.15 EnableKeepExistingFilesSets the BLF_KEEPFILES flag. Sets the value of the 'Keep existing files' checkbox.

BOOL EnableKeepExistingFiles(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.5.16 DisableKeepExistingFilesSets the BLF_KEEPFILES flag 0 (false). Sets the value of the 'Keep existing files' checkbox UNCHECKED.

BOOL DisableKeepExistingFiles(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.5.17 GetOutputDirectoryReturns the value of the OutputDirectory member of the BlackIceDEVMODE. Represents the value of the 'Output Directory' edit box.

LPCTSTR GetOutputDirectory(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - Output Directory (string)

6.3.5.18 SetOutputDirectorySets the OutputDirectory member of the BlackIceDEVMODE. Sets the value of the 'Output Directory' edit box.

BOOL SetOutputDirectory(LPCTSTR outputdir, BlackIceDEVMODE* pDevMode);

Input value: outputdir - Output Directory (string)Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

370292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 374: printer

6.3.5.19 IsGroupFileDisabledReturns the value of the BLF_DISABLEGROUPFILE flag. Represents the value of the 'Disable Group File' checkbox.

BOOL IsGroupFileDisabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if Disable Group File is used, otherwise FALSE

6.3.5.20 DisableGroupFileSets the BLF_DISABLEGROUPFILE flag. Sets the value of the 'Disable Group File' checkbox.

BOOL DisableGroupFile(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.5.21 EnableGroupFileSets the BLF_DISABLEGROUPFILE flag to 0 (false). Sets the value of the 'Disable Group File' checkbox UNCHECKED.

BOOL EnableGroupFile(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.5.22 IsDeleteGroupFileEnabledReturns the value of the BLF_DELETEGROUPFILE flag. Represents the value of the 'Delete Group File After Printing' checkbox.

BOOL IsDeleteGroupFileEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if Delete Group File After Printing is used, otherwise FALSE

6.3.5.23 EnableDeleteGroupFileSets the BLF_DELETEGROUPFILE flag. Sets the value of the 'Delete Group File After Printing' checkbox.

BOOL EnableDeleteGroupFile(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

371292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 375: printer

6.3.5.24 DisableDeleteGroupFileSets the BLF_DELETEGROUPFILE flag to 0 (false). Sets the value of the 'Delete Group File After Printing' checkbox UNCHECKED.

BOOL DisableDeleteGroupFile(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.6The “Start Application” functions6.3.6.1 IsStartApplicationEnabled

Returns the value of the BLF_LAUNCHAPP flag. Represents the value of the 'Enable Start Application' checkbox.

BOOL IsStartApplicationEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if the Enable Start Application is used, otherwise FALSE

6.3.6.2 EnableStartApplicationSets the BLF_LAUNCHAPP flag. Sets the value of the 'Enable Start Application' checkbox.

BOOL EnableStartApplication(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.6.3 DisableStartApplicationSets the BLF_LAUNCHAPP flag to 0 (false). Sets the value of the 'Enable Start Application' checkbox UNCHECKED.

BOOL DisableStartApplication(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.6.4 GetApplicationPathReturns the value of the ApplicationPath member of the BlackIceDEVMODE. Represents the value of the 'Output Directory' edit box.

LPCTSTR GetApplicationPath(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - Application Path (string)

372292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 376: printer

6.3.6.5 SetApplicationPathSets the ApplicationPath member of the BlackIceDEVMODE. Sets the value of the 'Application Path' edit box.

BOOL SetApplicationPath(LPCTSTR applicationpath, BlackIceDEVMODE* pDevMode);

Input value: applicationpath - Application Path (string)Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.6.6 IsStartBeforePrintReturns the value of the BLF_STARTBEFOREPRINT flag. Represents the value of the 'Start Before Printing' radio button.

BOOL IsStartBeforePrint(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if Start Before Printing is used, otherwise FALSE (The driver will start

the application after printing)

6.3.6.7 EnableStartBeforePrintSets the BLF_STARTBEFOREPRINT flag. Sets the value of the 'Start Before Printing' radio button.

BOOL EnableStartBeforePrint(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.6.8 DisableStartBeforePrintSets the BLF_STARTBEFOREPRINT flag to 0 (false). Sets the value of the 'Start Before Printing' radio button UNCHECKED. (Sets the value of the 'Start After Printing' radio button CHECKED)

BOOL DisableStartBeforePrint(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.6.9 IsPassParametersEnabledReturns the value of the BLF_PASSPARAMETERS flag. Represents the value of the 'Pass Parameters' checkbox.

BOOL IsPassParametersEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if the Pass Parameters is used, otherwise FALSE

373292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 377: printer

6.3.6.10 EnablePassParametersSets the BLF_PASSPARAMETERS flag. Sets the value of the 'Pass Parameters' checkbox.

BOOL EnablePassParameters(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.6.11 DisablePassParametersSets the BLF_PASSPARAMETERS flag to 0 (false). Sets the value of the 'Pass Parameters' checkbox UNCHECKED.

BOOL DisablePassParameters(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.6.12 IsStartNormalReturns the value of the BLF_STARTNORMAL flag. Represents the value of the 'Normal' radio button.

BOOL IsStartNormal(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if the Start Application In a Normal Window is used, otherwise FALSE

6.3.6.13 EnableStartNormalSets the BLF_STARTNORMAL flag. Sets the value of the 'Normal' radio button. The driver will start the application In a Normal window

BOOL EnableStartNormal(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.6.14 DisableStartNormalSets the BLF_STARTNORMAL flag to 0 (false). Sets the value of the 'Normal' radio button UNCHECKED.

BOOL DisableStartNormal(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

374292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 378: printer

6.3.6.15 IsStartMinimizedReturns the value of the BLF_STARTMINIMIZED flag. Represents the value of the 'Minimized' radio button.

BOOL IsStartMinimized(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if Start Application In a Minimized Window is used, otherwise FALSE

6.3.6.16 EnableStartMinimizedSets the BLF_STARTMINIMIZED flag. Sets the value of the 'Minimized' radio button. The driver will start the application In a Minimized window

BOOL EnableStartMinimized(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.6.17 DisableStartMinimizedSets the BLF_STARTMINIMIZED flag to 0 (false). Sets the value of the 'Minimized' radio button UNCHECKED.

BOOL DisableStartMinimized(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.6.18 IsStartHiddenReturns the value of the BLF_STARTHIDDEN flag. Represents the value of the 'Hidden' radio button.

BOOL IsStartHidden(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if Start Application Hidden is used, otherwise FALSE

6.3.6.19 EnableStartHiddenSets the BLF_STARTHIDDEN flag. Sets the value of the 'Hidden' radio button. The driver will start the application Hidden

BOOL EnableStartHidden(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

375292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 379: printer

6.3.6.20 DisableStartHiddenSets the BLF_STARTHIDDEN flagb to 0 (false). Sets the value of the 'Hidden' radio button UNCHECKED.

BOOL DisableStartHidden(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.6.21 IsMessagingInterfaceEnabledReturns the value of the BLF_SENDMESSAGE flag. Represents the value of the 'Disable the Messaging Interface' checkbox.

BOOL IsMessagingInterfaceEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if the Messaging Interface is used (the check box is unchecked),

otherwise FALSE (Messaging Interface will not be used and the check box is checked)

6.3.6.22 EnableMessagingInterfaceSets the BLF_SENDMESSAGE flag. Sets the value of the 'Disable the Messaging Interface' checkbox UNCHECKED. The driver will use the Messaging Interface.

BOOL EnableMessagingInterface(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.

Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.6.23 DisableMessagingInterfaceSets the BLF_SENDMESSAGE flag to 0 (false). Sets the value of the 'Disable the Messaging Interface' checkbox. The driver will not use the Messaging Interface.

BOOL DisableMessagingInterface(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.7Functions which aren’t in “preferences” form6.3.7.1 GetInterfaceName

Returns the value of the InterfaceName member of the BlackIceDEVMODE. The InterfaceName member stores the name of the messaging interface.

LPCTSTR InterfaceName(BlackIceDEVMODE* pDevMode);

376292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 380: printer

Input value - pointer to the BlackIceDEVMODE structureReturn value - Interface Name (string)

6.3.7.2 SetInterfaceNameSets the InterfaceName member of the BlackIceDEVMODE. The InterfaceName member stores the name of the messaging interface.

BOOL SetInterfaceName(LPCTSTR intfname, BlackIceDEVMODE* pDevMode);

Input value: intfname - Interface Name (string)Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.7.3 GetPaperLengthReturns the value of the dmPaperLength member of the DevMode. (DM.dmPaperLength member of the BlackIceDEVMODE ) This value represents the 'Actual paper length'.

int GetPaperLength(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - Actual paper length (integer number)

6.3.7.4 SetPaperLengthSets the dmPaperLength member of the DevMode. (DM.dmPaperLength member of the BlackIceDEVMODE ) This value represents the 'Actual paper length'.

BOOL SetPaperLength(int paperlength, BlackIceDEVMODE* pDevMode);

Input value: paperlength - Actual paper length (integer number).Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.7.5 IsTiffDllEnabledReturns the value of the BLF_ENABLETIFFDLL flag. If the flag is set, the printer driver will load the TIFF32.DLL. This flag can only be set programmatically.

BOOL IsTiffDllEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if the TIFF32.DLL is enabled, otherwise FALSE

6.3.7.6 EnableTiffDllSets the BLF_ENABLETIFFDLL flag. If the flag is set, the printer driver will load the TIFF32.DLL. This flag can only be set programmatically.

BOOL EnableTiffDll(BlackIceDEVMODE* pDevMode);

377292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 381: printer

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.7.7 DisableTiffDllSets the BLF_ENABLETIFFDLL flag to 0 (false). If the flag is set, the printer driver will load the JPEG32.DLL. This flag can only be set programmatically.

BOOL DisableTiffDll(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.7.8 IsJpegDllEnabledReturns the value of the BLF_ENABLEJPEGDLL flag. If the flag is set, the printer driver will load the JPEG32.DLL. This flag can only be set programmatically.

BOOL IsJpegDllEnabled(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - TRUE if the JPEG32.DLL is enabled, otherwise FALSE

6.3.7.9 EnableJpegDllSets the BLF_ENABLEJPEGDLL flag. If the flag is set, the printer driver will load the JPEG32.DLL. This flag can only be set programmatically.

BOOL EnableJpegDll(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set, otherwise FALSE.

6.3.7.10 DisableJpegDllSets the BLF_ENABLEJPEGDLL flag to 0 (false). If the flag is set, the printer driver will load the JPEG32.DLL. This flag can only be set programmatically.

BOOL DisableJpegDll(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

6.3.7.11 GetTIFFDLLNameReturns the value of the TIFFDLLName member of the BlackIceDEVMODE. The TIFFDLLName member stores the name and path of the TIFF32.DLL. This DLL encodes the TIFF files. The file is needed for TIFF output.

LPCTSTR GetTIFFDLLName(BlackIceDEVMODE* pDevMode);

378292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 382: printer

Input value - pointer to the BlackIceDEVMODE structureReturn value - TIFFDLLName (string)

6.3.7.12 SetTIFFDLLNameSets the TIFFDLLName member of the BlackIceDEVMODE. The TIFFDLLName member stores the name and path of the TIFF32.DLL. This DLL encodes the TIFF files. The file is needed for TIFF output.

BOOL SetTIFFDLLName(LPCTSTR stringtiffdll, BlackIceDEVMODE* pDevMode);

Input value: stringtiffdll - TIFFDLLName (string)Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.7.13 GetJPEGDLLNameReturns the value of the JPEGDLLName member of the BlackIceDEVMODE. The JPEGDLLName member stores the name and path of the JPEG32.DLL. This DLL encodes the Jpeg files. The file is needed for Jpeg output.

LPCTSTR GetJPEGDLLName(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - JPEGDLLName (string)

6.3.7.14 SetJPEGDLLNameSets the JPEGDLLName member of the BlackIceDEVMODE. The JPEGDLLName member stores the name and path of the JPEG32.DLL. This DLL encodes the Jpeg files. The file is needed for Jpeg output.

BOOL SetJPEGDLLName(LPCTSTR stringjpegdll, BlackIceDEVMODE* pDevMode);

Input value: stringjpegdll - JPEGDLLName (string)Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.7.15 GetResourceDLLNameReturns the value of the ResourceDLLName member of the BlackIceDEVMODE. The ResourceDLLName member stores the name and path of the driver resource DLL

LPCTSTR GetResourceDLLName(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - ResourceDLLName (string)

379292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 383: printer

6.3.7.16 SetResourceDLLNameSets the ResourceDLLName member of the BlackIceDEVMODE. The ResourceDLLName member stores the name and path of the driver resource DLL

BOOL SetResourceDLLName(LPCTSTR stringresdll, BlackIceDEVMODE* pDevMode);

Input value: stringresdll - ResourceDLLName (string)Input value: pDevMode - pointer to the BlackIceDEVMODE structure.Return value - TRUE if the member was successfully set, otherwise FALSE.

6.3.7.17 GetBitsPerPixelReturns the value of the color depth in pixels. If the Color Depth is BITS_1, the return value is 1 If the Color Depth is BITS_8, the return value is 8 If the Color Depth is BITS_8GRAY, the return value is 8 If the Color Depth is BITS_24, the return value is 24

DWORD GetResourceDLLName(BlackIceDEVMODE* pDevMode);

Input value - pointer to the BlackIceDEVMODE structureReturn value - Color depth in pixels (DWORD number)

380292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 384: printer

7 C++ Sample - how to modify the printer settings programmatically

This sample demonstrates how to use the BlackIceDEVMODE. DLL functions. The sample shows how to programmatically change the printer settings.

The ‘PrinterSettings’ program allows users to change settings of the Black Ice printers. It is a dialog based MFC application.

There are five button in the form: OK: saves the settings and exits the program. Cancel: exits the program without changing the printer settings Apply: save the settings without exiting. You can continue to modify the controls. Open printer: closes the currently opened printer and tries to open the printer specified

in the “Printer Name” edit box.

381292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 385: printer

7.1 How the PrinterSettings program works:The “InitDll()” function is called to load the BlackIceDEVMODE.dll functions. Then the “OpenAndFill()” function is called..The “OpenAndFill()” function opens the printer and fills the controls with the values of the printer settings (values from the retrieved DEVMODE structure).If all of value are correct, the new values of the DEVMODE are saved to the printer using the “SaveBlackIceDEVMODE( )” function.

8 The BlackIceDEVMODE.OCXThe BlackceDEVMODE.OCX is distributed in the Resource Toolkit.

8.1 Description of the OCXThis is an Active X Control for Visual Basic, Delphi or any development tool that can use an OCX control. The BlackIceDEVMODE.OCX contains methods that can be used to modify the DevMode structure. You can reach the printer devmode through the methods of the BlackIceDEVMODE.OCX. You can open the devmode, read and update the values of the members of the devmode structure and you can save the changes to the selected Black Ice printer. NOTE:The BlackIceDEVMODE.OCX calls functions from the BlackIceDEVMODE.DLL, therefore the BlackIceDEVMODE.DLL has to be in the directory of the OCX or in the system path. The BlackIceDEVMODE OCX will not work without the BlackIceDEVMODE.DLL.

8.2 How to use the BlackIceDEVMODE.ocxThe BlackIceDEVMODE.OCX can be used like any other standard OCX control.

First load the printer settings using the LoadBlackIceDEVMODE() method.

Dim pBlackIceDEVMODE As Long 'pointer to the devmode

pBlackIceDEVMODE = Form1.BlackIceDEVMODE1.LoadBlackIceDEVMODE(PrinterName)If pBlackIceDEVMODE = 0 Then MsgBox "Cannot open '" & PrinterName & "' Printer driver", _ vbExclamation + vbOKOnly End End If

In the sample below you can see how to read or modify the page orientation of the printer.

'read the Orientation If Form1.BlackIceDEVMODE1.GetOrientation(pBlackIceDEVMODE) = 1 Then

382292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 386: printer

'Portrait . . . Else 'Landscape . . . End If

'set to Portrait bSuccess = Form1.BlackIceDEVMODE1.SetOrientation(1, pBlackIceDEVMODE) If (bSuccess = False) Then MsgBox "Error in calling Active X function: 'SetOrientation'" End If

To save settings call SaveBlackIceDEVMODE function. The return value sign whether the saving was successful or not.

bSuccess = Form1.BlackIceDEVMODE1.SaveBlackIceDEVMODE(PrinterName, pBlackIceDEVMODE)If (bSuccess = False) Then MsgBox ("Error saving the devmode") Exit SubEnd If

When you are finished you have to release the memory allocated by the LoadBlackIceDEVMODE method. You can use the ReleaseBlackIceDEVMODE method:

Call Form1.BlackIceDEVMODE1.ReleaseBlackIceDEVMODE(pBlackIceDEVMODE)

8.3 Methods of the BlackIceDEVMODE.OCX Modifying these members and flags of the devmode structure will call next functionsThe return values of the ‘Is…Enabled(pBlackIceDEVMODE)’ functions are the values of the flags.The return values of the ‘Enable….(pBlackIceDEVMODE)’ and ‘Disable…(pBlackIceDEVMODE)’ functions are the error the handling values. If the return value is True, the modifications were successful, if False the modifications were unsuccessful.The return value of the ‘Get…(pBlackIceDEVMODE)’ function is the value of the member of DevMode.The return value of the ‘Set…(param1, pBlackIceDEVMODE)’ function is the error handling value. If the return value is True, the member was successfully set to param1, if False the member was unsuccessfully set to param1.

8.3.1The initialization functionsTo set the Printer Driver settings you have to set the values of the printer DEVMODE. The BlackIceDEVMODE.OCX contains methods to load, save and modify the printer settings.

383292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 387: printer

8.3.1.1 LoadBlackIceDEVMODEThis method returns a long value that represents the BlackIceDEVMODE handle. This handle is used by the rest of the methods to read and modify the settings of the printer.The LoadBlackIceDEVMODE method allocates the memory space required for the DevMode structure ( for the printer settings). NOTE: The memory must be freed using the ReleaseBlackIceDEVMODE method.

LoadBlackIceDEVMODE(PrinterName As String) As Long

Input value: PrinterName - Printer NameReturn value - handle to the BlackIceDEVMODE. If the return value is 0, the

DevMode loading failed.

8.3.1.2 ReleaseBlackIceDEVMODEThis method frees the memory allocated for the printer settings representetd by the BlackIceDEVMODE handle.

ReleaseBlackIceDEVMODE(pBlackIceDEVMODE) As Long

Input value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE

8.3.1.3 SaveBlackIceDEVMODEThis method will save the new printer settings.

SaveBlackIceDEVMODE(szPrinterName As String, pBlackIceDEVMODE As Long) As Boolean

Input value: szPrinterName - Printer Name.Input value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE structure.Return value - TRUE if the DevMode was successfully updated,

otherwise FALSE.

8.3.2Change the printer settingsThe methods from the BlackIceDEVMODE.OCX are grouped as the controls of the Printer Driver User Interface. The Black Ice Printer Driver User Interface has 4 tab controls. 1. Device Settings2. File Formats3. Filename Generation4. Start Application

All the values from the user interface can be set programmatically using the functions from the BlackIceDEVMODE.OCX.

384292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 388: printer

8.3.3The “Device Settings” methods8.3.3.1 GetPaperSize

Returns the value of the dmPaperSize member of the DevMode. Represents the value of the 'Paper Size' combo box.

GetPaperSize(pBlackIceDEVMODE As Long) As Integer

Input value - handle to the BlackIceDEVMODEReturn value - paper size (integer number)

8.3.3.2 SetPaperSizeSets the dmPaperSize member of the DevMode. Sets the value of the 'Paper Size' combo box.

SetPaperSize(papersize As Integer, pBlackIceDEVMODE As Long ) As Boolean

Input value: papersize - paper sizeInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.3.3 GetPageWidthInPixelsReturns the value of the PaperWidthInPixels member of the BlackIceDEVMODE. Represents the value of the 'Paper Width' edit box.

GetPageWidthInPixels(pBlackIceDEVMODE As Long) As Long

Input value - handle to the BlackIceDEVMODEReturn value - paper width in pixels ( As a Long number)

8.3.3.4 SetPaperWidthInPixelSets the PaperWidthInPixels member of the BlackIceDEVMODE. Sets the value of the 'Paper Width' edit box.

SetPaperWidthInPixel(paperwidth As Long, pBlackIceDEVMODE As Long) As Boolean

Input value: paperwidth - paper width in pixels.Input value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.3.5 GetPageHeightInPixelsReturns the value of the PaperHeightInPixels member of the BlackIceDEVMODE. Represents the value of the 'Paper Height' edit box.

GetPageHeightInPixels(pBlackIceDEVMODE As Long) As Long

385292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 389: printer

Input value - handle to the BlackIceDEVMODEReturn value - paper height in pixels

8.3.3.6 SetPaperHeightInPixelSets the PaperHeightInPixels member of the BlackIceDEVMODE. Sets the value of the 'Paper Height' edit box.

SetPaperHeightInPixel(paperheight As Long, pBlackIceDEVMODE As Long) As Boolean

Input value: paperheight - paper height in pixels.Input value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.3.7 GetFaxHeaderReturns the value of the FAXheader member of the BlackIceDEVMODE. Represents the value of the 'Fax header' edit box.

GetFaxHeader(pBlackIceDEVMODE As Long) As Long

Input value - handle to the BlackIceDEVMODEReturn value - fax header in pixels

8.3.3.8 SetFaxHeaderSets the FAXheader member of the BlackIceDEVMODE. Sets the value of the 'Fax header' edit box.

Boolean SetFaxHeader( As Long faxheader, pBlackIceDEVMODE As Long) As

Input value: faxheader - fax header in pixels ( As Long number).Input value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.3.9 IsFaxOutputEnabledReturns the value of the BLF_FAXOUTPUT flag. Represents the value of the ‘Create Faxable Image’ checkbox.

IsFaxOutputEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if FaxOutput is used, otherwise FALSE

386292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 390: printer

8.3.3.10 EnableFaxOutputSets the BLF_FAXOUTPUT flag. Sets the value of the ‘Create Faxable Image’ checkbox.

EnableFaxOutput(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.3.11 DisableFaxOutputSets the BLF_FAXOUTPUT flag to 0 (false). Sets the value of the ‘Create Faxable Image’ checkbox UNCHECKED.

DisableFaxOutput(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.3.12 IsAdvancedPaperSizeEnabledReturns the value of the BLF_ADVANCEDPAPERSIZE flag. Represents the value of the ‘Advanced Papersize’ checkbox.

IsAdvancedPaperSizeEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if Advanced Papersize is used, otherwise FALSE

8.3.3.13 EnableAdvancedPaperSizeSets the BLF_ADVANCEDPAPERSIZE flag. Sets the value of the ‘Advanced Papersize’ checkbox.

EnableAdvancedPaperSize(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.3.14 DisableAdvancedPaperSizeSets the BLF_ADVANCEDPAPERSIZE flag to 0 (false). Sets the value of the ‘Advanced Papersize’ checkbox UNCHECKED.

DisableAdvancedPaperSize(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

387292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 391: printer

8.3.3.15 GetOrientationReturns the value of the dmOrientation member of the DevMode. Represents the value of the 'Orientation' radio button.

GetOrientation(pBlackIceDEVMODE As Long) As Integer

Input value - handle to the BlackIceDEVMODEReturn value - If the value is 1: the orientation is Portrait, if the value is 2: the orientation is

Landscape

8.3.3.16 SetOrientationSets the dmOrientation member of the DevMode. Sets the value of the 'Orientation' radio button.

SetOrientation(Orientation As Integer, pBlackIceDEVMODE As Long) As Boolean

Input value: Orientation - Orientation 1:Portrait, 2:Landscape.Input value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.3.17 IsRotatePaperEnabledReturns the value of the BLF_ROTATEPAPER flag. Represents the value of the ‘Rotate Landscape image to Portrait’ checkbox.

IsRotatePaperEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if Rotate Landscape image to Portrait is used, otherwise FALSE

8.3.3.18 EnableRotatePaperSets the BLF_ROTATEPAPER flag. Sets the value of the ‘Rotate Landscape image to Portrait’ checkbox.

EnableRotatePaper(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.3.19 DisableRotatePaperSets the BLF_ROTATEPAPER flag to 0 (false). Sets the value of the ‘Rotate Landscape image to Portrait’ checkbox UNCHECKED.

DisableRotatePaper(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.

Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.388

292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112© 1989 - 2001 Black Ice Software Inc.

Information Contained Is Not For Reproduction Or Distribution

Page 392: printer

8.3.3.20 GetXDPIReturns the value of the dmPrintQuality member of the DevMode. Represents the value of the 'Horizontal Resolution' edit box.

GetXDPI(pBlackIceDEVMODE As Long) As Integer

Input value - handle to the BlackIceDEVMODEReturn value - Horizontal Resolution (integer number)

8.3.3.21 SetXDPISets the dmPrintQuality member of the DevMode. Sets the value of the 'Horizontal Resolution' edit box.

SetXDPI(xdpi As Integer, pBlackIceDEVMODE As Long) As Boolean

Input value: xdpi - Horizontal ResolutionInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.3.22 GetYDPIReturns the value of the dmYResolutionmember of the DevMode. Represents the value of the 'Vertical Resolution' edit box.

GetYDPI(pBlackIceDEVMODE As Long) As Integer

Input value - handle to the BlackIceDEVMODEReturn value - Vertical Resolution

8.3.3.23 SetYDPISets the dmYResolutionmember of the DevMode. Sets the value of the 'Vertical Resolution' edit box.

SetYDPI(ydpi As Integer, pBlackIceDEVMODE As Long) As Boolean

Input value: ydpi - Vertical ResolutionInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.3.24 IsFaxLowOutputEnabled Returns the value of the BLF_LOWFAXRES flag. If true, the low fax resolution (204x98) is selected, if false the Fine Fax resolution (204x196) is selected when the ‘Create Faxable Image’ option is selected.

389292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 393: printer

BOOL IsLowFaxOutputEnabled(BlackIceDEVMODE* pDevMode);

Input value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if Low Fax resolution is selected, otherwise

FALSE.

8.3.3.25 EnableLowFaxOutput Sets the BLF_ LOWFAXRES flag. Sets the value of the fax resolution when the ‘Create Faxable Image’ checkbox is selected.

BOOL EnableLowFaxOutput(BlackIceDEVMODE* pDevMode);

Input value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.3.26 DisableLowFaxOutput Sets the BLF_ LOWFAXRES flag 0 (false). Sets the value of the fax resolution when the ‘Create Faxable Image’ checkbox is selected.

BOOL DisableLowFaxOutput(BlackIceDEVMODE* pDevMode);

Input value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

390292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 394: printer

8.3.4The “File Formats” methods8.3.4.1 GetFileFormat

Returns the value of the Format member of the BlackIceDEVMODE. Represents the value of the 'File Format' combo box.

GetFileFormat(pBlackIceDEVMODE As Long) As Long

Input value - handle to the BlackIceDEVMODEReturn value - File Format

8.3.4.2 SetFileFormatSets the Format member of the BlackIceDEVMODE. Sets the value of the 'File Format' combo box.

SetFileFormat(fileformat As Long, pBlackIceDEVMODE As Long) As Boolean

Input value: fileformat - File FormatInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.4.3 GetLossRatioReturns the value of the LossRatio member of the BlackIceDEVMODE. Represents the value of the 'JPEG loss ratio' slider.

GetLossRatio(pBlackIceDEVMODE As Long) As Long

Input value - handle to the BlackIceDEVMODEReturn value - JPEG loss ratio

8.3.4.4 SetLossRatioSets the LossRatio member of the BlackIceDEVMODE. Sets the value of the 'JPEG loss ratio' slider.

SetLossRatio(lossratio As Long, pBlackIceDEVMODE As Long) As Boolean

Input value: lossratio - JPEG loss ratioInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

391292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 395: printer

8.3.4.5 GetColorDepthReturns the value of the ColorMode member of the BlackIceDEVMODE. Represents the value of the 'Color Depth' radio button.

GetColorDepth(pBlackIceDEVMODE As Long) As Long

Input value - handle to the BlackIceDEVMODEReturn value - Color Depth

8.3.4.6 SetColorDepthSets the ColorMode member of the BlackIceDEVMODE. Sets the value of the 'Color Depth' radio button.

SetColorDepth(colordepth As Long, pBlackIceDEVMODE As Long) As Boolean

Input value: colordepth - Color DepthInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.4.7 IsMultipageImageEnabledReturns the value of the BLF_MULTIIMAGE flag. Represents the value of the ‘Create Multipage Image’ checkbox.

IsMultipageImageEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if Create Multipage Image is used, otherwise FALSE

8.3.4.8 EnableMultipageImageSets the BLF_MULTIIMAGE flag. Sets the value of the ‘Create Multipage Image’ checkbox.

EnableMultipageImage(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.4.9 DisableMultipageImageSets the BLF_MULTIIMAGE flag to 0 (false). Sets the value of the ‘Create Multipage Image’ checkbox UNCHECKED.

DisableMultipageImage(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

392292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 396: printer

8.3.4.10 IsAppendImageEnabledReturns the value of the BLF_MULTIIMAGE flag. Represents the value of the ‘Create Multipage Image’ checkbox.

IsAppendImageEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if Create Multipage Image is used, otherwise FALSE

8.3.4.11 EnableAppendImageSets the BLF_MULTIIMAGE flag. Sets the value of the ‘Create Multipage Image’ checkbox.

EnableAppendImage(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.4.12 DisableAppendImageSets the BLF_MULTIIMAGE flag to 0 (false). Sets the value of the ‘Create Multipage Image’ checkbox UNCHECKED.

DisableAppendImage(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.4.13 IsDisableImageEnabledReturns the value of the BLF_DISABLEIMAGE flag. Represents the value of the 'Disable Image' checkbox.

IsDisableImageEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if Disable Image is used, otherwise FALSE

8.3.4.14 EnableDisableImageSets the BLF_DISABLEIMAGE flag. Sets the value of the 'Disable Image' checkbox.

EnableDisableImage(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.4.15 DisableDisableImageSets the BLF_DISABLEIMAGE flag to 0 (false). Sets the value of the 'Disable Image' checkbox UNCHECKED.

393292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 397: printer

DisableDisableImage(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.4.16 IsEasternCharSupportEnabledReturns the value of the BLF_GLYPHSUPPORT flag. Represents the value of the 'Eastern Character Support' checkbox.

IsEasternCharSupportEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if Eastern Character Support is used, otherwise FALSE

8.3.4.17 EnableEasternCharSupportSets the BLF_GLYPHSUPPORT flag. Sets the value of the 'Eastern Character Support' checkbox.

EnableEasternCharSupport(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.4.18 DisableEasternCharSupportSets the BLF_GLYPHSUPPORT flag to 0 (false). Sets the value of the 'Eastern Character Support' checkbox UNCHECKED.

DisableEasternCharSupport(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.4.19 IsWriteTextEnabledReturns the value of the BLF_WRITETEXT flag. Represents the value of the 'Write Text File' checkbox.

IsWriteTextEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if Write Text File is used, otherwise FALSE

8.3.4.20 EnableWriteTextSets the BLF_WRITETEXT flag. Sets the value of the 'Write Text File' checkbox.

EnableWriteText(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.

394292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 398: printer

Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.4.21 DisableWriteTextSets the BLF_WRITETEXT flag to 0 (false). Sets the value of the 'Write Text File' checkbox UNCHECKED.

DisableWriteText(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.4.22 IsMailMergeEnabledReturns the value of the BLF_MAILMERGE flag. Represents the value of the ‘Mail Merge’ checkbox.

IsMailMergeEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if WriteText File is used, otherwise FALSE

8.3.4.23 EnableMailMergeSets the BLF_MAILMERGE flag. Sets the value of the ‘Mail Merge’ checkbox.

EnableMailMerge(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.4.24 DisableMailMergeSets the BLF_MAILMERGE flag to 0 (false). Sets the value of the ‘Mail Merge’ checkbox UNCHECKED.

DisableMailMerge(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.4.25 IsAdvancedTextEnabledReturns the value of the BLF_ADVANCEDTEXT flag. Represents the value of the 'Save position and style' checkbox.

IsAdvancedTextEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if Save position and style is used, otherwise FALSE

395292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 399: printer

8.3.4.26 EnableAdvancedTextSets the BLF_ADVANCEDTEXT flag. Sets the value of the 'Save position and style' checkbox.

EnableAdvancedText(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.4.27 DisableAdvancedTextSets the BLF_ADVANCEDTEXT flag to 0 (false). Sets the value of the 'Save position and style' checkbox UNCHECKED.

DisableAdvancedText(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.4.28 IsInternetTiffFormatEnabledReturns the value of the BLF_INTERNETTIFF flag. Represents the value of the ‘Internet TIFF format’ checkbox.

IsInternetTiffFormatEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if the Internet TIFF format is used, otherwise FALSE

8.3.4.29 EnableInternetTiffFormatSets the BLF_INTERNETTIFF flag. Sets the value of the ‘Internet TIFF format’ checkbox.

EnableInternetTiffFormat(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.4.30 DisableInternetTiffFormatSets the BLF_INTERNETTIFF flag to 0 (false). Sets the value of the ‘Internet TIFF format’ checkbox UNCHECKED.

DisableInternetTiffFormat(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.4.31 IsReverseBitOrderEnabledReturns the value of the BLF_REVERSEFILLORDER flag. Represents the value of the ‘Reverse Bit Order in TIFF’ checkbox.

396292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 400: printer

IsReverseBitOrderEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if the Reverse Bit Order in TIFF is used, otherwise FALSE

8.3.4.32 EnableReverseBitOrderSets the BLF_REVERSEFILLORDER flag. Sets the value of the ‘Reverse Bit Order in TIFF’ checkbox.

EnableReverseBitOrder(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.4.33 DisableReverseBitOrderSets the BLF_REVERSEFILLORDER flag to 0 (false). Sets the value of the ‘Reverse Bit Order in TIFF’ checkbox UNCHECKED.

DisableReverseBitOrder(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.4.34 IsPageNumberingEnabled Returns the value of the BLF_PAGENUMBERING flag. Represents the value of the ‘Add Page Numbering Tag’ checkbox.

IsPageNumberingEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if the Add Page Numbering Tag is used, otherwise FALSE

8.3.4.35 EnablePageNumberingSets the BLF_PAGENUMBERING flag. Sets the value of the ‘Add Page Numbering Tag’ checkbox.

EnablePageNumbering(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.4.36 DisablePageNumberingSets the BLF_PAGENUMBERING flag to 0 (false). Sets the value of the ‘Add Page Numbering Tag’ checkbox UNCHECKED.

DisablePageNumbering(pBlackIceDEVMODE As Long) As Boolean

397292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 401: printer

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.4.37 GetDitheringReturns the value of the Dithering member of the BlackIceDEVMODE. Represents the value of the 'Photo Quality' radio button.

GetDithering(pBlackIceDEVMODE As Long) As Long

Input value - handle to the BlackIceDEVMODEReturn value - Photo Quality

8.3.4.38 SetDitheringSets the Dithering member of the BlackIceDEVMODE. Sets the value of the 'Photo Quality' radio button.

SetDithering(dithering As Long, pBlackIceDEVMODE As Long) As Boolean

Input value: dithering - Photo QualityInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.4.39 GetBrightnessReturns the value of the Brightness member of the BlackIceDEVMODE. Represents the value of the 'Intensity' slider.

GetBrightness(pBlackIceDEVMODE As Long) As Long

Input value - handle to the BlackIceDEVMODEReturn value - Intensity

8.3.4.40 SetBrightnessSets the Brightness member of the BlackIceDEVMODE. Sets the value of the 'Intensity' slider. SetBrightness(brightness As Long, pBlackIceDEVMODE As Long) As Boolean

Input value: brightness - IntensityInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise FALSE.

398292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 402: printer

8.3.5The “Filename Generation” methods8.3.5.1 GetFileGenerationMethod

Returns the value of the FileNameGenerationFlags member of the BlackIceDEVMODE. Represents the value of the 'File Name Generation Method' combo box.

GetFileGenerationMethod(pBlackIceDEVMODE As Long) As Long

Input value - handle to the BlackIceDEVMODEReturn value - File Name Generation Method

8.3.5.2 SetFileGenerationMethodSets the FileNameGenerationFlags member of the BlackIceDEVMODE. Sets the value of the 'File Name Generation Method' combo box.

SetFileGenerationMethod(fnamegen As Long, pBlackIceDEVMODE As Long) As Boolean

Input value: fnamegen - File Name Generation MethodInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.5.3 GetFileNamePrefixReturns the value of the FileNamePrefix member of the BlackIceDEVMODE. Represents the value of the 'File Name Prefix' edit box.

GetFileNamePrefix(pBlackIceDEVMODE As Long) As String

Input value - handle to the BlackIceDEVMODEReturn value - File Name Prefix

8.3.5.4 SetFileNamePrefixSets the FileNamePrefix member of the BlackIceDEVMODE. Sets the value of the 'File Name Prefix' edit box.

SetFileNamePrefix(fnamepref As String, pBlackIceDEVMODE As Long) As Boolean

Input value: fnamepref - File Name PrefixInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

399292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 403: printer

8.3.5.5 GetFileExtensionReturns the value of the FileExtension member of the BlackIceDEVMODE. Represents the value of the 'File Name Extension' edit box.

GetFileExtension(pBlackIceDEVMODE As Long) As String

Input value - handle to the BlackIceDEVMODEReturn value - File Name Extension

8.3.5.6 SetFileExtensionSets the FileExtension member of the BlackIceDEVMODE. Sets the value of the 'File Name Extension' edit box.

SetFileExtension(fnameext As String, pBlackIceDEVMODE As Long) As Boolean

Input value: fnameext - File Name ExtensionInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.5.7 IsCustomExtensionEnabledReturns the value of the BLF_CUSTOMEXT flag. Represents the value of the 'Use Custom Extension' checkbox.

IsCustomExtensionEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if Use Custom Extension is used, otherwise FALSE

8.3.5.8 EnableCustomExtensionSets the BLF_CUSTOMEXT flag. Sets the value of the 'Use Custom Extension' checkbox.

EnableCustomExtension(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.5.9 DisableCustomExtensionSets the BLF_CUSTOMEXT flag to 0 (false). Sets the value of the 'Use Custom Extension' checkbox UNCHECKED.

DisableCustomExtension(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

400292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 404: printer

8.3.5.10 GetINIFileNameReturns the value of the INIFileName member of the BlackIceDEVMODE. Represents the value of the 'INI File Name'/'Registry path'/etc. edit box.

GetINIFileName(pBlackIceDEVMODE As Long) As String

Input value - handle to the BlackIceDEVMODEReturn value - INI File Name/Registry Path/etc

8.3.5.11 SetINIFileNameSets the INIFileName member of the BlackIceDEVMODE. Sets the value of the 'INI File Name'/'Registry path'/etc. edit box.

SetINIFileName(inifname As String, pBlackIceDEVMODE As Long) As Boolean

Input value: inifname - INI File Name/Registry Path/etc.Input value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.5.12 GetImageFileNameReturns the value of the FileImageName member of the BlackIceDEVMODE. Represents the value of the 'File Image Name' edit box if the Filename Generation method is ‘Exact filename’.

GetImageFileName(pBlackIceDEVMODE As Long) As String

Input value - handle to the BlackIceDEVMODEReturn value - Image Filename

8.3.5.13 SetImageFileNameSets the FileImageName member of the BlackIceDEVMODE. Sets the value of the 'File Image Name' edit box if the Filename Generation method is ‘Exact filename’.

SetImageFileName(filename As String, pBlackIceDEVMODE As Long) As Boolean

Input value: filename - Exact FilenameInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.5.14 IsKeepExistingFilesEnabledReturns the value of the BLF_KEEPFILES flag. Represents the value of the 'Keep existing files' checkbox.

IsKeepExistingFilesEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE401

292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112© 1989 – 2001 Black Ice Software Inc.

Information Contained Is Not For Reproduction Or Distribution

Page 405: printer

Return value - TRUE if Keep existing files is used, otherwise FALSE

8.3.5.15 EnableKeepExistingFilesSets the BLF_KEEPFILES flag. Sets the value of the 'Keep existing files' checkbox.

EnableKeepExistingFiles(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.5.16 DisableKeepExistingFilesSets the BLF_KEEPFILES flag to 0 (false). Sets the value of the 'Keep existing files' checkbox UNCHECKED.

DisableKeepExistingFiles(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.5.17 GetOutputDirectoryReturns the value of the OutputDirectory member of the BlackIceDEVMODE. Represents the value of the 'Output Directory' edit box.

GetOutputDirectory(pBlackIceDEVMODE As Long) As String

Input value - handle to the BlackIceDEVMODEReturn value - Output Directory

8.3.5.18 SetOutputDirectorySets the OutputDirectory member of the BlackIceDEVMODE. Sets the value of the 'Output Directory' edit box.

SetOutputDirectory(outputdir As String, pBlackIceDEVMODE As Long) As Boolean

Input value: outputdir - Output DirectoryInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.5.19 IsGroupFileDisabledReturns the value of the BLF_DISABLEGROUPFILE flag. Represents the value of the 'Disable Group File' checkbox.

IsGroupFileDisabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if Disable Group File is used, otherwise FALSE

402292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 406: printer

8.3.5.20 DisableGroupFileSets the BLF_DISABLEGROUPFILE flag. Sets the value of the 'Disable Group File' checkbox.

DisableGroupFile(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.5.21 EnableGroupFileSets the BLF_DISABLEGROUPFILE flag to 0 (false). Sets the value of the 'Disable Group File' checkbox UNCHECKED.

EnableGroupFile(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.5.22 IsDeleteGroupFileEnabledReturns the value of the BLF_DELETEGROUPFILE flag. Represents the value of the 'Delete Group File After Printing' checkbox.

IsDeleteGroupFileEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if Delete Group File After Printing is used, otherwise FALSE

8.3.5.23 EnableDeleteGroupFileSets the BLF_DELETEGROUPFILE flag. Sets the value of the 'Delete Group File After Printing' checkbox.

EnableDeleteGroupFile(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.5.24 DisableDeleteGroupFileSets the BLF_DELETEGROUPFILE flag to 0 (false). Sets the value of the 'Delete Group File After Printing' checkbox UNCHECKED.

DisableDeleteGroupFile(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

403292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 407: printer

8.3.6The “Start Application” method8.3.6.1 IsStartApplicationEnabled

Returns the value of the BLF_LAUNCHAPP flag. Represents the value of the 'Enable Start Application' checkbox.

IsStartApplicationEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if Enable Start Application is used, otherwise FALSE

8.3.6.2 EnableStartApplicationSets the BLF_LAUNCHAPP flag. Sets the value of the 'Enable Start Application' checkbox.

EnableStartApplication(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.6.3 DisableStartApplicationSets the BLF_LAUNCHAPP flag to 0 (false). Sets the value of the 'Enable Start Application' checkbox UNCHECKED.

DisableStartApplication(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.6.4 GetApplicationPathReturns the value of the ApplicationPath member of the BlackIceDEVMODE. Represents the value of the 'Output Directory' edit box.

GetApplicationPath(pBlackIceDEVMODE As Long) As String

Input value - handle to the BlackIceDEVMODEReturn value - Application Path

8.3.6.5 SetApplicationPathSets the ApplicationPath member of the BlackIceDEVMODE. Sets the value of the 'Application Path' edit box.

SetApplicationPath(applicationpath As String ,pBlackIceDEVMODE As Long) As Boolean

Input value: applicationpath - Application PathInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.

404292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 408: printer

Return value - TRUE if the member was successfully set, otherwise FALSE.

8.3.6.6 IsStartBeforePrintReturns the value of the BLF_STARTBEFOREPRINT flag. Represents the value of the 'Start Before Printing' radio button.

IsStartBeforePrint(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if Start Before Printing is used, otherwise FALSE (The driver will start

application after printing)

8.3.6.7 EnableStartBeforePrintSets the BLF_STARTBEFOREPRINT flag. Sets the value of the 'Start Before Printing' radio button.

EnableStartBeforePrint(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.6.8 DisableStartBeforePrintSets the BLF_STARTBEFOREPRINT flag to 0 (false). Sets the value of the 'Start Before Printing' radio button UNCHECKED. (Sets the value of the 'Start After Printing' radio button CHECKED)

DisableStartBeforePrint(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.6.9 IsPassParametersEnabledReturns the value of the BLF_PASSPARAMETERS flag. Represents the value of the 'Pass Parameters' checkbox.

IsPassParametersEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if Pass Parameters is used, otherwise FALSE

8.3.6.10 EnablePassParametersSets the BLF_PASSPARAMETERS flag. Sets the value of the 'Pass Parameters' checkbox.

EnablePassParameters(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.

405292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 409: printer

Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.6.11 DisablePassParametersSets the BLF_PASSPARAMETERS flag to 0 (false). Sets the value of the 'Pass Parameters' checkbox UNCHECKED.

DisablePassParameters(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.6.12 IsStartNormalReturns the value of the BLF_STARTNORMAL flag. Represents the value of the 'Normal' radio button.

IsStartNormal(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if Start Application In a Normal Window is used, otherwise FALSE

8.3.6.13 EnableStartNormalSets the BLF_STARTNORMAL flag. Sets the value of the 'Normal' radio button. The driver will start the application In a Normal window

EnableStartNormal(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.6.14 DisableStartNormalSets the BLF_STARTNORMAL flag to 0 (false). Sets the value of the 'Normal' radio button UNCHECKED.

DisableStartNormal(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.6.15 IsStartMinimizedReturns the value of the BLF_STARTMINIMIZED flag. Represents the value of the 'Minimized' radio button.

IsStartMinimized(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if the Start Application In Minimized Window is used, otherwise FALSE

406292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 410: printer

8.3.6.16 EnableStartMinimizedSets the BLF_STARTMINIMIZED flag. Sets the value of the 'Minimized' radio button. The driver will start the application In a Minimized window

EnableStartMinimized(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.6.17 DisableStartMinimizedSets the BLF_STARTMINIMIZED flag to 0 (false). Sets the value of the 'Minimized' radio button UNCHECKED.

DisableStartMinimized(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.6.18 IsStartHiddenReturns the value of the BLF_STARTHIDDEN flag. Represents the value of the 'Hidden' radio button.

IsStartHidden(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if Start Application Hidden is used, otherwise FALSE

8.3.6.19 EnableStartHiddenSets the BLF_STARTHIDDEN flag. Sets the value of the 'Hidden' radio button. The driver will start the application Hidden

EnableStartHidden(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.6.20 DisableStartHiddenSets the BLF_STARTHIDDEN flag to 0 (false). Sets the value of the 'Hidden' radio button UNCHECKED.

DisableStartHidden(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

407292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 411: printer

8.3.6.21 IsMessagingInterfaceEnabledReturns the value of the BLF_SENDMESSAGE flag. Represents the value of the 'Disable the Messaging Interface' checkbox.

IsMessagingInterfaceEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if the Messaging Interface is used (the check box is unchecked),

otherwise FALSE (the Messaging Interface will not be used and the check box is checked)

8.3.6.22 EnableMessagingInterfaceSets the BLF_SENDMESSAGE flag. Sets the value of the 'Disable the Messaging Interface' checkbox UNCHECKED. The driver will use the Messaging Interface.

EnableMessagingInterface(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.6.23 DisableMessagingInterfaceSets the BLF_SENDMESSAGE flag to 0 (false). Sets the value of the 'Disable the Messaging Interface' checkbox. The driver will not use the Messaging Interface.

DisableMessagingInterface(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.7Miscellaneous methods8.3.7.1 GetInterfaceName

Returns the value of the InterfaceName member of the BlackIceDEVMODE. The InterfaceName member stores the name of the messaging interface.

InterfaceName(pBlackIceDEVMODE As Long) As String

Input value - handle to the BlackIceDEVMODEReturn value - Interface Name

8.3.7.2 SetInterfaceNameSets the InterfaceName member of the BlackIceDEVMODE. The InterfaceName member stores the name of the messaging interface.

SetInterfaceName(intfname As String, pBlackIceDEVMODE As Long) As Boolean

Input value: intfname - Interface Name408

292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112© 1989 - 2001 Black Ice Software Inc.

Information Contained Is Not For Reproduction Or Distribution

Page 412: printer

Input value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.7.3 GetPaperLengthReturns the value of the dmPaperLength member of the DevMode. (DM.dmPaperLength member of the BlackIceDEVMODE ) This value represent the 'Actual paper length'.

GetPaperLength(pBlackIceDEVMODE As Long) As Integer

Input value - handle to the BlackIceDEVMODEReturn value - Actual paper length

8.3.7.4 SetPaperLengthSets the dmPaperLength member of the DevMode. (DM.dmPaperLength member of the BlackIceDEVMODE ) This value represent the 'Actual paper length'.

SetPaperLength(paperlength As Integer, pBlackIceDEVMODE As Long) As Boolean

Input value: paperlength - Actual paper lengthInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.7.5 IsTiffDllEnabledReturns the value of the BLF_ENABLETIFFDLL flag. If the flag is set, the printer driver will load the TIFF32.DLL. This flag can only be set programmatically.

IsTiffDllEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if the TIFF32.DLL is enabled, otherwise FALSE

8.3.7.6 EnableTiffDllSets the BLF_ENABLETIFFDLL flag. If the flag is set, the printer driver will load the TIFF32.DLL. This flag can only be set programmatically.

EnableTiffDll(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.7.7 DisableTiffDllSets the BLF_ENABLETIFFDLL flag to 0 (false). If the flag is set, the printer driver will load the TIFF32.DLL. This flag can only be set programmatically.

409292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 413: printer

DisableTiffDll(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set to 0 (false), otherwise FALSE.

8.3.7.8 IsJpegDllEnabledReturns the value of the BLF_ENABLEJPEGDLL flag. If the flag is set, the printer driver will load the TIFF32.DLL. This flag can only be set programmatically.

IsJpegDllEnabled(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODEReturn value - TRUE if the JPEG32.DLL is enabled, otherwise FALSE

8.3.7.9 EnableJpegDllSets the BLF_ENABLEJPEGDLL flag. If the flag is set, the printer driver will load the JPEG32.DLL. This flag can only be set programmatically.

EnableJpegDll(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set, otherwise FALSE.

8.3.7.10 DisableJpegDllSets the BLF_ENABLEJPEGDLL flag to 0 (false). If the flag is set, the printer driver will load the JPEG32.DLL. This flag can only be set programmatically.

DisableJpegDll(pBlackIceDEVMODE As Long) As Boolean

Input value - handle to the BlackIceDEVMODE.Return value - TRUE if the flag was successfully set 0 (false), otherwise FALSE.

8.3.7.11 GetTIFFDLLNameReturns the value of the TIFFDLLName member of the BlackIceDEVMODE. The TIFFDLLName member stores the name and path of the TIFF32.DLL. This DLL encodes the TIFF files. The file is needed for TIFF output.

GetTIFFDLLName(pBlackIceDEVMODE As Long) As String

Input value - handle to the BlackIceDEVMODEReturn value - TIFFDLLName

410292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 414: printer

8.3.7.12 SetTIFFDLLNameSets the TIFFDLLName member of the BlackIceDEVMODE. The TIFFDLLName member stores the name and path of the TIFF32.DLL. This DLL encodes the TIFF files. The file is needed for TIFF output.

SetTIFFDLLName(stringtiffdll As String, pBlackIceDEVMODE As Long) As Boolean

Input value: stringtiffdll - TIFFDLLNameInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.7.13 GetJPEGDLLNameReturns the value of the JPEGDLLName member of the BlackIceDEVMODE. The JPEGDLLName member stores the name and path of the JPEG32.DLL. This DLL encodes the Jpeg files. The file is needed for Jpeg output.

GetJPEGDLLName(pBlackIceDEVMODE As Long) As String

Input value - handle to the BlackIceDEVMODEReturn value - JPEGDLLName

8.3.7.14 SetJPEGDLLNameSets the JPEGDLLName member of the BlackIceDEVMODE. The JPEGDLLName member stores the name and path of the JPEG32.DLL. This DLL encodes the Jpeg files. The file is needed for Jpeg output.

SetJPEGDLLName(stringjpegdll As String, pBlackIceDEVMODE As Long) As Boolean

Input value: stringjpegdll - JPEGDLLNameInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise q

FALSE.

8.3.7.15 GetResourceDLLNameReturns the value of the ResourceDLLName member of the BlackIceDEVMODE. The ResourceDLLName member stores the name and path of the driver resource DLL

GetResourceDLLName(pBlackIceDEVMODE As Long) As String

Input value - handle to the BlackIceDEVMODEReturn value - ResourceDLLName

8.3.7.16 SetResourceDLLNameSets the ResourceDLLName member of the BlackIceDEVMODE. The ResourceDLLName member stores the name and path of the driver resource DLL

411292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 415: printer

SetResourceDLLName(stringresdll As String, pBlackIceDEVMODE As Long) As Boolean

Input value: stringresdll - ResourceDLLNameInput value: pBlackIceDEVMODE - handle to the BlackIceDEVMODE.Return value - TRUE if the member was successfully set, otherwise

FALSE.

8.3.7.17 GetBitsPerPixelReturns the value of the color depth in pixels. If the Color Depth is BITS_1, the return value is 1 If the Color Depth is BITS_8, the return value is 8 If the Color Depth is BITS_8GRAY, the return value is 8 If the Color Depth is BITS_24, the return value is 24

GetResourceDLLName(pBlackIceDEVMODE As Long) As Long

Input value - handle to the BlackIceDEVMODEReturn value - Color depth in pixels

9 Visual Basic Sample – how to modify the printer settings

This sample demonstrates how to use the methods of the BlackIceDEVMODE.OCX. The sample shows how to read, modify and save the printer settings programmatically.

412292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 416: printer

The ‘PrinterSettings’ program allows users to change settings of the Black Ice printers. OK: save the settings and exit. Cancel: exit the program without changing the settings. Apply: save the settings without exiting. You can continue to modify the controls. Open printer: close previously opened printer, and try to open the new printer specified

in the “Printer name” text box.

413292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 417: printer

414292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 418: printer

Differences between Win95/98/ME and XP/W2K/NT DriversThe following is a brief list of differences between the Win95/98/ME and XP/W2K/NT Printer Drivers:

Instead of one dialog box, the settings are divided into two groups that can be found in two separate dialogs on Xpand W2K: Properties and Printing Preferences. On NT 4.0 it is named Properties and Document Defaults.Properties: this dialog can be opened by clicking on the Black Ice printer with the right mouse button and choosing Properties. The parameters available in this dialog will be used by every printing application when printing to this printer. The last property sheet contains Black Ice specific settings.Document Defaults: another group of settings can be found by clicking on the Black Ice printer with the right mouse button and selecting Document Defaults. This dialog contains default values for document related and other settings. However; if a printing application wants to modify some of these settings it can call the DocumentProperties() function to do so. Even two or more applications running simultaneously can use different settings.

The XP/W2K and NT driver writes information to a named pipe instead of sending actual messages.

The user needs Administrator privileges to be able to modify the printer’s settings on XP/W2K and NT.

415292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 419: printer

417292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 420: printer

Technical Support

For Technical support contact us via E-mail or Fax:

E-mail: [email protected]; Fax (603) 672-4112

E-mail is the most expedient method of communication and provides a more reliable answer to your issues, because it reduces miscommunication and provides a log of the questions and answers for future reference.

Please include the version number of the product that you are using and the platform on which it is installed.

418292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 421: printer

419292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 422: printer

Printing tipsHow to print a document to a fax compatible image without repaginating the document.When the printer driver is set to Fax paper size and 204x196 or 204x98 DPI resolution, the application (i.e. MS WORD) will repaginate the document to reflect the printer driver settings. This can cause problems in the document, because parts of the documents can be shifted from one page to another, single line texts will not fit to a single line anymore, etc.

In order to avoid the repagination, but still generate a faxable image, please follow the steps below:

1. On the Device settings tab of the Printer’s “Document defaults” or “Printing Preferences” dialog box check the “Create faxable image”.

2. Set the paper size and the resolution to the same paper size and resolution your document was formatted with.

3. Print the document.

This way when the application will check what the printer settings are, it will find that the printer setting are similar to the document settings, therefore there is no need to repaginate the document. When the document is printed, the printer driver will print the document with the document settings and at the very end will resize the generated image to fax size.

How to print images with exact size in pixelsSometimes it is important to generate images with a predefined exact size in pixels. To print the document to an image with a size of X by Y pixels, please do the following:

1. On the Device settings tab of the Printer’s “Document defaults” or “Printing Preferences” dialog box, select “Variable paper size in pixels” as the paper size.

2. In the “Paper width” field, enter the desired width of the image in pixels.

3. In the “Paper height” field, enter the desired height of the image in pixels.

4. Print the document.

420292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 423: printer

How to print using very large paper size ?The Black Ice Printer Drivers besides the standard paper sizes supports custom paper sizes too. The custom paper size can be specifies in tents of a millimeter or hundreds of an inch. Due to the limitation of the Windows operating system the maximum value of the paper size (both width and height of the paper) can be 32767 in tents of a millimeter or 12900 in hundreds of inch.

Practically this means that the maximum paper size can be 129 inch x 129 inch or 327 cm x 327 cm.

The size (in megabytes) of the image depends also on the resolution setting (DPI setting). For the same paper size higher resolution will produce bigger image file. Your system must have enough system resource (memory and hard disk space) to allow the printer driver to generate an image of that size.

421292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 424: printer

Troubleshooting

Creating Installations For UsersTo configure the printer driver, with default settings, for individual users under Windows 2000 and XP you have to modify the INI file shipped with the driver. For details, please see the “Components of the Resource Tool Kit” chapter and the “How to set the printer setting at install time using an INI file” section. To verify the correct settings, install the printer driver as administrator. When the printer driver is installed, select the installed printer driver Properties. Click on the Advanced Tab. When the advanced window opens, click on the Printing Default... button to display, verify or change the settings for a system user.

"Printing Defaults..." buttonThe Problem:

On Windows 2000, If I install a Black Ice printer, and then open the Printers screen from the control panel, right-click on the Black Ice printer, and choose "Properties", I get a Properties dialog box with 7 property pages. On the "General" property page, if I hit "Printing Preferences", I get the standard Black Ice 4-property-page printing preferences dialog with all the settings I had set as the defaults during installation. If, however, I go back to the Properties dialog, go to the "Advanced" property page, and hit the "Printing Defaults..." button, I get a Black Ice dialog which looks EXACTLY like the printing preferences dialog I'd just seen EXCEPT WITH DIFFERENT SETTINGS! These "printing default" settings do not seem to be used anywhere. What are they used for, should they be set along with the Printing Preferences settings, and if so, how should I set them from InstallShield? (MyDLL_NT.dll in the Resource Tool Kit only seems to affect the preferences settings, not the defaults settings.)

The "Printing Default" settings can be set from the default install INI file. For details, please see the “Components of the Resource Tool Kit” chapter and the “How to set the printer setting at install time using an INI file” section. The default setting is read from the INI file by the driver when the driver is added to the system and before the configuration settings are applied from the MYDLL.DLL. The "Printing Default" settings are used by the system for system users logged into the same pc without administrative privileges and the Black Ice printer driver is already installed. The User inherits the "Printing Default" settings of the Black Ice printer driver.

422292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 425: printer

Setting changes when Black Ice is not the default printer.The resolution of the Black Ice printer is set to 100 x 100 DPI in the Device Settings page of the Printing Preferences dialog (the same default resolution I set at installation). Yet when I run an application, invoke Print, choose the Black Ice Printer, and bring up its Printing Properties screen, the resolution is almost always something different. (Usually 200x200 or 600x600.) Note that the Black Ice Printer is not installed as the system's default printer. What are we doing wrong?

A printing application always uses the default printer settings for a document. When one tries to print the document to another printer, the printing application uses the settings of the default printer. If the default printer settings are in the range of the destination printer driver device capabilities, then the destination printer will use the settings of the default printer. You can test this with 2 printers by setting default printer "A" to landscape and the second printer "B" to portrait mode. Print the document and select the second printer and just print. The second printer will print in landscape mode even though it is configured in portrait mode. The same is true for Dot Per Inch (DPI) resolution, but it is not visible and sometimes one cannot tell the difference.

Why the printed image parameters are different then printer driver settings?When printing certain documents to a Tiff formatted file, the preferences used to configure the print driver are reset to their default values and subsequent print requests use those default values.

The printing application will store the print settings of the printer driver the document was last formatted and saved with. The print settings are stored in the DEVMODE and the Extended DEVMODE data structure.

The Excel document you sent to us was configured with the Black Ice Printer driver and with the setting of print a single multi page TIFF file. Excel saves the settings of the DEVMODE and the Extended DEVMODE data structure. If you change the printer driver settings outside Excel by turning of the single multipage tiff, Excel will use the original DEVMODE and the Extended DEVMODE data structure (with single multipage TIFF). This makes sense, because Excel stores DEVMODE and the Extended DEVMODE data structures and has Page Setup to configure the document. This technique also applies to other printer driver features.

423292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 426: printer

Printer driver does not generate any output.The printing User has write privileges for the output directory but the printer driver does not generate any output.

The group file and the image file are saved by the port monitor. Because the port monitor runs on the local SYSTEM account, inherits the privileges of the SYSTEM account and does not "know" anything about the printing user. In order to generate output files, the port monitor should have write permission to the output directory. This means that the local SYSTEM account should have write permission to the output folder.

How to set file format (Group 3,Group4) in runtime?You can change printer settings through the DEVMODE and extended DEVMODE data structures using MS C or C++. You can change the page size or DPI though the DEVMODE data structure before printing is started. There is documentation in the manual about the extended DEVMODE data structure and you can find the DEVMODE data structure documentation in the MS Visual C++ or Delphi manual.

Does the printer driver support Multi-threading?- Yes.

Can Black Ice printer driver handle concurrent requests specifying different file format and resolution?- Yes.

Why the printer messages are captured by the administrator account when printing Test Page on Terminal Server?

On Terminal Server when a Windows Test Page is printed, the test page is printed by the spooler. In that particular case the messages will be captured on the server machine by the administrator account, not by the user who prints.

424292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 427: printer

Why the printer generates the output files on the windows directory when printing Test Page on Terminal Server?

On Terminal Server when a Windows Test Page is printed, the test page is printed by the spooler. In that particular case the output files are generated in the windows directory, not in the output directory which was set up for the user who print.

Why the printer reports the “Invalid printer driver data type” error when printing?The “Invalid printer driver data type” error is generated by the printer driver when the data type used by the printer driver is changed from the default “NT EMF 1.003” to a different (i.e. RAW) data type. The Black Ice printer only supports the “NT EMF 1.003” data type and will not print with any other data types.

The error is generated in the following situations:

1. The User, who has printed the document, checked the “Print to file” check box on the Print dialog box. The Black Ice printer driver converts the printed document to an image file without checking the “Print to file” check box. The User must not check the “Print to file” check box, because by checking it the system will force the printer driver to use the RAW data type. Also, by checking the “Print to file” check box, the system will connect the printer to the FILE port instead of the default Black Ice port, therefore the printing will not succeed.

SOLUTION: Do not check the “Print to file” check box on the Print dialog box.

2. The “Enable advanced printing features” check box on the Advanced tab of the printer’s Properties dialog box has been unchecked. By unchecking the “Enable advanced printing features” check box, the system will force the printer driver to use the RAW data type.

SOLUTION: Open the Black Ice printer’s Properties dialog box and select the Advanced tab. Make sure that the “Enable advanced printing features” check box is checked. Click the “Print Processor…” button and select “NT EMF 1.003” as the data type.

3. The printer’s data type was manually changed to a data type different than “NT EMF 1.003”.

SOLUTION: Open the Black Ice printer’s Properties dialog box and select the Advanced tab. Click the “Print Processor…” button and select “NT EMF 1.003” as the data type.

425292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 428: printer

Why the printer reports the “Cannot print directly to the printer” error when printing?Problem description: The printer will display the “Cannot print directly to the printer” message. No files are generated.

Solution:This error occurs when the spooler is turned off. The Black Ice Printer Driver do not work with the spooler turned off. At the Spool options select the “Spool print documents” option instead of “Print directly to the printer”

“HKEY_LOCAL_MACHINE\SOFTWARE\Black Ice Software, Inc\” Cannot Created messageProblem description: The “HKEY_LOCAL_MACHINE\SOFTWARE\Black Ice Software, Inc\ registry key cannot be created” message is received at installation time on the Terminal Server.

Solution:This message is received at installation time if the install cannot create the “HKEY_LOCAL_MACHINE\SOFTWARE\Black Ice Software, Inc\” registry key for some reason. This registry key is vital to use the printer driver’s ‘Launch Application’ option on the Terminal Server. If the install could not create the key in the registry the system administrator has to create this key manually. When the key is created, add READ and WRITE permission to the key for all the users who will use the Black Ice printer to launch an application.

Domain users cannot use the launch the application feature on the Terminal ServerProblem description:The printer driver will launch the specified application only if the user who prints has administrator rights. For users with non-administrative the printer will not launch the application.

Solution:The system administrator must allow READ and WRITE permission to the HKEY_LOCAL_MACHINE\SOFTWARE\Black Ice Software, Inc\ registry key. If the key does not exist, the system administrator must create the key manually.

426292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 429: printer

The default settings are not set for all users after installation on Win2000 and XP. Problem description:

The settings specified in the Install Shield project are not set for all users, only for the user who installed the printer.

Solution:

1. The default settings for all users can be set manually after the installation. Go to the printer “Properties”, select the ‘Advanced’ tab. Select the ‘Printing Defaults…’ button. The ‘Printer Preferences’ dialog box will appear. All the settings you specify here will be set as the default settings for all users.2. To specify the default settings for all users at install time, specify the required settings in the INI file. (i.e. BiMIniNT.ini in the case of the TIFF Printer Driver). All the settings you specify in the INI file will be set as the default settings for all users at installation time.

The printer is not using the selected DPI settings. Problem description:

The document is printed with another DPI other than what is set in the Printer Preferences.

Solution:

The document was created using the DPI settings of the default printer. Most applications (for example, Word, Excel, etc.) store the printer settings in the document.For example if the default printer was set to print at 600 DPI when the document was created, the 600 DPI setting is saved in the document. Because the Black Ice Printer Driver supports the 600 DPI setting, the application will send the document to the printer with the document’s DPI setting. To use the Black Ice printer settings in the application, go to the Page Setup and change the DPI setting to the required value and save the document. If the application does not have a Page Setup option, try the Print or Printing Options, select the Black Ice Printer and save the document. In this case the document will be saved with the Black Ice Printer DPI settings.

Distorted images from MS Word and Excel427

292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112© 1989 – 2001 Black Ice Software Inc.

Information Contained Is Not For Reproduction Or Distribution

Page 430: printer

Problem description:

When I print from MS Word or Excel using different DPI settings for the horizontal and vertical resolution, the image is distorted or parts of the images or tables from the document are missing.

Solution:

This problem can occur on any operating system. If the driver is set up to print with fax compatible resolution ( 204x98 or 204x196 DPI ) or different horizontal and vertical resolution (i.e.300x600 DPI) and the printed document contains bitmaps or tables, these objects may be printed slightly smaller or bigger than the rest of the page.

The reason for this is that these applications expect the printer to have the same vertical and horizontal resolution values (300x300 or 150x150 DPI).

To fix the problem, set the same horizontal and vertical resolution at the DPI settings in the Printer Preferences window under the Device Settings tab.

If you need to use FAX resolution (204x98 or 204x196 DPI), first set the printer to use the same vertical and horizontal resolution values at the DPI settings in the Printer Preferences window under the Device Settings tab. Then check the ‘Create Faxable Image’ checkbox. The printer driver will generate the output image using the fax resolution, but the application will use the same vertical and horizontal resolution values.

The printer driver does not start the applicationProblem description:

I am logged in as regular user with no administrative rights. The ‘Start application’ option at the printer “Printinng Preferences” is checked but the application does not start.

The same application is started by the printer driver if I am logged in as administrator.

Solution:

This problem can occur on NT/Win2000/Xp and Terminal Server systems. The printer driver writes information about the application to be started into the “HKEY_LOCAL_MACHINE\SOFTWARE\Black Ice Software, Inc.” registry key. That part of the printer driver which writes this information into the registry key runs on the current user account. If the current user account does not have write permission to the “HKEY_LOCAL_MACHINE\SOFTWARE\Black Ice Software, Inc.” registry key, the application cannot be started.

428292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 431: printer

In order to allow the printer driver to start applications for regular users, before or after printing, the system administrator has to give write permission to the “HKEY_LOCAL_MACHINE\SOFTWARE\Black Ice Software, Inc.” registry key.

429292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 432: printer

430292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 433: printer

Index

AAdd Fax header...................54, 74, 264, 284Add Page Numbering Tag...42, 63, 252, 273Advanced Papersize.. . .35, 55, 75, 245, 265,

285AdvancedPaperSize

DisableAdvancedPaperSize...............169, 203, 356, 386EnableAdvancedPaperSize................169, 203, 356, 386IsAdvancedPaperSizeEnabled...........169, 203, 356, 386

AdvancedTextDisableAdvancedText.......................177, 211, 363, 394EnableAdvancedText........................177, 211, 363, 394IsAdvancedTextEnabled...................177, 211, 363, 393

AppendImageDisableAppendImage........................175, 209, 361, 391EnableAppendImage.........................174, 208, 360, 391IsAppendImageEnabled....................174, 208, 360, 391

Application............50, 70, 88, 260, 280, 298ApplicationPath

GetApplicationPath...........................188, 222, 372, 402GetInterfaceName.............................192, 227, 376, 406SetApplicationPath...........................188, 222, 372, 402

BBiCIniNT.ini..........................................151Bicom.............................................132, 335BiEIniNT.ini...........................................151BiMIniNT.ini..........................................151Black Ice DEVMODE....................100, 309BLACKICE_PRINTER_MESSAGE....115,

323BlackIceDEVMODE C++ Sample. .196, 380BlackIceDEVMODE VB Sample...........410BlackIceDEVMODE.DLL..............162, 351BlackIceDEVMODE.OCX.............197, 381BLICECTR.DLL....................................125Brightness

GetBrightness...................................180, 214, 366, 396SetBrightness....................................180, 214, 366, 396

CChanging DEVMODE under Windows

95/98....................................................333Changing DEVMODE with DLL functions

.....................................................165, 353Changing DEVMODE with OCX functions

.....................................................199, 383Changing the DEVMODE structure under

Windows NT/2000/XP.........................127Color Depth......................................59, 269ColorDepth

GetColorDepth..................................173, 207, 359, 390SetColorDepth..................................173, 207, 359, 390

Command Line Parameters.............118, 326Commetrex.....................................132, 335configuration on Windows 95/98/ME...261,

281Configuration on Windows XP/W2K and

NT.........................................................71Configuration on Windows XP/W2K/NT

and Terminal Server...............................51COPYDATASTRUCT...................114, 322Create Faxable Image 35, 55, 75, 245, 265,

285Create Faxable Image..35, 55, 75, 245, 265,

285Create multipage image.......39, 60, 249, 270CustomExtension

DisableCustomExtension..................183, 217, 368, 398EnableCustomExtension...................183, 217, 368, 398IsCustomExtensionEnabled...............183, 217, 368, 398

Ddefault page orientation35, 55, 75, 245, 265,

285Default resolution. .36, 56, 76, 246, 266, 286Default settings are not set for all users after

installation on Win2000 and XP...........425431

292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112© 1989 – 2001 Black Ice Software Inc.

Information Contained Is Not For Reproduction Or Distribution

Page 434: printer

Delete group file after printing....48, 68, 86, 258, 278, 296

DeleteGroupFileDisableDeleteGroupFile....................186, 220, 371, 401EnableDeleteGroupFile.....................186, 220, 371, 401IsDeleteGroupFileEnabled................186, 220, 371, 401

Device Settings - functions. . .166, 200, 354, 384

Device Settings sheet. . . .32, 52, 72, 262, 282Dialogic..........................................132, 335Differences.....................................234, 413Digital half-toning...............43, 63, 252, 273Disable Group File 48, 68, 86, 258, 278, 296Disable image........39, 60, 79, 249, 270, 289Disable Messaging Interface50, 70, 88, 260,

280, 298DisableAdvancedPaperSize...169, 203, 356,

386DisableAdvancedText.....177, 211, 363, 394DisableAppendImage......175, 209, 361, 391DisableCustomExtension.183, 217, 368, 398DisableDeleteGroupFile. .186, 220, 371, 401DisableDisableImage.......175, 209, 361, 391DisableEasternCharSupport. .176, 210, 362,

392DisableFaxOutput...........168, 202, 356, 386DisableGroupFile............185, 219, 370, 401DisableImage

DisableDisableImage........................175, 209, 361, 391EnableDisableImage.........................175, 209, 361, 391IsDisableImageEnabled.....................175, 209, 361, 391

DisableInternetTiffFormat.. . .178, 212, 364, 394

DisableJpegDll................194, 229, 378, 408DisableKeepExistingFiles184, 218, 369, 400DisableMailMerge...........177, 211, 363, 393DisableMessagingInterface. . .192, 226, 376,

406DisableMultipageImage. .174, 208, 360, 390DisablePageNumbering...179, 213, 365, 396DisablePassParameters....189, 223, 373, 404DisableReverseBitOrder. .179, 213, 365, 395DisableRotatePaper.........170, 204, 357, 387DisableStartApplication. .188, 222, 372, 402DisableStartBeforePrint...189, 223, 373, 403DisableStartHidden.........191, 225, 375, 405

DisableStartMinimized....191, 225, 374, 405DisableStartNormal.........190, 224, 374, 404DisableTiffDll.................193, 228, 377, 408DisableWriteText............176, 210, 362, 393Distorted images from MS Word and Excel

.............................................................426dithering..............................43, 63, 252, 273Dithering

GetDithering.....................................179, 213, 365, 396SetDithering......................................180, 214, 366, 396

DLL Functions................................164, 352Document Properties..............................333DocumentProperties...............................127Driver Files.....................................143, 345

EEastern Character Support...40, 60, 79, 249,

270, 289EasternCharSupport

DisableEasternCharSupport..............176, 210, 362, 392EnableEasternCharSupport................175, 209, 362, 392IsEasternCharSupportEnabled...........175, 209, 361, 392

EMF Driver for XP/W2K/NT and Terminal Server....................................................71

EMF Printer Configuration.......................71Enable advanced printing features check box

.............................................................423Enable start application 49, 70, 88, 259, 280,

298Enable Start Application.....49, 69, 87, 259,

279, 297EnableAdvancedPaperSize....169, 203, 356,

386EnableAdvancedText......177, 211, 363, 394EnableAppendImage.......174, 208, 360, 391EnableCustomExtension..183, 217, 368, 398EnableDeleteGroupFile...186, 220, 371, 401EnableDisableImage........175, 209, 361, 391EnableEasternCharSupport. . .175, 209, 362,

392EnableFaxOutput............168, 202, 356, 386EnableGroupFile.............185, 219, 370, 401EnableInternetTiffFormat178, 212, 364, 394EnableJpegDll.................194, 228, 377, 408EnableKeepExistingFiles 184, 218, 369, 400

432292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 435: printer

EnableMailMerge............177, 211, 363, 393EnableMessagingInterface.. . .192, 226, 375,

406EnableMultipageImage. . .174, 208, 360, 390EnablePageNumbering....179, 213, 365, 395EnablePassParameters.....189, 223, 373, 403EnableReverseBitOrder...178, 212, 364, 395EnableRotatePaper..........170, 204, 357, 387EnableStartApplication. . .188, 222, 371, 402EnableStartBeforePrint....189, 223, 372, 403EnableStartHidden..........191, 225, 375, 405EnableStartMinimized.....190, 224, 374, 405EnableStartNormal..........190, 224, 374, 404EnableTiffDll..................193, 228, 377, 407EnableWriteText.............176, 210, 362, 392EndWaitPrnPipe.....................................126

FFax Boards......................................132, 335Fax header........................................35, 244FaxHeader

GetFaxHeader...................................168, 202, 355, 385SetFaxHeader....................................168, 202, 355, 385

FaxOutputDisableFaxOutput.............................168, 202, 356, 386EnableFaxOutput..............................168, 202, 356, 386IsFaxOutputEnabled..........................168, 202, 355, 385

File Format........................39, 58, 248, 268File Formats - functions..........206, 358, 389File Formats sheet...............38, 58, 248, 268FileExtension

GetFileExtension..............................182, 216, 367, 398SetFileExtension...............................182, 216, 367, 398

FileFormatGetFileFormat...................................172, 206, 358, 389SetFileFormat...................................173, 207, 359, 389

FileGenerationMethodGetFileGenerationMethod.................181, 215, 366, 397SetFileGenerationMethod.................182, 215, 367, 397

Filename................47, 67, 85, 257, 277, 295Filename Extension...40, 47, 60, 67, 79, 85,

250, 257, 270, 277, 289, 295Filename Generation - functions.. .181, 215,

366, 397Filename Generation Method....65, 83, 275,

293Filename Generation sheet. .64, 82, 274, 292

Filename Prefix.....47, 67, 85, 257, 277, 295FileNamePrefix

GetFileNamePrefix...........................182, 216, 367, 397SetFileNamePrefix............................182, 216, 367, 397

filters...................................43, 63, 252, 273Fine FAX mode.....36, 56, 76, 246, 266, 286Floyd-Steinberg..................43, 63, 252, 273

GGammaLink....................................132, 335Generated Image Size..37, 57, 77, 247, 267,

287GetApplicationPath.........188, 222, 372, 402GetBitsPerPixel...............195, 230, 379, 410GetBrightness..................180, 214, 366, 396GetColorDepth................173, 207, 359, 390GetDithering...................179, 213, 365, 396GetFaxHeader.................168, 202, 355, 385GetFileExtension.............182, 216, 367, 398GetFileFormat.................172, 206, 358, 389GetFileGenerationMethod.....181, 215, 366,

397GetFileNamePrefix.........182, 216, 367, 397GetImageFileName.........184, 218, 369, 399GetINIFileName..............183, 217, 368, 399GetInterfaceName...........192, 227, 376, 406GetJPEGDLLName.........195, 229, 378, 409GetLastError...................................164, 352GetLossRatio...................173, 207, 359, 389GetOrientation.................169, 203, 357, 387GetOutputDirectory.........185, 219, 370, 400GetPageHeightInPixels. . .167, 201, 355, 384GetPageWidthInPixels.. . .167, 201, 354, 384GetPaperLength..............193, 227, 376, 407GetPaperSize...................166, 200, 354, 384GetResourceDLLName.. .195, 230, 379, 409GetTIFFDLLName.........194, 229, 378, 408GetXDPI.........................170, 204, 358, 388GetYDPI.........................171, 205, 358, 388Graphics Resolution window....36, 56, 76,

246, 266, 286Group file body...............................121, 329Group File Content.........................119, 327Group File Description...................119, 327Group file header section................119, 327

433292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 436: printer

Group File Options48, 68, 86, 258, 278, 296GroupFileDisabled

DisableGroupFile..............................185, 219, 370, 401EnableGroupFile...............................185, 219, 370, 401IsGroupFileDisabled.........................185, 219, 370, 400

HHorizontal Resolution. 37, 56, 76, 246, 266,

286Horizontal Resolution. . .170, 204, 205, 358,

388How is Page size computed.35, 55, 75, 245,

265, 285How is performance affected by the

Photo Quality output?.................43, 253

IImageFileName

GetImageFileName...........................184, 218, 369, 399SetImageFileName............................184, 218, 369, 399

INI file....................................................151INIFileName

GetINIFileName...............................183, 217, 368, 399SetINIFileName................................183, 217, 368, 399

Initialize DEVMODE......164, 198, 352, 382Install......................................................151Installing the driver on NT/W2K and XP. 27Installing the driver on Win95/98 and ME

.............................................................236Intel DCX Image Format. . . .39, 59, 249, 269InterfaceName

SetInterfaceName.............................192, 227, 376, 407Internet TIFF format...........42, 62, 252, 272InternetTiffFormat

DisableInternetTiffFormat................178, 212, 364, 394EnableInternetTiffFormat.................178, 212, 364, 394IsInternetTiffFormatEnabled.............178, 212, 364, 394

Intesity................................43, 63, 252, 273Invalid printer driver data type........423, 424IsAdvancedPaperSizeEnabled169, 203, 356,

386IsAdvancedTextEnabled..177, 211, 363, 393IsAppendImageEnabled. .174, 208, 360, 391IsCustomExtensionEnabled...183, 217, 368,

398

IsDeleteGroupFileEnabled....186, 220, 371, 401

IsDisableImageEnabled...175, 209, 361, 391IsEasternCharSupportEnabled175, 209, 361,

392IsFaxOutputEnabled........168, 202, 355, 385IsGroupFileDisabled.......185, 219, 370, 400IsInternetTiffFormatEnabled.178, 212, 364,

394IsJpegDllEnabled............194, 228, 377, 408IsKeepExistingFilesEnabled..184, 218, 369,

399IsMailMergeEnabled.......176, 210, 363, 393IsMessagingInterfaceEnabled191, 225, 375,

406IsMultipageImageEnabled.....174, 208, 360,

390IsPageNumberingEnabled.....179, 213, 365,

395IsPassParametersEnabled 189, 223, 373, 403IsReverseBitOrderEnabled....178, 212, 364,

395IsRotatePaperEnabled.....170, 204, 357, 387IsStartApplicationEnabled. . . .187, 221, 371,

402IsStartBeforePrint............188, 222, 372, 403IsStartHidden..................191, 225, 375, 405IsStartMinimized.............190, 224, 374, 404IsStartNormal..................189, 224, 373, 404IsTiffDllEnabled.............193, 228, 377, 407IsWriteTextEnabled........176, 210, 362, 392

JJarvis-Judice-Ninke.............43, 63, 252, 273JPEG Loss Ratio...............................59, 269JpegDll

DisableJpegDll..................................194, 229, 378, 408EnableJpegDll...................................194, 228, 377, 408IsJpegDllEnabled..............................194, 228, 377, 408

JPEGDLLNameGetJPEGDLLName...........................195, 229, 378, 409SetJPEGDLLName...........................195, 229, 379, 409

KKeep existing files.47, 67, 85, 257, 277, 295

434292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 437: printer

KeepExistingFilesDisableKeepExistingFiles.................184, 218, 369, 400EnableKeepExistingFiles..................184, 218, 369, 400IsKeepExistingFilesEnabled..............184, 218, 369, 399

LLandscape.............35, 55, 75, 245, 265, 285LoadBlackIceDEVMODE.....164, 198, 353,

383LossRatio

GetLossRatio....................................173, 207, 359, 389SetLossRatio.....................................173, 207, 359, 389

MMail Merge............40, 61, 79, 250, 271, 289MailMerge

DisableMailMerge............................177, 211, 363, 393EnableMailMerge.............................177, 211, 363, 393IsMailMergeEnabled.........................176, 210, 363, 393

MEMBERS OF THE BlackIceDEVMODE STRUCTURE..............................101, 311

Messaging InterfaceChange the name......................................................159

Messaging Interface........................111, 321MessagingInterface

DisableMessagingInterface...............192, 226, 376, 406EnableMessagingInterface................192, 226, 375, 406IsMessagingInterfaceEnabled............191, 225, 375, 406

Metafile Driver for XP/W2K/NT and Terminal Server.....................................71

Microsoft DIB.....................39, 59, 249, 269Most recent driver files...................143, 345MultipageImageEnabled

DisableMultipageImage....................174, 208, 360, 390EnableMultipageImage.....................174, 208, 360, 390IsMultipageImageEnabled................174, 208, 360, 390

NName Generation Method. . .65, 83, 275, 293Name Generation Methods...............45, 255Natural Micro Systems...................133, 336

OOCX Functions...............................198, 382OpenPrinter............................................333Options..................39, 59, 78, 249, 269, 288Orientation

GetOrientation..................................169, 203, 357, 387SetOrientation...................................169, 203, 357, 387

output directorydifferent output directory for each user....................158

Output directory....47, 67, 85, 257, 277, 295output files

in wrong place.........................................................423OutputDirectory

GetOutputDirectory..........................185, 219, 370, 400SetOutputDirectory...........................185, 219, 370, 400

PPage Sizes Supported. .53, 73, 243, 263, 283PageHeightInPixels

GetPageHeightInPixels.....................167, 201, 355, 384SetPaperHeightInPixel......................167, 201, 355, 385

PageNumberingDisablePageNumbering.....................179, 213, 365, 396EnablePageNumbering......................179, 213, 365, 395IsPageNumberingEnabled.................179, 213, 365, 395

PageWidthInPixelsGetPageWidthInPixels......................167, 201, 354, 384SetPaperWidthInPixel.......................167, 201, 354, 384

Paper Height..........33, 52, 72, 242, 262, 282paper size..............33, 53, 73, 243, 263, 283

How to print using very large paper size..................419Paper size

advanced paper size...................................................35Paper Sizes

supported...................................................................33Paper Width..........33, 52, 72, 242, 262, 282PaperLength

GetPaperLength................................193, 227, 376, 407SetPaperLength.................................193, 227, 376, 407

PaperSizeGetPaperSize....................................166, 200, 354, 384SetPaperSize.....................................167, 201, 354, 384

Pass Parameters.....50, 70, 88, 260, 280, 298PassParameters

DisablePassParameters......................189, 223, 373, 404EnablePassParameters.......................189, 223, 373, 403IsPassParametersEnabled..................189, 223, 373, 403

Photo Quality......................43, 63, 252, 273pipe messages.........................................125Portrait.................35, 55, 75, 245, 265, 285Print to file check box.............................423Printer is not using the selected DPI settings

on Win2000 and XP.............................425printer messages

to the administrator account.....................................423

435292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 438: printer

Programming Interface.....................89, 299Project settings.........................................89Project Settings

XP/W2k/NT and Terminal Server..............................89

RReleaseBlackIceDEVMODE.165, 199, 353,

383Resource Toolkit.............................135, 337ResourceDLLName

GetResourceDLLName.....................195, 230, 379, 409SetResourceDLLName......................195, 230, 379, 410

Reverse bit order in TIFF....42, 62, 252, 272ReverseBitOrder

DisableReverseBitOrder....................179, 213, 365, 395EnableReverseBitOrder.....................178, 212, 364, 395IsReverseBitOrderEnabled................178, 212, 364, 395

Rotate Landscape Image to Portrait. .36, 55, 75, 245, 265, 285

RotatePaperDisableRotatePaper...........................170, 204, 357, 387EnableRotatePaper............................170, 204, 357, 387IsRotatePaperEnabled.......................170, 204, 357, 387

SSample Code...................................127, 333Save Position and style info 42, 62, 81, 251,

272, 291SaveBlackIceDEVMODE.....165, 199, 353,

383SetApplicationPath..........188, 222, 372, 402SetBrightness..................180, 214, 366, 396SetColorDepth.................173, 207, 359, 390SetDithering....................180, 214, 366, 396SetFaxHeader..................168, 202, 355, 385SetFileExtension.............182, 216, 367, 398SetFileFormat..................173, 207, 359, 389SetFileGenerationMethod182, 215, 367, 397SetFileNamePrefix..........182, 216, 367, 397SetImageFileName..........184, 218, 369, 399SetINIFileName..............183, 217, 368, 399SetInterfaceName............192, 227, 376, 407SetJPEGDLLName.........195, 229, 379, 409SetListeningPriority................................126SetLossRatio...................173, 207, 359, 389SetOrientation.................169, 203, 357, 387

SetOutputDirectory.........185, 219, 370, 400SetPaperHeightInPixel....167, 201, 355, 385SetPaperLength...............193, 227, 376, 407SetPaperSize...................167, 201, 354, 384SetPaperWidthInPixel.....167, 201, 354, 384SetResourceDLLName....195, 230, 379, 410SetTIFFDLLName..........194, 229, 378, 409SetXDPI..........................170, 205, 358, 388SetYDPI..........................171, 205, 358, 388Sharp..................................43, 63, 252, 273Show Application Window. 50, 70, 88, 260,

280, 298Smooth................................43, 63, 252, 273spatial dithering...................43, 63, 252, 273Specifying Graphic Resolution. . .36, 56, 76,

246, 266, 286Specifying Page Orientation35, 55, 75, 245,

265, 285Specifying Paper Size. 33, 53, 73, 243, 263,

283Specifying the File Format..39, 58, 78, 248,

268, 288Standard FAX mode....36, 56, 76, 246, 266,

286Start After Printing50, 70, 88, 260, 280, 298Start Application - functions. . .221, 371, 402Start Application sheet 69, 87, 259, 279, 297Start Before Printing. . .50, 70, 88, 260, 280,

298StartApplication

DisableStartApplication....................188, 222, 372, 402EnableStartApplication.....................188, 222, 371, 402IsStartApplicationEnabled................187, 221, 371, 402

StartBeforePrintDisableStartBeforePrint....................189, 223, 373, 403EnableStartBeforePrint.....................189, 223, 372, 403IsStartBeforePrint.............................188, 222, 372, 403

StartHiddenDisableStartHidden...........................191, 225, 375, 405EnableStartHidden............................191, 225, 375, 405IsStartHidden....................................191, 225, 375, 405

StartMinimizedDisableStartMinimized.....................191, 225, 374, 405EnableStartMinimized......................190, 224, 374, 405IsStartMinimized..............................190, 224, 374, 404

StartNormalDisableStartNormal..........................190, 224, 374, 404EnableStartNormal............................190, 224, 374, 404

436292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 439: printer

IsStartNormal...................................189, 224, 373, 404Stucki..................................43, 63, 252, 273

TTIFF Driver

NT/W2k/XP and terminal Server...............................32TIFF Options......................42, 62, 252, 272TIFF Uncompressed............39, 59, 249, 269TiffDll

DisableTiffDll...................................193, 228, 377, 408EnableTiffDll....................................193, 228, 377, 407IsTiffDllEnabled...............................193, 228, 377, 407

TIFFDLLNameGetTIFFDLLName...........................194, 229, 378, 408SetTIFFDLLName............................194, 229, 378, 409

transmit color pictures.........43, 63, 253, 273TSPrnMessage structure.........................125

UUnits......................33, 53, 73, 243, 263, 283Use custom extension. .47, 67, 85, 257, 277,

295

VVertical Resolution37, 57, 77, 247, 267, 287Vertical Resolution..........171, 205, 358, 388

WWaitForPrnPipe......................................126What is Fax Paper Size.....................35, 245What is Fax Paper Size?...................75, 285What is Fax Paper Size?...................55, 265When should Photo Quality Output be used?

.......................................................43, 253Win95/98 and ME Color Driver.............261Win95/98 and ME Metafile Driver.........281Win95/98 and ME Monochrome Driver. 240Windows DEVMODE......................89, 299WM_COPYDATA Message...........113, 321Write Text File......40, 60, 79, 249, 270, 289WriteText

DisableWriteText..............................176, 210, 362, 393EnableWriteText...............................176, 210, 362, 392IsWriteTextEnabled..........................176, 210, 362, 392

XXDPI

GetXDPI...........................................170, 204, 358, 388SetXDPI...........................................170, 205, 358, 388

XP/W2K/NT and Terminal Server Color Driver....................................................51

YYDPI

GetYDPI...........................................171, 205, 358, 388SetYDPI...........................................171, 205, 358, 388

ZZSoft PCX Image Format. . .39, 59, 249, 269

437292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 – 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution

Page 440: printer

438292 Route 101, Amherst, NH 03031 Tel: (603)673-1019 Fax: (603)672-4112

© 1989 - 2001 Black Ice Software Inc. Information Contained Is Not For Reproduction Or Distribution