-1

I am able to print bold following instructions.

What I am having trouble with, is figuring out how to disable the bold so that the next item printed in the list does not carry the bold type. I do not want to use '|N' as this sets all formats back to Normal including alignment. How do I disable the bold after I am completed. I want the ability to do the following:

What I am looking for

Text1 Text2 Text3

What I've Tried

slipHeader &= vbCrLf & "1: " & ESC.Value & "|bC" & "test" & ESC.Value & "|N" & ESC.Value & "|bC" & " test2" & ESC.Value & "|N"
slipHeader &= vbCrLf & "2: " & ESC.Value & "|bC" & ESC.Value & "|cA" & "test" & ESC.Value & "|N" & ESC.Value & "|cA" & ESC.Value & "|bC" & " test2" & ESC.Value & "|N" 

The example above is written in VB. My ultimate code is in C#.

Any Answer would suffice as I will translate to C#.

Chris Dunaway
  • 10,974
  • 4
  • 36
  • 48
Demodave
  • 6,242
  • 6
  • 43
  • 58
  • Are you sure this is `c#` code, it looks a suspiciously like `VB`? – pstrjds Aug 15 '18 at 13:13
  • I've updated the description. – Demodave Aug 15 '18 at 13:16
  • From the [documentation](https://learn.microsoft.com/en-us/previous-versions/windows/embedded/ms884868(v=winembedded.11)), which is linked in the question you linked: `Print Line - Characteristics that are reset at the end of each print method or by a "Normal" sequence.` which is the header over the section including Bold and other text formatting. So from that it seems like you either have to call a second print method or you need to pass the `|N` normal sequence, and set the formatting again. – pstrjds Aug 15 '18 at 13:21
  • I've update the description, I cannot use the |N normal sequence, because that will destroy the alignment. – Demodave Aug 15 '18 at 13:32
  • Just use the right command to turn bold on and off. ESC+E, MSDN happens to [have a page](https://learn.microsoft.com/en-us/windows/uwp/devices-sensors/epson-esc-pos-with-formatting) that shows it being used. – Hans Passant Aug 15 '18 at 13:52
  • @HansPassant I had looked at that page but it didn't work for me. I ended up implementing the ! suggested by kunif – Demodave Aug 16 '18 at 18:21

1 Answers1

1

If the compliant version of the printer OPOS control you are using is 1.10 or later, you may be able to disable only the bold attribute with the escape sequence "ESC |! bC". Please refer to the explanation on the printer escape sequence of OPOS document you are using.

For relevant OPOS standard specifications, refer to page 1044 of the UnifiedPOS 1.14.1 document (page description in the document is "30-28").

kunif
  • 4,060
  • 2
  • 10
  • 30