genicom programming help

R

rf

Hello, I am trying to print to a genicom 4490 XT using php. I can get
stuff to print out but it is not the full length of the paper. Its
only about 2/3 of the way. The paper is 13.5 inches and I have tried
to printer_set_option printer_width to the correct value but that
doesn't do anything when I print. Is there something in the printer
settings that I must change? Also when I try to enter in the ESC
codes, the printer simply prints them out and doesn't recognize them as
commands. Am I missing the obvious? This is my first attempt of this
type of thing and any help would be appreciated.

Thanks
 
R

rf

would that be a php command? All i have is printer_write() and
printer_draw_text()

I tried printer_write($my_printer, "hi CHR$(27)[1000a hi"); but it just
printed

hi CHR$(27)[1000a hi not two hi's spaced out 1000 decipoints
 
M

measekite

It sounds like the printer is old. It may even have DIP switches. If
so make sure they reset the printer to its factory defaults.
 
Z

zakezuke

would that be a php command? All i have is printer_write() and
printer_draw_text()

Rule of thumb in this group... don't listen to measekite. In all
fairness he has no experence with anything above and beyond consumer
inkjets and even in that department his experence is limited to an
ip4000 and some HP. He's your classic usenet troll and wouldn't know a
line printer if it bit him on the tookus. That's rather why he
responded without even knowing your talking about a line printer or
didn't take into account your dealing with PHP. I admit my experence
with line printers is limited, and PHP squat.

I am confused at your term full length of the paper. This should be
132character wide at 10cpi making it 13.2 inches wide. Or you could
mean a length slightly less than 14 inchs or less than legal sized. I
think you are talking about width where the max width should be 132 at
10cpi.

Most issues with such printers have to do with the fact that programers
are lazy so the printers often had to compensate for the lack of
formating. This would include setting the margins to 8.5 inches when
you have 13.2 inches to work with, or 60 lines per page when you could
be using longer paper. On older models, you could go to function
status and after you hit enter it would tell you how the printer is
configured for the current job. Width should be I think 9504
decipoints. Forms size I believe also would be under the function
mode. In thoery you can define this in software, but as we are dealing
with the wackyness of a world that dumped data to a printer expecting
the printer to format it plus emulations of various printers it's hard
to say what the printer is set to. ANSI emulation you can just toss
the esc commands to it but I can't remember what they are.

Length value I believe is in terms of lines, where you can adjust the
number of lines per inch. Width might be the same deal. If the
printer is set to 6lpi 11 inch lengh would be 66.

But see if you can do a test print out and tell us what the printer is
currently set to, esp what emulation it's using.

ftp://ftp.tallygenicom.com/pub/genicom/docs/4800
 
R

rf

Hey thanks for the response.

I ran a print out of the printer configurations earlier and this is
what I got:

emulation: ANSI - I have the user manual so I know what the codes
should be
CPI: 10
LPI: 6
Margin Settings -
Left: 0
Right: 9504

I tried creating a pdf file with php and created a custom paper size of
13.5"x12" and I got it to work the full width of the paper but the
print quality is real bad and I am not sure it is taking full advantage
of the printer speed. And if I am not mistaken, pdf prints like an
image? That might explain the poor quality of the lettering.
 
Z

zakezuke

emulation: ANSI - I have the user manual so I know what the codes
should be
CPI: 10
LPI: 6
Margin Settings -
Left: 0
Right: 9504
I tried creating a pdf file with php and created a custom paper size of
13.5"x12" and I got it to work the full width of the paper but the
print quality is real bad and I am not sure it is taking full advantage
of the printer speed.

This is at least correct, though i'm pretty dang sure the offical width
is 13.2 not 13.5. This may affect rendering of pages like when you
send a monochrome fax where the source image isn't at a proportional
ratio to fax resolution. Still it is a line printer who's strong
point are pre-programed fonts and barcodes. It's been a while since
i've even met a genicom printer... and even when I have they just do
their job... really fast.

At this point i'd try to communicate to the printer directly... I don't
know what interface you are using so I don't know how hard it would be
for you to either go into dos or equilivent and start sending 132
characters before doing a CR, or CR/LF depending on what is needed.
Basicly isolate whether the driver is imposing it's own idea of what
rendered pages should look like. Alternativly if in a windows
inviroment you can in all likelyhood use a generic driver like that for
a daisy wheel printer. That test print you can print should actually
tell you what the settings are for the next job, though i'm thinking
that something else is comming in and adding CR/LF after 80 characters
or 8.5 inches rather than 13.2 or 132 characters. I don't know what
enviroment you are operating in so i'm going by basic troubleshooting.
 
R

rf

Thanks for your help. I am using windows xp sp 2.

I made a txt file full of lots of ones and went to the cmd prompt. I
saved the file on the c: drive so I went to that directory and used
TYPE text.txt > LPT1 and it worked! It printed just like I would have
expected it to. So whats that mean? I guess I will try uninstalling
the driver I got from genicom and try a generic one?

I am trying to print using php using Apache as a server on my computer
if that means anything also. I will try finding a generic print driver
for a daisy wheel printer next and let you know.

Thanks
 
R

rf

I switched the driver to generic / text only and it got rid of the
duplication at the end of the line which is good but it still printed
at 215 mm which is about 8.5". I then went into the printer options
and found all these places where the paper size was set to letter so I
changed them all to my genicom paper size I made of 13.2 x 12 inches
and it works!

Thank you so much for your help! I jumped and clapped for joy when it
worked right.

Thanks again
 
R

rf

Ok, now I have the next problem to my saga. I cant get any of the ESC
codes to work. We are trying to print out some barcodes using ESC[3t
1234567890 ESC[0t but it just prints out what we put in, it doesn't
recongize the codes.

Any ideas?
 
W

Warren Block

rf said:
Ok, now I have the next problem to my saga. I cant get any of the ESC
codes to work. We are trying to print out some barcodes using ESC[3t
1234567890 ESC[0t but it just prints out what we put in, it doesn't
recongize the codes.

The telepathy helmet is broken, so I can't see your program.

Still, it sounds like you are sending "ESC" rather than chr(27).
 
R

rf

I have no idea what to send to this printer to get it to accept the
codes. I am using php and have tried:

printer_write($handle, 'CHR$(27);"[3t"12345CHR$(27);"[0t"');
printer_write($handle, "<ESC[3t><12345><ESC[0t>");
printer_write($handle, "<ESC[3t>12345<ESC[0t>");
printer_write($handle, "<ESC>[3t 12345 <ESC>[0t");

but nothing works.
 
W

Warren Block

rf said:
I have no idea what to send to this printer to get it to accept the
codes. I am using php and have tried:

printer_write($handle, 'CHR$(27);"[3t"12345CHR$(27);"[0t"');
printer_write($handle, "<ESC[3t><12345><ESC[0t>");
printer_write($handle, "<ESC[3t>12345<ESC[0t>");
printer_write($handle, "<ESC>[3t 12345 <ESC>[0t");

but nothing works.

You are mixing PHP and BASIC. I'm rusty at PHP, but try this:

$prtstring = chr(27) . "[3t" . "12345" . chr(27) . "[0t";
printer_write($handle, $prtstring);

Or, better:

$barcodestart = chr(27) . "[3t";
$barcodeend = chr(27) . "[0t";
printer_write($handle, $barcodestart . "12345" . barcodeend);
 
R

rf

Thanks for the help, I can now at least get codes to work in the print
out. I am testing this:
$move = CHR(27) . "[720a";
$barcodestart = CHR(27) . "[3t";
$barcodeend = CHR(27) . "[0t";
printer_write($handle, "12345".$move . "12345");
printer_write($handle, $barcodestart . "12345".$barcodeend);

It prints 12345 1234512345

so at least the code move is working by moving the next 12345 720
decipoints over but its not printing bar codes so I have to figure out
that part next.
 
R

rf

another problem that I am having is that after about 22 inches of
printing it does a form feed about 12 inches then continues printing
again and this is with the paper source set to cont. feed - no breaks.
With the paper source set to cont. feed - with breaks, it jumps 2
inches. Any ideas on that one?
 
R

rf

I solved my last problem of the page jumping. It was php and not any
printer settings. I was using printer_start_page($handle); and
printer_end_page($handle); and that was doing it. I took it out and
the pages do not jump anymore. Still no bar codes though.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top