Java Barcode Generator, .NET Barcode Generator for C#, ASP.NET, VB.NET
HOME PURCHASE SITEMAP COMPANY

Home > Java Barcode Generator > Java Barcode Generation Guide > Java ISSN Barcodes Generator

Download Java Barcode Trial

Java ISSN Barcodes Generator Guide

ISSN Bar Code Generation Guide in Java class, J2EE, Jasper Reports, iReport & Eclipse BIRT

  • Easily generate ISSN barcodes in Java applications
  • Generate high quality ISSN images in JPEG, GIF & PNG formats
  • 100% build in Java, compatible with JDK 1.4 and later version
  • Generate ISSN barcodes on any platforms with a Java virtual machine
  • Generate ISSN in Jasper Reports & iReport
  • Generate ISSN in Eclipse BIRT
  • Mature Java Barcode Generator library since 2003
  • Royalty-free and perpetual developer license


Quick Navigate

 

1. ISSN Barcode Introduction

ISSN is also known as International Standard Serial Number, ISSN-13, ISSN-10, ISSN+5, ISSN+2, ISSN Supplement 5/Five-digit Add-On, ISSN Supplement 2/Two-digit Add-On

The ISSN (International Standard Serial Number) is an eight-digit number which identifies periodical publications as such, including electronic serials.

The ISSN is a numeric code which is used as an identifier: it has no signification in itself and does not contain in itself any information referring to the origin or contents of the publication.

The ISSN takes the form of the acronym ISSN followed by two groups of four digits, separated by a hyphen. The eighth character is a control digit calculated according to a modulo 11 algorithm on the basis of the 7 preceding digits; this eighth control character may be an "X" if the result of the computing is equal to "10", in order to avoid any ambiguity.


Sample of an ISSN Barcode

Add-On or Supplement code
The Add-On Symbols were designed to encode information supplementary to that in the main bar code symbol on periodicals and paperback books. The Add-On can be composed of 2 digits only.


 

2. ISSN Encoding Data Scope

ISSN Barcode for Java supports.
  • 0, 1, 2, 3, 4, 5, 6, 7, 8, 9


 

3. How to Generate ISSN Barcode in Java Class?

The following Java code illustrates how to create a ISSN barcode, and output to various formats

1            Linear linear = new Linear(); 
2            linear.setType(Linear.ISSN); 
3            linear.setData("977456789012"); 
4            linear.renderBarcode("c:/barcode.gif"); 
	
5            BufferedImage bufferedImage = linear.renderBarcode();

6            byte[] barcodeBytes = linear.renderBarcodeToBytes();

7            Graphics2D g = ...
8            Rectangle2D rectangle = ... 
9            linear.renderBarcode(g, rectangle);

10           OutputStream outputStream = ...
11           linear.renderBarcode(outputStream);

  • Create a Linear barcode object (line 1)
  • Set Linear object barcode type to ISSN (line 2)
  • Set ISSN barcode data to encode (line 3)
  • Encode generated ISSN barcode into gif image file (line 4)
  • Generate ISSN and output to BufferedImage object (line 5)
  • Generate ISSN in bitmap and output to byte[] (line 6)
  • Generate ISSN and draw to defined area (Rectangle2D) on Graphics2D (line 7-9)
  • Generate ISSN and output to OutputStream (line 10-11)



 

4. How to Generate ISSN Barcode Image in Java Web Applications?

There are two methods to create ISSN barcode images in your Java web applications.

  1. The simplest way is to stream barcode image using our buildin barcode servlet application.

    • Download the Barcode for Java Trial Package, and unzip it.


    • Under java_barcode_trial package, copy barcode folder to your java servlet container like tomcat.


    • Restart tomcat. Now you have installed successfully.


    • To test your installation, open your web browser and navigate to
      http://YourDomain:Port/barcode/linear?Data=977456789012&Type=ISSN


    • To create barcode image in your JSP or html page, you need pass the url to IMG tag src value. For example,
      <img src="http://YourDomain:Port/barcode/linear?Data=977456789012&Type=ISSN" />

      Using this method, it will not generate any barcode images in your server side.


  2. The second method is to generate barcode images in your server side

    • Create a barcode image in server side
      1            Linear linear = new Linear(); 
      2            linear.setData("977456789012"); 
      3            linear.setType(Linear.ISSN); 
      4            linear.renderBarcode("C:/Tools/Tomcat 5.5/webapps/YourWebApp/barcode-images/barcode.gif"); 
      


    • In your JSP or HTML page, you need use IMG tag to display generated image, like
      <img src="http://YourDomain:Port/YourWebApp/barcode-images/barcode.gif" />



 

