I've used iText to generate PDF as you describe. I've used the STRPCCMD
command to open the PDF immediately on the user's terminal for printing.
I've also sent directly to the printer by reading the PDF as a stream file
and just pushing that to a *USRASCII defined printer file. This *USRASCII
method requires that the printer understand PDF file streams. Lastly, I've
generated a printer file to an Infoprint Server writer I call PRTPDF. It
loops back on itself with an exit program to use the Transform Manager to
convert and print the output as an AFPDS bitmap to the printer. That last
method works, but requires some development work with Infoprint server and
exit programs.
All of that said, TL Asford is capable of generating output for laser
printers even though the label is laid out for a barcode printer. I've
never used this function in production, but I use it to test print labels
to get a rough idea of what I'm doing without going to a label printer.
In answer to your overall question, I've never printed from java directly,
but I've never had a need to with RPG doing that function. It seems like
you're asking if you can generate a PDF file and send that to a Zebra
barcode printer. I'm skeptical that would work. The barcode printer can
accept logo's, but it might not have enough memory to render a whole label
as a bitmap. If the label is small, you might get away with it. Its not
really designed to handle that in all situations though.
From: Steve Richter <stephenrichter@xxxxxxxxx>
To: "Java Programming on and around the iSeries / AS400"
<java400-l@xxxxxxxxxxxx>,
Date: 04/19/2013 02:35 PM
Subject: how does java print to a network attached printer?
Sent by: java400-l-bounces@xxxxxxxxxxxx
can java code, running on the ibm I, print direct to a network attached
printer? We have java code that creates a PDF file using iText . But to
print the PDF, the PDF file has to be emailed to the user where it is
printed using the windows printer drivers.
Does Java supply printer drivers of its own?
In this specific case we print carton labels on a zebra printer using TL
Ashford from an RPG program via the spooled file route.
I am asking if a Java program could create a bitmap file containing the
label image and print that bitmap direct to a network attached zebra label
printer? How to do that?
Do Zebra printers only accept the zebra printer control language or will
they also print a bitmap image?
I would like to experiment with it but do not know much java. How does a
java program write to a network attached printer?
thanks,
--
This is the Java Programming on and around the IBM i (JAVA400-L) mailing
list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
http://archive.midrange.com/java400-l.
As an Amazon Associate we earn from qualifying purchases.