Print

Print


Sorry, the HTML

<span style="font-family: 'Libre Barcode 128', Wingding;">12309809SA</span>

should do the fallback trick I mentioned.  Apologies for omitting it from
the example while leaving the prose in!



On Thu, Aug 3, 2023 at 10:26 AM Adam Constabaris <[log in to unmask]>
wrote:

> Assuming you have a suitable font installed on the computers that are
> looking at the barcodes (e.g.
> https://fonts.google.com/specimen/Libre+Barcode+128 <- not an
> endorsement, YMMV, etc.), the HTML
>
> <span style="font-family: 'Libre Barcode 128';">12309809SA</span>
>
> Should display the value inside the span as a barcode, falling back to
> Winding as an obvious indicator that something has gone wrong. If you're OK
> hard-coding the font-family value, that should be fairly straightforward to
> put in an XSLT.  I'm not familiar with the particular context of Alma, but
> if your custom barcodes arere in a "custom-barcode" element in the source
> XML:
>
> <xsl:template match="custom-barcode">
>         <span class="barcode" style="font-family: 'Libre Barcode 128';">
>             <xsl:value-of select="."/>
>         </span>
>  </xsl:template>
>
> might do the trick, although working out how to ensure that template is
> matched in the right place might require more thought.
>
> HTH,
>
> AC
>
>
>
> On Thu, Aug 3, 2023 at 9:49 AM Hammer, Erich F <[log in to unmask]> wrote:
>
>> Hi,
>>
>> We have barcodes embedded in a number of the "letters" (i.e. receipts)
>> that Alma sends to patrons or ILL offices, but those barcodes are for
>> material IDs that are normally input via barcode scanner and are referenced
>> in the XSLT of the letter as a .PNG.  IOW, Alma holds/constructs an image
>> of a barcode for the ID of the materials and makes it available to the
>> email/receipt.  We have recently added/changed a letter to include another,
>> long-number-string, ID and would like to have a barcode displayed for it as
>> well.  Otherwise, someone has to read and manually enter the string which
>> greatly increases the chance of error.
>>
>> I assume we can't convince Alma to construct a barcode image for any old
>> number string, so we will need to modify the XSLT code of the letter to
>> display that string in a barcode font.  This letter will be printed from
>> specific machines, so it will be possible to ensure the font is installed,
>> but I don't know how to embed the HTML/CSS code necessary into XSLT.
>>
>> Does anyone know how to do that?
>>
>> Thanks,
>> Erich
>>
>>
>> --
>> Erich Hammer            Head of Library Systems
>> [log in to unmask]         University Libraries
>> 518-442-3891              University @ Albany
>>
>> "Beliefs are what divide people. Doubt unites them."
>>                                      -- Peter Ustinov
>>
>