Printing to Citizen Thermal Barcode printer
Hello everyone,
I need some direction as to where to go next on this issue.
I am trying to take text data that contains commands with data and ascii control codes for a Citizen Barcode printer and allow my client (a web browser) the ability to print this data to its local printer and generate labels (not the raw data)
I have been able to code a servlet that can prints my barcodes to the local printers on my PC, but I cannot access a client's collection of printers from the web server.
It seems I need to render the data and do a window.print() in Javascript: Here is my servlet code that works when the printer is local to the web server.
try {
PrintService psCitizen = null;
String sPrinterName = null;
PrintService[] services = PrintServiceLookup.lookupPrintServices(null, null);
for (int i = 0; i < services.length; i++) {
sPrinterName = services.getName().toUpperCase();
log(Trace.DIAGNOSTIC, "Printer " + i + ":" + sPrinterName);
if (sPrinterName.toUpperCase().indexOf("CITIZEN") >= 0) {
psCitizen = services[i];
break;
if (psCitizen == null) {
log(Trace.DIAGNOSTIC, "Citizen printer is not found. Ps Count = " + services.length);
return;
DocPrintJob job = job = psCitizen.createPrintJob();
//String STX = "^B";
//String CR = "^M";
String STX = "\002";
String CR = "\015";
//String STX = (char)2 + "";
//String CR = (char)13 + "";
String s = "";
s += STX + "RN" + CR;
s += STX + "e" + CR;
s += STX + "M2982" + CR;
s += STX + "O0100" + CR;
s += STX + "f170" + CR;
s += STX + "qC" + CR;
s += STX + "L" + CR;
s += "H16" + CR;
s += "D11" + CR;
s += "PH" + CR;
s += "SC" + CR;
s += "W" + CR;
s += "Q0001" + CR;
s += "264400005930182DFW" + CR;
s += "232200005840339ORD" + CR;
s += "2e4411005360035BORD4721215005800001" + CR;
s += "241100003160222TEST" + CR;
s += "232100003160243Consignee:" + CR;
s += "241100003160268TEST INTERNATIONAL, PHILA" + CR;
s += "232100003160288Shipper:" + CR;
s += "232100003160314Deliver By:" + CR;
s += "232100002190192 5" + CR;
s += "23210000142031409/23/06" + CR;
s += "26210000310033412150058" + CR;
s += "232100001590192Pieces" + CR;
s += "241100002500192OF" + CR;
s += "231100003760015ORD4721215005800001" + CR;
s += "231100005840162Comment:" + CR;
s += "232100003160192 1" + CR;
s += "E" + CR;
s += "";
byte[] by = s.getBytes();
DocFlavor flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE;
Doc doc = new SimpleDoc(by, flavor, null);
job.print(doc, null);
} catch (PrintException e) {
How can I using a servlet, JSP or Javascript get the user to print the label data from the client browser and have the thermal printer interpret the browser data as commands to print. I don't mind the browser user having to select the printer.
Thanks!
I don't think that you'll be able to do this correctly with JavaScript, as those control codes probably won't be rendered correctly in the web browser. I'm guessing you'll need a signed applet to properly receive the exact commands to send to the printer. You can use the Jakarta HttpClient to receive the exact commands from the Servlet, then some kind of print API to send the commands to the printer.
Brian
Similar Messages
-
How can send to the print Queue in Ring Barcode printer using jsp?
Any one help me Please
I Tried it in Servlets But i wont detect the printer......
My Coding in Servlet.....
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.lang.*;
import java.security.*;
import java.awt.*;
import java.awt.print.*;
public class BarCodeServlet2 extends HttpServlet implements Printable, Servlet
// The following function is a placeholder for control initialization.
// You should call this function from a constructor or initialization function.
public void vcInit() {
//{{INIT_CONTROLS
// Our barcode string //
String s="FMT(1,576d,414d,0,0,1)\n" +
"DMD(1)\nDPD(1)\nACL()\nCOL(0)\nFAG(2)\nCFL(1,420d,376d,8,2,2)\nCFL(2,416d,352d,8,2,2)\n" +
"CFL(2,416d,352d,8,2,2)\nLIN(3,0d,330d,529d,330d,1,3)\nCFL(4,504d,280d,6,1,1)\nCFL(5,504d,233d,6,1,1)\n" +
"CFL(6,504d,327d,6,1,1)\nCFL(7,504d,185d,6,1,1)\nCFL(8,504d,138d,6,1,1)\nCFL(9,339d,116d,8,2,2)\n" +
"BDN(2,4)\nBFL(10,458d,94d,0,28,59d)\nCFL(11,435d,24d,6,1,1)\nCFL(12,413d,406d,2,1,1)\n" +
"DAT(1,[email protected])\nDAT(2,[email protected])\nDAT(3,LIN)\n" +
"DAT(4,COLOUR :RED)\nDAT(5,SIZE :S28)\nDAT(6,NAME :ST0060)\n" +
"DAT(7,STYLE :HALF SLEEVES)\nDAT(8,PRICE :600)\n" +
"DAT(9,:(Incl of all Taxes//))\nDAT(10,/6ST1D003J-134N)\nDAT(11,ST1D003J-134N)\n" +
"DAT(12,BLAZE APPARELS-INDIA)\nPRT(1,0,1)";
public static int count=0;
public void service(HttpServletRequest req, HttpServletResponse res)
throws ServletException,IOException
PrintWriter out = res.getWriter();
res.setContentType("text/html");
out.println("<html><head><title>My Servlet!</title></head>");
out.println("<body><h1>Hello Test ,updated!"+ s + "</h1></body></html>");
PrinterJob job=PrinterJob.getPrinterJob();
JobAttributes ja = new JobAttributes();
// Make sure the print dialog box doesn't open because were in a Servlet//
ja.setDialog(JobAttributes.DialogType.NONE);
// Get the page format /.
PageFormat page = job.defaultPage();
// Get the paper object //
Paper paper =page.getPaper();
// Make the whole page imageable ..
paper.setImageableArea(0,0,page.getHeight(),page.getWidth());
page.setPaper(paper);
job.defaultPage(page);
job.setPrintable(this,page);
try{
// Print //
job.print();
}catch(Exception e)
out.println("Exception caught");
out.println(e.getMessage()+ "Exception caught");
out.flush();
public int print(Graphics g, PageFormat f, int pageIndex)
if(pageIndex >0)
return NO_SUCH_PAGE;
//g.drawString(s,0,9 );
g.drawString(s,0,32 );
return PAGE_EXISTS;
//{{DECLARE_CONTROLS
}FileOutputStream printOut = new
= new FileOutputStream("Samsung ML-1450 Series on
JPRASAD");If that is supposed to be the name of the printer, I am afraid that is not the way it is done. As much as I could help you, I would suggest you to take a look at the API docs and check the classes under the javax.print package. -
Printing problem with script barcode
hi ,
i hav inserted a barcode for a particular window field. while giving print preview it is showing barcode.
after taking print, it is not displaying the barcode.
thank u all in advance,
balu.Hello,
In general, if you want to print a barcode, somebody must draw the bars
of the barcode to get a correct print. So there are four possible ways to
print barcodes from SAP:
1. Print e.g. via a Barcode DIMM/SIMM
To use this way, the printer must be able to print barcodes by itself so it
needs e.g. a special barcode SIMM/DIMM module to print the barcodes.
ie: HP printers do not contain barcode fonts by default so a DIMM module
with the fonts must be installed. The print works as follows:
The SAP sends a simple printer escape sequence to the printer, which activates
the barcode printing in the printer. Then the SAP sends the barcode number and
finally it sends a printer escape sequence, which switches the printer back to
normal printing. So in this way the bars of the barcode are created in the printer
(and you only see a dummy barcode in the print preview).
Please see the following Note about the sequences for Jetcaps BarDIMM used
for printing barcodes on HP Laserjet printers:
45643 Barcode control sequences for JetCAPS/Jetmobile BarDIMM
The correct BarDIMM modules for different HP printer models can be seen on
the JetMobile website at the URL below:
http://www.jetmobile.com/products/SJ_BD.htm
2. Print via a barcode.dll
If your printer doesn't have a barcode DIMM, it cannot create the bars of
the barcode itself. So this must be done elsewhere. One possibility is that
you print via a Windows system, SAPSprint or SAPLPD, device type SAPWIN and
a barcode.dll.
ie: Your printer is connected to a Windows system that runs the SAPSprint or SAPLPD program
If you print via device type SAPWIN, the creation of the print data is done in the Windows.
So the Windows may create a graphic, which contains the bars of the barcode, and send this
graphic to the printer.
The job to create the barcode graphic is done by the barcode.dll. So it is only needed, if
you want to print this way please see the following note for more information:
14561 Printing barcodes via SAPLPD / Barcode DLL
3. New barcode technology
If your printer doesn't have a barcode DIMM and if you don't want to use a barcode.dll,
you may use the new barcode technology, which is described in the SAP notes 645158 and 430887.
However this is only possible when printing from Smartforms.
In this way SAP itself creates a picture, which contains the bars of the barcode. This picture
is sent to the printer. One important requirement when you print the barcode via a Smartform
is that you have at least release 46C.
4. Use of a barcode font
There are some font files (e.g. Windows TTF files), which contains bars instead of characters.
So if you use these font files, the bars of the barcode are printed instead of a text.
You may buy such a font file, install it under Windows and use it via device type SAPWIN
according to note 48803. Since release 46C these files can also be uploaded into the SAP and
used via other device types.
Hope this information helps you resolve the issue.
Regards,
David -
Barcode printing sapcript available in preview but not in print
We are trying to print Barcode from ECC 6.0 system but unable to make it ,
though we can view the same in Print preview , still we are unable to get the same
in the hard copy.Barcode is not present in hard copy
Below are settings
Device type: SAPWIN
Device class: stardard printer
Host spool access method : F
Host printer : Default
physical Printer : RICOH AFICIO 2018D
Do we need to keep barcode.DLL in desktop from where we are printing ?
Is my printer is compatible for barcode printing. ?
What could be the reason
Best Regards,
AjitRIn saplpd screen i am getting below mentioned error
12:59:26 PM)
(12:59:26 PM) Barcode DLL Version 3.7.1 (32 Bit)(Seriennummer 12006)
Defaults read from "barcode.ini"
*** Licence expires 23.11.2007 (day,month,year)***
All Linear Barcodes,PDF 417,Maxicode,Code 16K,Code 49,Datamatrix,QRCode
(C) 1994-2005 e-bizco.com GmbH, Grosshansdorf, Germany
http://www.e-bizco.com
Licenced to: Free Trial:hi
(12:59:26 PM) Icon DLL loaded.
(12:59:26 PM)
(12:59:26 PM) Network Communication via SAP-NiLib
(12:59:26 PM) Hostname: P057ITSP06C2360
(12:59:26 PM) IP Address: 12515096.2089886680.32.1223880
(12:59:26 PM)
(12:59:26 PM) SAPLPD Version 6.28 for Windows/NT (OPT) is listening
(12:59:26 PM) OS-Info: version = 5.1, build = 0/2600, text = Service Pack 2
(12:59:26 PM) Copyright © 1992-2001 SAP AG
(12:59:26 PM)
(12:59:33 PM)
(12:59:33 PM) Receive job for printer __DEFAULT (Berkeley LPD protocol / RFC1179)
(12:59:33 PM) send_status called
(12:59:33 PM) send_status called
(12:59:33 PM) send_status called
(12:59:33 PM) send_status called
(12:59:33 PM) send_status called
(12:59:33 PM) Job 000TxmPy.TST for user ABAP1 queued.
(12:59:33 PM) Start printing job 000TxmPy.TST on printer RICOH AFICIO 2018D PCL 6
12:59:34 PM) Error from BARCODE.DLL: -9: Bar Code Generation error (Invalid char for this Barcode?)(12:59:34 PM) Print-job 000TxmPy.TST, 1 pages finished.(12:59:34 PM) Elapsed time 0.188 sec (0.000 sec. used by windows) -
Issue with Barcode printing in SAPscript
Hi All,
I am trying to print barcode in my script. I assigned barcode font to the numbers which I want in the form of barcode, I am able to see barcode in the print preview but when I am trying to take printout , in printout barcode is not appearing.
I try same barcode font with the smartform I am getting barcode in the printpreview as well as in the printout of the smartform with the same printer.
Can any one help me in this issue. Is there any other setting required in the smartform or its driver program?
Thanks.
Shweta.Hi
It depends on which kind of barcode fornt you're using.
In last SAP release there's a new tecnique to print the barcode by smartform: this tecnique translate the barcode as graph so the printer manages the baracode just as if it was a logo and It doesn't need any other hardware or software to print a barcode.
This tecnique is available for smartform only, else u make sure your printer can print a barcode, you can see a dummy barcode in preview.
I have had your same problem, and I found out this very usefull answer in the forum:
Barcode Printing issue using Forms
Hi, In general, if you want to print a barcode, somebody must draw the bars of the
barcode to get a correct print. There are four possible ways to print barcodes from SAP:
1. Print e.g. via a Barcode DIMM/SIMM To use this way, the printer must be able to print
barcodes by itself so it needs e.g. a special barcode SIMM/DIMM module to print the
barcodes. ie: HP printers do not contain barcode fonts by default so a DIMM module with
the fonts must be installed. The print works as follows: The SAP sends a simple printer
escape sequence to the printer, which activates the barcode printing in the printer. Then
the SAP sends the barcode number and finally it sends a printer escape sequence, which
switches the printer back to normal printing. So in this way the bars of the barcode are
created in the printer (and you only see a dummy barcode in the print preview). Se the
SAP Note 45643 about the sequences for Jetcaps BarDIMM used for printing barcodes on HP
Laserjet printers. The correct BarDIMM modules for different HP printer models can beseen
on the JetMobile website at the URL below: http://www.jetmobile.com/products/SJ_BD.htm
2.Print via a barcode.dll If your printer doesn't have a barcode DIMM, it cannot create the
bars of the barcode itself. So this must be done elsewhere. One possibility is that you
print via a Windows system, SAPSprint or SAPLPD, device type SAPWIN and a barcode.dll.
ie: Your printer is connected to a Windows system that runs the SAPSprint or SAPLPD
program If you print via device type SAPWIN, the creation of the print data is done in
the Windows. So the Windows may create a graphic, which contains the bars of the barcode,
and send this graphic to the printer. The job to create the barcode graphic is done by
the barcode.dll. See SAP note 14561. 3. New barcode technology If your printer doesn't
have a barcode DIMM and if you don't want to use a barcode.dll, you may use the new
barcode technology, which is described in the SAP Notes #645158 and #430887. However this
is only possible when printing from Smartforms. In this way SAP itself creates a picture,
which contains the bars of the barcode. This picture is sent to the printer. One
important requirement when you print the barcode via a Smartform is that you have at
least release 46C. 4. Use of a barcode font There are some font files (e.g. Windows TTF
files), which contains bars instead of characters. So if you use these font files, the
bars of the barcode are printed instead of a text. You may buy such a font file, install
it under Windows and use it via device type SAPWIN according to SAP Note #48803. Since
release 46C these files can also be uploaded into the SAP and used via other device
types.
Regards, Aidan
I hope it can help you
P.s.: I post the answer here, because I can't looking for the original post now, so thank very much to Aidan
Max -
We bought a DYMO Label Writer 4XL. We want to print thermal labels from our Mac and PC, wireless. The good thing is that I already have the printer set in the network and added on each of our computers (Mac and Windows 8). For printing regular labels you can use the Dymo software; for printing postage labels from ebay or paypal has been impossible.
From ebay I even tried one label at the time but still did not work. I sent the the print command from the mac-print-window, changing each of the settings (such as paper size) but did not work. Each time (no matter if you want to print one label only) it advances more than one lable.
http://community.ebay.com/t5/Miscellaneous/Using-a-thermal-printer-for-eBay-labe ls-using-a-Mac/qaq-p/3135261 (post by stormshock)
Through Paypal is a different story. It should be easy cause it seems the Zebra Driver in Paypal works with this DYMO. The issue is how to get the system to send the print command to the DYMO printer through the Zebra LP2488? please help! I know some people have succeded making all these work. What am I missing?
http://www.amazon.com/review/R3E73A6ZX39ZZQ/ref=cm_cr_pr_cmt?ie=UTF8&ASIN=B002M1 LGJ4&linkCode=&nodeID=&tag=#wasThisHelpfulTo whomever is reading this post I just wanted to let you know I returned the Dymo 4XL. Their customer service is horrible. Technical support does not exist at all. The issue was extremely frustrating and time consuming. I do not recommend this thermal printer at all. Good luck finding one... if you do, please share.
-
Print html file with barcode from abap report
hi
i am printing html file from abap program using gui_execute.
i am using netscape.exe , its printing first time and when reprint its not working
basically html file contains gif file which has fedex barcode.
could you please let me know how to print html file from reportDGU wrote:
where to check RAW or TEXT? the print report vi only asks for file name and printer name.
When I print from notepad, everything just goes by default. This is a label printer, so I never need to specify printing parameter such as size, orientation, etc in the past
Famous last words go something like this: "...never had to do that before." Maybe you have to do that now. It's worth at least comparing the defaults settings for bothe generic drivers. It could save you a lot of headache if you notice something different.
Bill
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all. -
Printing emails that contain barcode
My husbands computer info:
HPE-170t bought in 2010 (I think)
Operating System 64-bit
Windows 7 HOme Premium
ServicePack 1
Internet Explorer (latest version)
485 GB FREE of the 687 GB (Used 202GB)
Printers:
HP 8600 All In One
HP M401 Laser
Wireless: Cox Cable (top of the line speed....up to 50)
Problem (NOT the first time this has happened but certainly time to ask questions)
My husband received an email (Yahoo-free email) from PF Changs that he responded to in order to receive a coupon for $10 off a $40 meal. He received the coupon and it had a barcode on it. "no forwards or duplications allowed". When he tried to print the coupon, the coupon printed but WITHOUT the barcode. (Just an "x" in a box)....but, could still SEE the barcode on the computer screen.
He wrote PF Changs......who sent him a direct link to the coupon with the barcode (with their apologies, of course). Same problem. Will print the coupon but no barcode PRINTED. (This may be because PF Chang's program recognizes that his email has already been used for a coupon? Don't know!)
Things tried to fix:
I tried several things to fix the issue but the only thing that worked to get the barcode was to PrtScrn and paste to a WORD document and then print the WORD document. I am sure that PF Changs won't accept that form of barcode. Regardless, we still have the issue of getting the computer to send the entire information to the printer.
He sent me the original email that I then clicked on and requested a coupon. I received the coupon in MY email (Yahoo-paid service) and it printed without any problem. I have a DELL computer.
He also sent me the email that HE recieved with the barcode in it. I could also print THAT one. However, his original email that he sent to me with the barcoded coupon, now shows up with "x" in the box. (forwards not allowed, so I think this wipes HIS coupon out.)
We are using the same wireless, same email provider (Yahoo) and the same printers. (HP8600)
He is ready to throw out his HP computer but I think it is a setting that I can't figure out which to change. He has had problems several times with Adobe Reader, PDF, and printing emails....and windows that won't open at all.
Any ideas?To make the icon the default view of attachements, do the following:
Use the Terminal to set the preference.
Terminal is in Applications>Utilities. Open Terminal and type:
defaults write com.apple.mail DisableInlineAttachmentViewing -bool yes
That will make every attachment you send act like an attachment instead of a pretty unusable decoration.
If you decide this isn’t what you’re looking for, to restore inline attachment viewing type:
defaults write com.apple.mail DisableInlineAttachmentViewing -bool false
Restart Mail and you’re back to normal.
Please tell me if that worked for you! -
Problem with Direct printing of PDF with Barcodes in R12
Hi All,
We are facing a problem in direct printing in EBS R12 with xml pdf reports which contains some barcode fonts. We are using fonts from IDAutomation for barcodes. Printing from request output is working fine. But when it is printed directly everything get printed other than the barcodes. Did anybody face this problem before and fixed it?
Regards,
BennyBenny,
Output from XML Publisher comes out correctly. The barcodes are stripped off during pdftops conversion. Any idea?
How did you verify the above?
PASTA 3.0 Release Information (Doc ID 239196.1)
BIP PDF Output Does Not Print MICRD Barcode Font - View Output Ok (Doc ID 747195.1)
Thanks,
Hussein -
Problem with barcode print in Adobe From
Hello All,
We are using Adobe Forms to print our shipping labels and this as been working well for few years now. These labels include readable text and barcodes. The barcodes are 1-D but recently we now have a need to print 2-D barcodes.
We are able to print PDF-417 as a 2-D barcode on the form, but when we try to print Datamatrix barcode, the barcode does not show and instead we just see the text which should have been encoded as 2-D barcode.
We analyze the spool output file on the server to check the correct print controls are being sent to label printer. Our printer is a Zebra S4M using ZPLII. We send test form to our printer which will print two barcodes only (both 2-D), one is PDF-417 the other is Datamatrix. The spool output when viewed in Wordpad, is as below:
^XA
PRALH0,3
^XZ
CI13XA
^LL1219
^FO127,102
^BY3,,203
^B7N,,5,,,N
FHFD1234567890
^FS
^FO127,356
FHFD1234567890
^FS
^XZ
The ^B7 print control is the barcode PDF-417 control code. The Datamatrix control code ^BX is missing and should appear where there is an empty line. If we edit the spool output file and add the missing control code sequence, and then reprint the spool from SAP, then the Datamatrix 2-D barcode prints correctly.
So for some reason, the .zpl spool output file is not being generated with the ^BX control code sequence for the datamatrix barcode. We cannot find any information on why this is so.
We are running ECC6 SP11 (single stack) and ADS is running on a separate dual-stack BI system (NW2004s SP21).
Our Zebra S4M printer firmware is V53.17.6Z, and printer driver is ZebraDesigner 2.6.42 (Build 2382). Our SAP device type which is assigned is AZPL203. Our ADS version is 7.00.21.0.
We are seeing the same problem if we print test label from ECC or BI system. ECC kernel is 700 patch 266. BI kernel is 700 patch 254.
We have found SAP Notes related to incorrect ZPL format in ^BX for NW7.1 and NW7.1 EhP1, but not for NW7.0.
Has anyone else come across a problem like this before? Any advice would be much appreciated and duly rewarded.
Thanks in advance
GeorgeIssue is resolved.
We updated our ADS to 7.11.5.0 -
Barcode printing using dot matrix printer
Hi,
Can anyone let me know what all DOT Matrix printers support barcode printing (PDF 147 type), The barcode is printed in invoice when printout is taken using laser jet but when using dot matrix (Panasonic kx-p3696), the invoice gets printed without barcode.
Thanks in advance.
Sachinclosing thread
-
Problem with Barcode printing in sapscript
Hello All,
I am currently facing an issue with printing a bar code in my sap script.
Below is the scenario:
I am trying to print a delivery number as a bar code. I am using the system bar code BC_CD39C for the same.
i.e the system bar code is attached to the character format <XX>
<XX>&LIKP-VBELN&</>
The issue is, I am getting the barcode printed correctly but when i read the barcode with the reader
an extra alphabet is appearing
eg: if delivery number is 880001143
When i read the barcode it is appearing as follows 880001143W
Could you please let me know what would be the issue?
Regards,
Krishnakumarhi,
i will suggest u to use new barcode technology.
goto se73.
click on system barcode. -
> change
then click on create----
> it will prompt u for choose barcode technology -
>
select new barcode technology -
> give name and short description
> then create any z barcode using system barcode like code39, code 128 barcode check this n create urs with same functions. then
that add newly created barcode in ur smartstyle and then use it .
plz feel free to ask. -
Problem with Barcode printing in smartforms
Hi Gurus,
I have made changes to the system barcode height in SE73 from say 1.3 to 0.7 cm. But when I take the printout from the barcode printer I am getting the barcode with old height.
My concern is do we need to do change anything with the printer settings. If so, where and how? who has to do that?
-B S B.Hi,
But how do we reduce the height.
I changed the height of the system barcode (device independent).
Print preview looks fine. But when actual printing takes place still the barcode retains original height.
Could you please explain me in simple steps?
SAPHelp is more confusing.
-B S B -
ADF Faces & BC 10.1.3.4: Barcode Printing & ADF version of WebUtil?
Hi all,
Our existing application is built with Oracle Forms/Reports 9i which also uses Oracle WebUtil 10g because we need to print bar code labels. Our oracle forms appilcation invokes "Host" commands which allows it to print directly to the server's printer ports, this is accomplished by invoking WebUtil functionality which somehow bypasses(probably not the correct term to use) the jvm security sandbox. We need to have a similar barcode printing functionality on our ADF Faces/BC application however I'm not aware of the existence of "ADF WebUtil" which can be configured to allow access to printer ports.
Here is some code snipets for the 9i Forms application for printing (which is done through Internet Explore Browser)
CLIENT_TEXT_IO.PUT_LINE(myPrinter, output_str);
If lineType = 'B' Then vertStartTemp := vertStartTemp + vertBStep;
Else vertStartTemp := vertStartTemp + vertAStep;
End If;
End Loop;
/* last line */
output_str := 'P1'||chr(13)||chr(10);
CLIENT_TEXT_IO.PUT_LINE(myPrinter, output_str);
CLIENT_TEXT_IO.FCLOSE(myPrinter);
EXCEPTION
WHEN OTHERS THEN
CLIENT_TEXT_IO.FCLOSE(myPrinter);
message(sqlerrm );
Raise Form_Trigger_Failure;
END;
Here is some java code which uses the awt library (only works locally due to jvm secuirty sandbox)
public void testZebraBarCode(ActionEvent actionEvent) {
//called from a commandButton action listner. will fail upon deployment to server because its trying to access native resouces.
try {
PrintService psZebra = null;
PrinterJob printJob = PrinterJob.getPrinterJob();
if (printJob.printDialog()) {
psZebra = printJob.getPrintService();
DocPrintJob job = psZebra.createPrintJob();
String s =
// Set Reference Point
// Clear Image Buffer
// Print direction (from Bottom of buffer)
// Set label Length and gap
"R0,0\n" + "N\n" + "ZB\n" + "Q122,16\n" +
"A160,2,0,3,1,1,N,\"DATA: CARUGATE\"\n" +
"B160,30,0,1A,2,7,50,N,\"612041600021580109\"\n" +
"A160,92,0,1,1,1,N,\"AIA AGRICOLA IT.ALIMENT.S - 594679/VR\"\n" +
"P1\n";
byte[] by = s.getBytes();
DocFlavor flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE;
// MIME type = "application/octet-stream",
// print data representation class name = "[B" (byte array).
Doc doc = new SimpleDoc(by, flavor, null);
job.print(doc, null);
} catch (PrintException e) {
e.printStackTrace();
Can anyone point me to the proper direction on how to accomplish this task?
Thanks,
WesHi,
if you build a web application then you have to integrate a Swing based Applet to the web age to access the local client. You can't with native web means
Frank -
Printing QR codes and Barcodes together
Dear All,
I have referred the following link to print QR code as a post script:
http://scn.sap.com/people/robert.russell/blog/2010/10/25/barcodes-in-sap-with-the-barcode-writer-in-pure-postscript
While printing my SAP Script/ SMARTFORM output on any printer, if I specify output device as ZBWIPP then QR code is being printed perfectly, but barcodes (Which are already there in script and are expected to be there) are not being printed at all. When the output is printed without specifying any output device, then only barcodes are being printed and not the QR code.
I have tried adding print controls ZBW01, ZBW02, ZBW09 and ZBW91 to the output type of printer, even then QR code is not being printed.
I request your advice and help on how to get QR code and barcodes printed together. Thank you.
Regards,
Kartik
P.S. These existing barcodes are of type BC_CD39, not post script barcodes.Hi Karthik,
I have a requirement to
1) Output data from an internal table into excel, and
2) Create a chart from the data in excel
So far I have been able to export the data using OLE calls, created a chart object,.
My question:
1. How to put Data Lables
2. How to put Data Table under the Chart
3. How to rename the series names.
Below is the recorded Macro. I don't know how to convert it to ABAP.
Sub Macro1()
ActiveSheet.Shapes.AddChart.Select
ActiveChart.ChartType = xlColumnClustered
Application.CutCopyMode = False
ActiveChart.SetSourceData Source:=Range("B1:E4")
ActiveChart.SeriesCollection(1).Name = "=Sheet2!$A$2"
ActiveChart.SeriesCollection(2).Name = "=Sheet2!$A$3"
ActeChart.SeriesCollection(3).Name = "=Sheet2!$A$4"
ActiveChart.SetElement (msoElementDataLabelOutSideEnd)
ActiveChart.SetElement (msoElementDataTableWithLegendKeys)
End Sub
I have attached the current output and expected output.
I have searched about this in google but i could not find any solution for this.
Your help is greatly appreciated.
Current Output:
Expected Output:
I hope that I have explained my query clearly.
Thanks,
Lakshmi.
Maybe you are looking for
-
Number Range in Excise Invoice
Hi All, Is it possible to have different number range for the object J_1IEXCEXP(Export Excise Invoice). Currently we are having one excise group and one series group for one plant. According to the Material used in the document we need to change the
-
Safari and Skype stopped working simultaneously. Help!
Hey, I am a complete tech noob here, I'm going to try and express my problem in as general/simple a way as I can. If any advice can be written with the fact that I don't even know how to manually insert commands with my macbook in mind, I'd appreciat
-
Add search help/drop down list to a standard field in MIR7
Hi All, I have a requirement to add a search help on one of the strandard field in MIR7. This field has no search help in dictionary (SE11). Do you have any idea on how to do this? Is there any exit that i can use to? Please help! Thanks in advance.
-
Samsung 1630w won't save as pdf
After all the hassles with 10.5 and an hp1012, I just got a Samsung ML1630W. It is wireless, set up with airport (11g) no problems. But it won't save as pdf (in print). It says go to file>save. I hate to jinks a new printer that works, but it seems a
-
How to get a Footer text in alv grid?
Hi, am using RESUE_ALV_COMMENTARy_write... it is getting only on top of page.. suggest me to get Footer text in ALV GRiD. Regards, sodanapalli Moderator message: please do more research before asking, all points removed (both replies were copy/pasted