<%@ page contentType="text/html" %> <%@page import="java.util.Collection"%> <%@page import="java.util.Iterator"%> <%@page import="org.krysalis.barcode4j.BarcodeUtil"%> Barcode4J Servlet

Barcode4J Servlet

This page demostrates the usage of the BarcodeServlet.

<% final String genbc = bcrequest.toURL(); if (bcrequest.isSVG()) { %>

The generated barcode in SVG format (only displayed if SVG is supported in your browser):

<% if (bcrequest.isSvgEmbed()) { %>

<% } else { %>

<% } } else if (bcrequest.isBitmap()) { %>

The generated barcode in <%=bcrequest.getFormat()%> format (only displayed if <%=bcrequest.getFormat()%> is supported on the server and in your browser):

<% } else { %>

The generated barcode cannot be previewed. Format is <%=bcrequest.getFormat()%>.

<% } %>

The following is the URL that was used to create the above barcode:

<%=genbc%>

Change the parameters:

Output format (required):

Some bitmap formats won't work if there's no image encoder available for this format.

SVG display style:

/>

Checked uses <EMBED> (better for Internet Explorer), unchecked uses <OBJECT> (better for Firefox).

Grayscale:

/>

Applies to bitmap formats only (JPEG, PNG etc.)

Bitmap resolution (in dpi):

"/>

Applies to bitmap formats only. Example: 300

Barcode type (required):

Message (required):

"/>

Height:

"/>

Example: 2.5cm

Module Width:

"/>

Example: 0.3mm

Wide Factor:

"/>

Example: 2 or 3

Enable Quiet Zone:

"/>

Example: 10mw or 1cm. Use "disable" to disable the quiet zone.

Placement of human-readable part:

Human Readable Size

"/>

Example: 8pt

Human Readable Font

"/>

Example: "Helvetica"

Human Readable Pattern

"/>

Example: "\_patterned\_:__/__/____" (Any '_' is placeholder for the next message symbol, all other pattern symbols will be inserted between. The '\' is escape char. If the patterned message is too long you can increase the quite zone lenght to make it visible)

For the documention on Barcode4J, please visit http://barcode4j.sourceforge.net.