BMP tag in HTML printer throws Windows exception

My config is:

Windows 7 in a Virtualbox VM
Epson TM-T88V receipt printer
Printer mode: HTML printer (*note: using ticket printer, the logo prints fine)
Printer template code: c:\Sambapos_data\Images\logo.bmp

When I press “bill”, normally the ticket screen exits and the bill prints. Instead, the ticket screen exits and a popup message appears:

There is a problem while printing. Check printer and printer template settings.
Error Message: ‘Initialization of ‘System.Windows.Media.Imaging.BitmapImage’ threw an exception.’ Line number ‘1’ and line position ‘296’.

Also a separate question:
Can I use my printer’s stored logo instead via <XCT>? I saw in a post (reciept logo | SambaPOS V3) that I can use <XCT>29,40,76,6,0,48,69,32,32,1,1 where 32,32 is the logo code. But I tried it and it doesn’t work (my logo code is also set to 32,32).

Thank you
Aaron

I have a TM-T88V and I use this command to print my logo stored at 32,32 (Ticket Printer):

<XCT>29,40,76,6,0,48,69,32,32,1,1

Drawer Kick:

<XCT>27,112,48,55,121

@emre, could you enhance this error message by including the Print Job that is failing? It would help to track down which Printer and which Template is being used during the failure.

I haven’t used the HTML printer, so there may be an issue with that printer type that @emre will need to look into… does it support <XCT> commands?

@aaronlee29, perhaps post screenshots of the Printer, Printer Template, and Print Job.

This is probably a permission issue. Can you move image file under [My Documents] folder and try it again?

@emre and @QMcKay:

Under “ticket printer” mode:
<BMP> works fine (regardless of image location)
<XCT> works fine

Under “html printer” mode:
<BMP> works only if the image is in My Documents (@emre you’re right about this).
<XCT> does not work. Is this a bug?

Thanks for the help. Hope the above is useful to you as well.
Aaron

This is not a bug. Unlike Ticket Printer or Port Printer, HTML printer does not interact with printer directly. That’s why it does not support <XCT> tag and image processing is different.

When needed you can create additional printer configuration for same printer and create additional print jobs to send <XCT> commands.

… also I’ve checked error message to include print job name but that part is a little complex than I expected. I’ve noted it for future updates.

Can you move image file under [My Documents] folder and try it again?

My printer logo is in C:\Users\MainServer\Documents\ and it works fine.
But my the account names on my client computers are not “MainServer”, so when they try to print the logo, they get an error.

I suppose that if all my computers have the same account name, this is not a problem, but is there an alternative to using the same account name on all computers?

Thanks
Aaron

Hello @QMcKay

I am using XCT command to print the logo.

But it is left aligned, how can I print it in center ?

I’m not sure if this will have the desired effect, but you can try Enable Center <EC>:

<EC>
<XCT>(codes to print stored logo)
<EL>

If that doesn’t work, you will need to modify your logo by changing it’s width and adding blank area to the left side.

Please report back to let us know if the <EC> command works or not in this case.

HI All,

I am trying to do this with a Proline Bixolon SRP-350ii and I cannot figure out how to sent the “<XCT>” command to it, the documentation for the printer is rather cryptic. Please could someone assist? I have tried those already defined by others in the forums and they did not work.

My image is stored in the printer memory at address 00 and the one page says I need to send “FS p 1 0” in the header.

You need to translate the characters into decimal:

F = 70
S = 83
p = 112

The command you’ve given would then be:

<XCT>70,83,112,1,0

@tarnalcock it will be better if you can improve your question by adding more details about the command you need. It can be the screen shot of that manual “page” or something else that can help us to answer question without having to guess possible parameters.

You can visit this topic for an example:

hello @QMcKay,I tried converting character with decimal, but not succeeded
my printer is BIXOLON SRP 350III
any idea? help

appears in the header of the printing FSp
Cazz.

You can use an ascii table for finding decimal values of commands.

1 Like

perfect, works
thank @emre

<XCT>28,112,1,0