Advanced text output

 

In order to retrieve the exact coordinates of the text from the printed document, use the advanced text out feature by checking the Save position and style option from the File Formats tab.

 

When using the Save 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 term of pixel position.

 

Save Position and style- option will cause the driver to save additional formatting information in the text file. The Save Position and style  option 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 with double brackets 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 in the [,,] signs, like this: [B,,I] for Bold and Italic.

 

The text file generated from the Test Page using the advanced text out will contain 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 character [in the printed text, the printer driver inserts a back-slash character of \ front of the open brackets character like \[. The driver will insert two back-slash characters front of each black slash character.

 

For example, if one prints a text file with the single line:  [ [[ \[ \[[

 

The formatted text output would read: [[1,2,3,4][10][,,][Courier New]]\[ \[\[ \\\[ \\\[\[

 

The black slash will be used just line in standard C programming language. The double black slash follows by the third black slash, indicates that a single black slash is printed in document.

 

Space after every text command


By default, the Black Ice printer driver adds an extra space after each text command is received.  This is done so one can differentiate text output from applications like Excel, so that there is a space between each cell. 

a.    In the blue box, there is an extra space. This is added on purpose in order to separate the text and ‘[‘character.

b.    In the green box, just before the thin line, there are 2 spaces. The printed document contained on space and one padding space.

 

Removing space after every text command in the generated text file

 

When the Black Ice Printer Driver extracts text out of the input files, by default it adds an extra space after each text command received. This is important when extracting text out of an excel spreadsheet. It will ensure that there will be a space between each cell.

 

In some cases these extra space characters may not be necessary. In order 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 // Default value is 1. To remove extra space set it to 0