5. How to Generate Barcode ISSN Image in Jasper Reports, iReport, Eclipse BIRT?




 

6. ISSN Barcode Property Settings

  • Set the type property to Linear.ISSN, Linear.ISSN_2 or Linear.ISSN_5
    Servlet URL Parameter: "Type". Value: 15 (ISSN), 16 (ISSN +2), 47 (ISSN +5). Sample: &Type=15
  • Set the data property with the value to encode. Type is String.
    User should only provide 9 digits, and DO NOT include the first 3 chars "977" and the last digit checksum character.
    • Valid Data Scope:
      • 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
    • Valid Data Format:
      9 digits. There are totally 13 digits in ISBN barcode, first 3 are ISSN starting digits "977", and next 9 digits are barcode value, and last digit is the checksum digit, which is generated by barcode library automatically.
    • Sample: "123456789"
    Servlet URL Parameter: Data.
  • Set the sData property with the supplement value to encode. Type is String.
    Provide 2 digits for barcode type ISSN_2, and provide 5 digits for type ISSN_5.

    Sample for Linear.ISSN_2: "12".
    Sample for Linear.ISSN_5: "12345".
    Servlet URL Parameter: SData.
  • addCheckSum property is not applied here. Barcode Library will always add a check character in the last digit (modulo 10).
  • Barcode image size settings:
    • Set property uom (Unit of Measure) for properties X, Y, leftMargin, rightMargin, topMargin and bottomMargin.
      Default is Linear.UOM_PIXEL (0). Valid values are Linear.UOM_PIXEL (0), Linear.UOM_CM (1), Linear.UOM_Inch (2).
      Servlet URL Parameter: "UOM". Value: 0 (pixel), 1 (cm), 2 (inch). Sample: &UOM=0
    • Set the X (for barcode module width) and Y (for barcode module height) properties.
      Both types are float. Default X is 3. Y is 75.
      Servlet URL Parameter: "X", "Y". Sample: &X=3&Y=75
    • Set the leftMargin, rightMargin, topMargin and bottomMargin properties, and types are all float.
      Default values are 0 for all 4 margin settings.
      Servlet URL Parameter: "LeftMargin", "RightMargin", "TopMargin", "BottomMargin". Sample: &LeftMargin=0
    • Set the resolution property (Value is expressed in DPI - Dots per inch).
      Default is 72 dpi.
      Servlet URL Parameter: "Resolution". Sample: &Resolution=72
  • Setting up text style in barcode image:
    • Set the showText properties. If this value is true, barcode data will be displayed with the barcode.
      Default is true.
      Servlet URL Parameter: "ShowText". Value: "t" (true), "f" (false). Sample: &ShowText=t
    • Set the textFont property. The font used to display text in barcode image.
      Default is new Font("Arial", Font.PLAIN, 11).
      Servlet URL Parameter: "TextFont". Value format: [font name]|[font style]|[font size]. Sample Values: &TextFont=Arial|Bold|12
  • With rotate property, you can display barcode horizontally or vertically.
    Value can be
    • 0 (Linear.ANGLE_0),
    • 1 (Linear.ANGLE_90),
    • 2 (Linear.ANGLE_180),
    • 3 (Linear.ANGLE_270)

    Default value is 0.
    Servlet URL Parameter: "Rotate". Sample: &Rotate=0


 

7. How to Set Generated ISSN Barcode Image Size?





All Java Barcode Types/Symbologies


 









   Copyright 2010 BarcodeLib.com. Java Barcode, Barcode Java, Java Barcode Generator. All rights reserved.