Tech Blog

Setting up a Receipt Printer (and Letters) with ALMA

I hope this will help other people set up a receipt printer to use with Alma. For the first two steps, I am referring to documentation and videos that helped me with our setup. Many libraries may have these two steps already done, even without using a receipt printer.

I am not a coder, and I knew that to set up a receipt printer, it would mean some edits to the xsl in the letter configuration, which admittedly made me a bit nervous.

I asked on the Alma listserv for help and was able to get a couple of xsl examples of letters that someone else had set up for a receipt printer. These examples were for two slips we wanted to print (Transit Slips, Request Slips); in addition we wanted to also set up a third slip to print – the Fines/Fees Receipt. The fines/fee receipt was a bit trickier because it includes a table.

1. Set up Printouts Queue.

I used Yoel Kortik’s information and video to set up the Printouts Queue

Power Point: https://knowledge.exlibrisgroup.com/@api/deki/files/73678/Letters_-_The_Printout_Queue_and_Quick_Printing_in_Alma.pptx?revision=5

Video: https://www.youtube.com/watch?v=3ISe3bhv09c

2. Set up Print Daemon.

This will set things up so you don’t have to manually intervene to print the slips. You can set the Print Daemon to check for anything to be printed every 30 seconds. Set it to .5 minutes when you reach that step.

I used Yoel Kortik’s information and video to set up the Print Daemon.

Developer’s Blog post: https://developers.exlibrisgroup.com/blog/how-to-set-up-and-use-the-alma-print-daemon/

Video: https://www.youtube.com/watch?v=hnIvUCIFxCg

3. Set up the XSL.
You will need to adjust the xsl for the slips you will be printing to make them narrower.

It’s a good idea to make one change at a time, then test after each one so if something goes wrong, you have an idea where that happened (see #4 for testing).

I started in the Sandbox.

  • Go to Config > General > Letters Configuration

  • Find the letter you want to work on. I edited the Ful Transit Slip Letter, Ful Resource Request Slip Letter, and Fine Fee Payment Receipt Letter. I started with the one I thought would be easiest first.

  • I copied the original xsl (from the Template tab)

out of the Sandbox into Word (a text editor could work, too, but I wanted to use formatting options such as font colours and highlighting so my changes would stand out) and did some adjusting external to the Sandbox. I highlighted the sections I was changing, so I knew what to copy/paste back into the xsl in the Sandbox.

For all three that I edited:

A. I removed the default header and added in a title (this looks a bit different for the Request Slip, but the idea is the same):

B. Just underneath that, I added in a width (I did not do this for the Fines/Fees Receipt, as it includes a table, so it didn’t seem to help):

C. I removed the default footer and added in some text instead. (For the Request Slip, I simply removed the footer altogether; I did not replace it with any additional text, as I didn’t think it was needed.)

I changed the header and footer because they span the width of the entire sheet. You can also adjust any headings for size with the strong tags (for bold) and/or with the h1 (h2, h3, etc.) tags for size.

The above was all I needed to do for the Transit Slip letter.

For the Request Slip letter, in addition to the above, I made a few additional changes to the size of the font at various points via bold/not bold and h tags as mentioned above.

I also decided to make the location and the call number a list, instead of side by side on the slip. Although it showed on my screen as looking ok before I made this change, when I actually printed it, it was cutting off part of the call number. So, I made it a list by adding the </tr><tr> tags added in between the two items in the xsl.

For the Fines/Fees Receipt, I changed the entire table into a list (because the table had columns that made the entire receipt too wide to print to the receipt printer).

I deleted the entire table, then added the individual components back in using the <tr></tr> tags before and after each component. You’ll also notice I added in the “width=25%” for each one:

(And so on for all the different components.)

At this point, the totals were still right aligned, which I didn’t want, so I changed the xsl to this:

Note that, as I went along, I had to do some online searching to help with the xsl tags that I should be using for certain things. If I have missed something here, or you want to do something I didn’t, depending how well you know xsl, you might have some luck doing a search for help.

4. Test as you go.

To test what it looks like (make one change at a time to make it easier to know what works and what doesn’t), use the Letter Example tab:

Initially, you may only have a “DefaultLetter” for testing, which is pretty sparse.

Alternately, you can download some examples from the Developer’s Network here: https://developers.exlibrisgroup.com/blog/alma-letters-xml-samples-for-working-on-xsl-customization/

If using the downloaded ones, use “Upload letter example (XML)” and upload the example of the letter you are working on. Then make it the default.

I started with these, then decided to use our own information. You need to set up your email in the Sandbox so that you are emailed the letter you are working on. Once you have actually sent a letter out of that type, you can use that for testing.

Remember that you need to set up your email in the Sandbox environment for Alma to know that it is ok to send something from the Sandbox to your email.

You can do this from Config > General > Allowed Emails

“Add Row”, add your email address, and Save.

NOTE: Once I copied my xsl into Production, I had to retest with the actual receipt printer as the on-screen testing wasn’t exactly how it looked on the receipt printer, though it was close.

You may have other slips you’ll want to print to your receipt printer, and you may have have additional tweaks you’ll want to do, but this is what we’ve done (so far).

5 Replies to “Setting up a Receipt Printer (and Letters) with ALMA”

  1. Hi,
    I am trying to use a program to print on a receipt printer with 80mm wide paper. How to remove / reduce margins (right and left)? 2x 15 mm is a lot – it’s a waste of paper, and the printout could be more readable.

  2. Hi, Krysztof.

    Does your program use xsl? I don’t know a lot about xsl, so for me, it was pretty much trial and error.

    I had a couple of different examples to work with and one gave me a width in “pt” and the other was a percentage.

    For the fines receipt, I used the percent:
    “width:25%”

    For the hold slip and transit letter, I used the “pt”:
    width=”325pt”

    I can’t recall why I did it that way; my best guess is that was based on the examples I had to copy from.

    I would suggest just testing it out. For the letters in Alma, you can test it on the screen first and if you think it looks ok, you can do a real test with your printer.

    I think this is not necessarily reducing the margins so much as letting it know how wide you want the print to go on the paper.

    I’m not sure if this is helpful for your situation or not.

  3. Hi Cindy,
    Thank You for reply.
    I’m trying to use Alma Print Deamon. There are no margins in the preview anymore – I removed it using “width =”
    But there are still margins on the printout. Maybe the program itself adds it. In the Windows printer configuration, the margin is set to 0mm and the old program (Horizon) prints without margins.
    On larger paper (A5), such a margin is not a problem. But at 80mm – unfortunately yes.

  4. Oh, shoot! I don’t recall seeing this issue for us.

    Right now I’m working at home, so I can’t look at a current printout. I don’t even know off the top of my head how wide the paper is for our receipt printer.

    Have you tried both the percent and the pt for the width? Maybe one will work better than the other.

    The only other suggestions I can think is to do a google search to see if there are ideas out there, or are you on the Alma listserv? Maybe someone else has had the same issue and was able to solve it.

    I found this. Their xsl doesn’t have that “width = ” in it at all. Their cellpadding is also smaller than I have set up at 2.
    https://knowledge.exlibrisgroup.com/Alma/Community_Knowledge/Automatically_Printing_Alma_Loan_Receipt_Letters_to_a_Thermal_Receipt_Printer

  5. Hi, Krzysztof.

    Would it be helpful to see my entire xsl for one of the slips that is working for us? Is there a way to message someone directly on this site? I could send you the entire xsl if you wanted to look closer to see if you can find something else that might help you out.

    Cindy

Leave a Reply