on 08-24-2007 5:17 AM
Dear Experts,
Barcode Printing from EP --using barcode4J
we want to print employee number as barcode in EP(version 6.4 SP 19).
we tested the barcode creation a standalone class, it works fine
Sample Code as follows
================================
Code128Bean bean = new Code128Bean();
final int dpi = 150;
//Configure the barcode generator
bean.setModuleWidth(UnitConv.in2mm(1.0f / dpi)); //makes the narrow bar
//width exactly one pixel
bean.setWideFactor(3);
bean.doQuietZone(false);
//Open output file
File outputFile = new File("out.jpg");
OutputStream out = new FileOutputStream(outputFile);
try {
//Set up the canvas provider for monochrome JPEG output
BitmapCanvasProvider canvas = new BitmapCanvasProvider(
out, "image/jpeg", dpi, BufferedImage.TYPE_BYTE_INDEXED, false);
//BarcodeServlet.
//Generate the barcode
bean.generateBarcode(canvas, "Z454544");
//Signal end of generation
canvas.finish();
} finally {
out.close();
}
<b>But the same code i put in wdDoModifyView() or wdDoInit() it throws class not found exception</b>. I have checked that barcode4j.jar and all relevant files are in classpath.
Any help will be rewarded.
Thanks
Aby.
Hi,
If u are not using JDI for development, put the jar file in lib folder of the webdynpro project (located in WebDynpro project workspace).
Else you will have to create library dc and expose the jar as a public part.
Ashutosh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Re: Barcode Printing from EP --using barcode4J (Gurus kindly help me)
Posted: Aug 24, 2007 5:21 AM in response to: Ashutosh Moharir Reply E-mail this post
Dear Ashutosh,
<b> It is working now! .... 😄
Can someone provide me with a more detailed answer
Or Best Practices (step by step) ,that would be Great . </b>
I deeply appreciate your Quick & valuable advice;
and shall create a new posting if any further need arises
Many Thanks,
Aby Jacob
=========
Hi Aby,
As per SAP practice, we used to create a seperate DC for the external/3rd party jar files and reuse it in our WebDynpro DC application.
To help you in doing the same, I have provided you the link below.
Goto section 2.2.3.1 Defining Libraries Page No. 75
Regards,
Rekha Malavathu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Aby,
Can you please tell me whether you are using the JDI for your development or is that a WebDynpro project that you are creating in your NWDS?
Also please explain me how you are referencing the jar file to your project?
Regards,
Rekha Malavathu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Aby,
Are you referencing the .jar file as an external jar or by adding a variable which points to the jar file on the server?
Regards,
Rekha Malavathu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.