Sprache auswählen

ELP offers various possibilities to translate readable text into a new symbol set, e.g. for being able to copy and past text from generated PDF with German Umlaute or with readable text at all.

Here find 3 way how to implement this:

Automatic symbol set conversion First sample below Every byte of an incoming data stream is converted. E.g. for EBCDIC to Windows conversion
Symbol set conversion for printable text characters only Second sample below Only readable texts between two named start and end strings are converted. Escape Sequences, Graphics commands are not changed
Symbol set conversion for printable text characters only Third sample below Same as second sample, but the start stop ranges are set with search commands and even several different conversions can be applied.
ConvertSoftFont2ISO follow link ELP tries to convert all true type font based texts from the Windows symbol set coding, int ISO. Than the PDF converter can create searchable PDFs.


Automatic symbol set conversion (complete data stream)

ELP is able to convert any incoming characters to ASCII or any other symbol set using the key INSYMBOLSET. As incoming data is completely converted (including escape sequences) the key should be used in one of the default activated sections: GLOBAL, User-, Printer-, Port- or Driver-Name .

The conversion files are again standard ASCII files and can be changed using an ASCII editor. ELP comes with an example file ebcdic.sym, which defines the conversion from EBCDIC to ASCII.

InSymbolSet=FileName.sym

The File needs to be located in the Working folder which is most likely c:\ProgramData\WELP

The syntax of the symbol set definition file is pretty easy:

ASCII-Character-Number Min-One-Blank Source-Character-Number

In order to change or generate a new symbol set file, copy the provided ebcdic.sym file and modify the new file.

Symbol set conversion for printable text characters only (Search ON-Off in given sequences)

A very powerful function can convert any text in any symbol set to another symbol set. It is used for example to convert the Latin encoding of Russian characters into the any printable Russian symbol set.

The function is even performed in front of the Unicode & Asian Double-Byte printing conversion, so you may convert single byte even to Unicode and then use the Unicode function to add the characters.

For every print job you can currently only define one set of conversion. The sets can be different between data streams.

Please find below the example for Russian characters. As Russian is most likely build into any the printer, the Unicode conversion is not needed.

First a definition file for the symbol set conversion is needed. ELP provides by default a file called Cyrillic.def:

[GLOBAL]

;. . . Standard settings

; defines where to look for the symbol set conversion file

CharConvertionFile=#ELP_FORMS_PATH#Cyrillic.def

; assign ID 1000 to the file

CC_EnableValue=1000

; Define the sequence in the data stream, which does select the language. After that sequence the conversion for all texts will be started

CC_SelectionSequence=\x1B(3R\x1B(sp10hsb4099T

; This sequence will stopp the conversion, so a second symbol set can be used.

CC_DeSelectionSequence=\x1B(10U\x1B(sp10hsb4099T

An extract of the used Cyrillic.def file

[Conversion Table]

a=\xA0
B=\x81
b=\xA1
...
ZH=\x86
zh=\xA6
Z=\x87
...

 

Each conversion file must have a unique ID, as under this ID the conversion later is started and stopped. Therefor the section [GLOBAL] or any other of the automatic analyzed rules must minimum name this ID using the key: CC_EnableValue. The ID should be above 999 and the CharConvertionFile key..

The other two keys in there are only needed, if

  1. The real font selection is not part of the data stream, or
  2. it was not already set by any searched rules, where the conversion is turned on.

The conversion table itself can search for up to 4 characters and replace it into maximum 4 other characters. The routine is smart enough to be able to handle such tricky conversions like for example "zh" to ASCII 166 but "za" for example to ASCII 135 and 128. In this example the Latin description of Cyrillic is converted into the CP 866 Symbol set (PC Cyrillic).
The specifications of the table are:

  1. If a character is not defined, it is simply passed through, without conversion. E.g. digits.
  2. The equal sign is not allowed to be used in the from part. Correct can be: X== do X will be converted into an equal sign. Not allowed ==1. Here use \x3D=1
  3. Use the hex notification for characters below 32 and above 127. \x## where ## is in upper case the hex value. 3D is ASCII 61 or the equal character
  4. The from and to part can maximum have 4 Bytes.
    correct: 123=\x80\x81\x8D\x96
    incorrect: 12345=678 or 123=12345
  5. The replaced pattern is NOT run through the conversion again!

The usage:

The minimum needed for invoking this conversion is to have the native selection and deselecting escape sequences right in the data stream:

ABC...<Esc>(s1000ZABC...<Esc>)s1000ZABC...
will be converted into
ABC...???...ABC...

So the conversion can be activated by this method:

[GLOBAL]

CharConvertionFile=#ELP_FORMS_PATH#Cyrillic.def

Symbol set conversion for printable text characters only (Add ON-Off commands in data stream)

[GLOBAL]

;. . . Calls the definition

CharConvertionFile=#ELP_FORMS_PATH#12U_2_19U.def

 

[symbol set conversion start 1000]

; Search for the PCL5 command for IBM PC 850 symbol set

Search_Binary=\x1B(12U

; Add replace it to the ISO 8859/1 symbol set and add the stop conversion command for the ELP interpreter

Replace_binary=\x1B(19U\x1B(s1000Z
ReadOnlySearchKeys=ON

[symbol set conversion ends 1000]

; You may add more searches for deselecting if needed

Search_Binary=\x1B(9Y

; Add the stop conversion command for the ELP interpreter

Add_binary=\x1B)s1000Z
ReadOnlySearchKeys=ON

 

Note: Just in case you have code words in your data stream e.g. PC850 on and off the convert.ini may also look like that

 

[Turn PC850 on with Sequence selection in def file]

Search_Binary=!PC850ON!
Replace_Binary=\x1B(s1000Z
CharConvertionFile=#ELP_FORMS_PATH#12U_2_19U.def

Or

[Turn PC850 on with Sequence selection]

Search_Binary=!PC850ON!
Replace_Binary=\x1B(19U\x1B(sp10hsb4099T\x1B(s1000Z
CharConvertionFile=#ELP_FORMS_PATH#12U_2_19U.def


;And

[Turn PC850 conversion off and back to 850]

Search_Binary=!PC850OFF!
Replace_Binary=\x)s1000Z\x1B(12U\x1B(sp10hsb4099T

In conjunction with the searched term, you can even change the used fonts :

The content of the file 12U_2_19U.def is for ÄÖÜäöü and ß conversion is:

[GLOBAL]

CC_ENABLEVALUE=1000

; IBS 850 to ISO 8859/1

[Conversion Table]

\x81=\xFC
\x84=\xE4
\x94=\xF6
\x8E=\xC4
\x99=\xD6
\x9A=\xDC
\xE1=\xDF

 

Wir benutzen Cookies

Wir nutzen Cookies auf unserer Website. Einige von ihnen sind essenziell für den Betrieb der Seite, während andere uns helfen, diese Website und die Nutzererfahrung zu verbessern (Tracking Cookies). Sie können selbst entscheiden, ob Sie die Cookies zulassen möchten. Bitte beachten Sie, dass bei einer Ablehnung womöglich nicht mehr alle Funktionalitäten der Seite zur Verfügung stehen.