To retrieve the exact coordinates of the text from the printed document, use the Advanced text output feature by selecting the Add font information, position and style option in the Formatting Style dropdown list.
When using the Add font information, position and style option, next to every line of text, the printer driver writes the name of the font, the font size, the font style (Bold, Italic, Underline) and also the coordinates of the text in terms of pixel position.
Add font information, position and style
This option makes the driver save additional formatting information in the text file. The Add font information, position and style option is only available if Write Text File is enabled.
The text output is stored in the [[X1, Y1, X2, Y2][P][B,U,I]] text format. The format starts and ends with double brackets. The brackets can be used to parse the file. The format information has the following meaning:
X1= The left text coordinate.
Y1= The top text coordinate.
X2= The right text coordinate.
Y2= The bottom 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.
The coordinates are relative to the upper left hand corner of the image. The first two numbers are the X and Y coordinates of the beginning of the text (top left corner of the text). The third and fourth values are the coordinates of the end of the text (lower right corner).
If the text has a style, the style is saved as I, B, U using the [,,] signs, for example, [B,,I] for Bold and Italic.
The text file generated from the Test Page using Advanced text output contains the following lines:
[[600,150,1306,300][32][,,][Times New Roman]]Windows XP
[[600,300,1511,450][32][,,][Times New Roman]]Printer Test Page
[[150,600,550,642][10][,,][Lucida Console]]Congratulations!
[[150,684,2225,726][10][,,][Lucida Console]]If you can read this information, you have correctly installed your Black Ice TIFF
[[150,726,550,768][10][,,][Lucida Console]]Driver on ALPAR.
[[150,810,1900,852][10][,,][Lucida Console]]The information below describes your printer driver and port settings.
[[150,894,1050,936][10][,,][Lucida Console]]Submitted Time: 5:43:22 PM 9/20/2004
[[150,936,675,978][10][,,][Lucida Console]]Computer name: ALPAR
[[150,978,900,1020][10][,,][Lucida Console]]Printer name: Black Ice TIFF
[[150,1020,1075,1062][10][,,][Lucida Console]]Printer model: Black Ice TIFF Driver
[[150,1062,600,1104][10][,,][Lucida Console]]Color support: No
[[150,1104,800,1146][10][,,][Lucida Console]]Port name(s): IcePortMR:
[[150,1146,850,1188][10][,,][Lucida Console]]Data format: NT EMF 1.003
[[150,1188,550,1230][10][,,][Lucida Console]]Share name:
[[150,1230,550,1272][10][,,][Lucida Console]]Location:
[[150,1272,550,1314][10][,,][Lucida Console]]Comment:
[[150,1314,850,1356][10][,,][Lucida Console]]Driver name: BuMDrvNT.dll
[[150,1356,850,1398][10][,,][Lucida Console]]Data file: BuMIniNT.ini
[[150,1398,850,1440][10][,,][Lucida Console]]Config file: BuMUifNT.dll
[[150,1440,650,1482][10][,,][Lucida Console]]Driver version: 6.00
[[150,1482,900,1524][10][,,][Lucida Console]]Environment: Windows NT x86
[[150,1524,900,1566][10][,,][Lucida Console]]Default datatype: NT EMF 1.003
[[150,1608,1075,1650][10][,,][Lucida Console]]Additional files used by this driver:
[[150,1650,1425,1692][10][,,][Lucida Console]] C:\XP\System32\spool\DRIVERS\W32X86\3\BuMResNT.DLL
[[150,1692,1375,1734][10][,,][Lucida Console]] C:\XP\System32\spool\DRIVERS\W32X86\3\TIFF32.DLL [[1550,1692,1850,1734][10][,,][Lucida Console]](9, 1, 2, 0)
[[150,1734,1375,1776][10][,,][Lucida Console]] C:\XP\System32\spool\DRIVERS\W32X86\3\JPEG32.DLL
[[150,1818,1175,1860][10][,,][Lucida Console]]This is the end of the printer test page.
To process open brackets characters ([) in the printed text, the printer driver inserts a backslash character in front of the open brackets character (\[). The driver inserts two backslash characters in front of each backslash character.
For example, if one prints a text file with the single line: [ [[ \[ \[[
The formatted text output reads: [[1,2,3,4][10][,,][Courier New]]\[ \[\[ \\\[ \\\[\[
A backslash is used like in standard C programming language. If a double backslash is followed by a third backslash, it indicates that a single backslash is printed in the document.
Space after every text command
By default, the Black Ice Printer Driver adds an extra space after each text command is received to be able to differentiate text output from applications. For example, in Excel, an extra space inserted after each text command puts a space between each cell in print.
a. In the blue box, there is an extra space. This is added on purpose in order to separate the text and the square bracket ([) character.
b. In the green box, just before the vertical line, there are two spaces. The printed document contained one space and one padding space.
Removing Space after Every Text Command in the Generated Text File
When the Black Ice Printer Driver extracts text output from the input files, by default, it adds an extra space after each text command received. This is important when extracting text output from an excel spreadsheet to ensure that there is a space between each cell.
In some cases, these extra space characters are not necessary. To stop inserting a space character after every text command in the generated text file, add the following section to the printer driver .INI file.
[Text Output Settings]
Add Space=0 //
The default value is 1. To remove extra space, set it to 0.
Disable Page Numbering
One can disable the Page number delimiters in the text output by checking Disable Page Numbering option.
Use Legacy Coordinates
The coordinate calculation has changed in printer driver version 14.35.
When the Use Legacy Coordinates option is enabled, the Printer Driver generates coordinates based on previous version of text extraction.
The extracted text coordinates with Use Legacy Coordinates option will be the same as with Printer Driver version 14.35 and earlier.
This option could be useful if one updated to the latest Black Ice Printer Driver, but insists to use the same coordinates for commonly extracted documents.