New User? Sign Up  |  Sign In  |  Help
Barcode support and
tutorials from IDAutomation
and the community.
Click for the BBB Business Review of this Computers Hardware, Software & Services in Tampa FL
Resolved Questions

Link element in XSL file pointing to barcode font of 39


I am in the middle of working on an XSLT file. The XSL file converts an XML doc to an HTML doc that contains a 16-digit number displayed as a barcode, The HTML doc is sent out as an email, so JavaScript is not allowed in email. I need to know if it is possible to use the Link Element in XSL / HTML with HERF pointing to the IDAutomationHC39 Code 39 Barcode Font.

Operating System: The xsl file create html doc that is sent out as email, so js are not allowed in email.

08-03-23     205 day(s) ago    

  Report Abuse

 

Brant

Best Answer

Using the Link Element in XSL / HTML and referencing a font in this way is not ideal. When using fonts on the web or as an HTML link, IDAutomation recommends the Dynamic Barcode Generator SaaS because the barcode will be a URL such as:
https://www.bcgen.com/demo/linear-dbgs.aspx?S=0&D=CODE-39

Another option would be to use the WOFF fonts that are provided with any developer license. This is also easy to do, refer to the WOFF Web Fonts in CSS and HTML example.

When using fonts from the web in this way, ensure that appropriate Web Font Domain Restrictions are in place to keep others from using the font for other purposes.

Posted 205 day(s) ago

(0)
(0)
  Report Abuse
 
Find Interesting
 
Email to Others
 
Bookmark
 
Subscribe to Answer Alert
No comments yet.     Be the first to comment.
Other Answers (1)
To add a link element in an XSL file pointing to a barcode font of type Code 39, you need to include the appropriate CSS styling within the XSL file. This styling will define how the barcode font is applied to the content. Here's an example of how you can add a link element to the XSL file:

```xml
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="UTF-8"/>

<!-- Define the Code 39 barcode font and its CSS style -->
<style>
@font-face {
font-family: Code39;
src: url(path-to-your-font/IDAutomationHC39.ttf); /* Replace with the actual font file path */
}

.barcode {
font-family: Code39, Arial, sans-serif; /* Use Code39 font or fallback to Arial */
font-size: 24px; /* Adjust font size as needed */
}
</style>

<xsl:template match="/">
<html>
<head>
<!-- Add any necessary head content here -->
</head>
<body>
<!-- Create a link element with the barcode font applied -->
<a class="barcode" href="#">123456</a>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
```

In this example:

1. Replace `path-to-your-font/IDAutomationHC39.ttf` with the actual file path to the Code 39 barcode font on your system.
2. The `@font-face` rule defines the font family "Code39" and specifies the font file using the `src` property.
3. The `.barcode` class specifies the CSS style for the barcode font, including the font family and font size.
4. Inside the `xsl:template` element, the `a` element with the class "barcode" is used to create a link with the barcode font applied. You can replace the `href` attribute with your desired link destination. Keep in mind that the availability of font embedding depends on the capabilities of the rendering engine or software that processes the XSL-FO output. Ensure that you have the appropriate license to use the barcode font for your intended purpose.

Posted 190 day(s) ago

(0)
(0)
   Report Abuse
Email this question link to friends
You must enter an email address, if name is entered or vice-versa for each friend.
Friend #1 -
Friend #2 -
Friend #3 -
Friend #4 -
Friend #5 -
  Your comment on this question
  |         |  
bold  italic  underline  strike       big  small       superscript  subscript 
  Allows to add a link. Added links would only be converted to actual clickable link, when the domain of the link is white-listed by administrator.
Caption :
Link URL :
(Must starts with "http://")
Add  |   Cancel
  Allow to insert an image. Must be among the following file types - *.jpg, *.gif, *.png & *.bmp.
Image Url :   Upload New
(Image url must always starts with " http:// ")
Width : pixels
(Must not be greater than 450px. Enter 0px for no resize)
Add  |   Cancel
  Allow to insert YouTube video. Insert the video embed code.
Embed Code :
Add  |   Cancel
Up to 5000 Characters are allowed. Current Count: 0
  Your comment on this answer
  |         |  
bold  italic  underline  strike       big  small       superscript  subscript 
  Allow you to add a link. Added links would only be converted to actual clickable link, when the domain of the link is white-listed by administrator.
Caption :
Link URL :
(Must start with "http://" or "https://")
Add  |   Cancel
  Allow to insert an image. Must be among the following file types - *.jpg, *.gif, *.png & *.bmp.
Image Url :   Upload New
(Image url must always start with "http://" or "https://")
Width : pixels
(Must not be greater than 450px. Enter 0px for no resize)
Add  |   Cancel
  Allow to insert YouTube video. Insert the video embed code.
Embed Code :
Add  |   Cancel
Up to 5000 characters are allowed. Current Count: 0

You may answer and comment on any thread according to the Terms and Conditions.

 © Copyright 2021 IDAutomation.com, Inc., All Rights Reserved. Legal Notices.

 Barcode Fonts | Components | Scanners | Support | Contact Us
Training Videos on YouTube Join us on Google Plus Join us on LinkedIn Follow us on Twitter Like us on Facebook