HP3000-L Archives

August 2010, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Charles Finley <[log in to unmask]>
Reply To:
Date:
Fri, 13 Aug 2010 09:38:46 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (1485 lines)
I'm not sure why you need samba or OpenSeas. 

 

You actually have a simpler problem than I thought.  Since you are simply
planning on using the Linux/CUPS machine as a store and forward message
server you could do the following:

 

1.    Setup a CUPS server on each IP address you can give the Linux
computer.  There are ways to assign more than one.  One way to cheat is to
pretend you have a multiport JetDirect.  I may be out of date, but the last
multiport one I worked on had TCP ports 9100,0102, and 9103.  If you can get
enough TCP/Port IP address combinations to satisfy all of your printing
needs you may not need to do any programming.  For example 4 IP addresses =
4x3 separate "printers".  I haven't confirmed this but if you can make each
of those represent a separate Queue on the Linux computer you can assign one
to each real printer.

2.    Configure each Queue on the HP 3000 and print to it just as you would
any network connected printer.

3.    On the Linux end, simply configure each real printer to match each
queue.  Then I believe you're done. 

 

If you can't do the above, you can send all of the output to one pretend
JetDirect address and create a little intercept filter to separate the
output to each real queue. 

 

Charles Finley

(619) 795-0720

 

-----Original Message-----
From: Michael [mailto:[log in to unmask]] 
Sent: Friday, August 13, 2010 9:20 AM
To: [log in to unmask]
Subject: Re: Remote printing issues

 

Remote printing to Zebra and HP printers, from the HP3000 application, 

directly into a client company's network, where the output needs to be 

physically printed, is the focus. Converting to a common format like PDF 

is only a means to get there, not the main focus. That said, having 

something that looks like a Jetdirect printer to the HP3000 is key! My 

thinking is that something that looks like a Jetdirect printer could be 

a CUPS print server. Then using CUPS in combo with Samba, and maybe SCP, 

will make the network connectivity issues easier to resolved, and enable 

the possibly of sending the output directly to the remote printer 

without any user intervention.

 

I appreciate all the input and various methods to convert output, and I 

espeacially like the term "sucked off the HP" that John mentioned. The 

Openseas solutions is interesting for the fact that they have already 

migrated to HPUX, but still use the 3000 to convert output. The idea of 

making the HP3000 think that a unix server is a Jetdirect printer, as 

Charles mentioned, is a key piece to achieve my goal.

 

I'll keeps you guys posted on what I end up doing. On the subject 

converting output I came across an interesting Samba configuration:

The Samba entry:

[pdfprinter]

        path =<nobr> <wbr></nobr>/tmp

        printer admin = @ntadmin, @administrators

        create mask = 0700

        guest ok = Yes

        printable = Yes

        printer name = PDFPrinter

        printing = lprng

        cups options =

        print command =<nobr> <wbr></nobr>/home/pdfprinter/pdfconvert %s %U

        lpq command = lpq -P'%p'

        lprm command = lprm -P'%p' %j

        lppause command = lpc hold '%p' %j

        lpresume command = lpc release '%p' %j

        queuepause command = lpc stop '%p'

        queueresume command = lpc start '%p'

 

The script to do the work:

#!/bin/sh

 

# pdfconvert

# Date Modified: 12/06/2005

 

#

# Converts text input from a Samba print Spool into a PDF

#  then saves that pdf into the users home directory.

#

# Input: Arg 1 = Spool File Name (Provided by sabma)

#        Arg 2 = Username of person printing (Provided by sabma)

#

# Output: Produces a Pdf version of the text input

#          named for the user, and the date/time

#          the job was printed.  Thne places that

#          file in the users home directory in

#          a subdirectory called pdf.  If that

#          directory is not there it is created.

#

# Requires: date, enscript, ps2pdf, mv, rm, cat, mutt

#

 

# Retrieve the name of the spool file provided by samba

SPOOLFILE=`echo $1`

 

# Get the date and time of execution

#  Month Abbr Number of Day, Hours Minutes Seconds

DATE=`date +%b%d-%H%M%S`

 

# Retrieve the Username of the person who printed the job

UN=`echo $2`

 

# File name to be used

FILENAME=${UN}-${DATE}

 

# Set the paths needed for execution

OUTDIR=/home

TEMPDIR=/tmp

#          the job was printed.  Then places that

#          file in the users home directory in

#          a subdirectory called pdf.  If that

#          directory is not there it is created.

#

# Requires: date, enscript, ps2pdf, mv, rm, cat, mutt

#

 

# Retrieve the name of the spool file provided by samba

SPOOLFILE=`echo $1`

 

# Get the date and time of execution

#  Month Abbr Number of Day, Hours Minutes Seconds

DATE=`date +%b%d-%H%M%S`

 

# Retrieve the Username of the person who printed the job

UN=`echo $2`

 

# File name to be used

FILENAME=${UN}-${DATE}

 

# Set the paths needed for execution

OUTDIR=/home

TEMPDIR=/tmp

 

# Save the full paths to the needed programs

PCL6=`which pcl6`

 

# Save the spool file into a text file

cat $TEMPDIR/$SPOOLFILE > $TEMPDIR/$FILENAME.pcl

 

$PCL6 -sDEVICE=pdfwrite -sOutputFile=$TEMPDIR/$FILENAME.pdf 

$TEMPDIR/$FILENAME.pcl

 

# Move the pdf file to the users home directory

#  if the pdf directory exists.

if [ ! -d $OUTDIR/$UN/pdf ]

then

        mkdir $OUTDIR/$UN/pdf

fi

 

mv $TEMPDIR/$FILENAME.pdf $OUTDIR/$UN/pdf/$FILENAME.pdf

 

# Remove all temp files and the spool file

rm $TEMPDIR/$FILENAME.pcl

rm $TEMPDIR/$SPOOLFILE

rm $TEMPDIR/$FILENAME.pdf

 

</tt>

 

# <http://www.linux.com/archive/?module=comments&func=display&cid=1161740>

 

 

 

Thanks again,

Mike.

 

 

Charles Finley wrote:

> I'm not sure we're communicating.  Here are the issues:

> 

>  

> 

> 1)    You need to create what the HP 3000 thinks is a network printer to

> which the HP 3000 will send its output.  So, in this case you need to

> configure the Linux computer to look like a JetDirect box to the HP 3000.

> This means that you need a way to have something listen on TCP port 9100
and

> accept raw data from the HP 3000.

> 

> 2)    You need to strip out and/or convert CCTL characters to standard
ASCII

> print controls.  Therefore, you need an intercept program that processes
the

> raw data you get from the HP 3000.

> 

> 3)    You need to alter your report programs so that there are some tags
in

> each report identifying which customer it belongs to.  Your filter program

> needs to read the tags in the report. 

> 

> 4)    You need some sort of text to PDF conversion software that will take

> the HP 3000 reports and convert them to PDF.

> 

> 5)    You need either a web application that will restrict users to
certain

> directories based on their login or you could even do it without a web

> application. This should be simple enough because you can give each user a

> unique Linux user account. 

> 

> 6)    You need some sort of directory browsing application.  You could
even

> let the customers use Reflection with its file transfer capability. 

> 

>  

> 

> Essentially, it can be done with simply having one program that does:

> 

>  

> 

> 1)    Listens on port 9100

> 

> 2)    Does the CCTL conversion

> 

> 3)    Reads the tags in the report and places the report in a specific
user

> account based on the tag.

> 

> 4)    Converts text to PDF

> 

>  

> 

> Once all of the print output is in PDF, you do not need to address their

> printers.  Therefore, you do not need to print to their printers at all.

> They will be able to print from any printer at their own site.   

> 

>  

> 

> In its simplest form it is approximately than 40 hours of work and a
vanilla

> Linux computer. 

> 

>  

> 

>  

> 

>  

> 

> Charles Finley

> 

> (619) 795-0720

> 

>  

> 

>  

> 

> -----Original Message-----

> From: Michael [mailto:[log in to unmask]] 

> Sent: Thursday, August 12, 2010 5:11 PM

> To: [log in to unmask]

> Subject: Re: Remote printing issues

> 

>  

> 

> Thanks Charles, now the wheels are turning!

> 

> Is there better way to skin this cat?

> 

>  

> 

> I could setup a Linux box, and use CUPS with shared JetDirect Printers 

> 

> attached to it.

> 

> CUPS is open source, I could even modify it for my own selfish needs, 

> 

> and has a spooler Web interface, not sure about the user level security 

> 

> but that should not be too difficult.

> 

>  

> 

> Thanks again,

> 

> Michael.

> 

>  

> 

>  

> 

>  

> 

>  

> 

> Charles Finley wrote:

> 

>   

>> This is not off-the-shelf.  

>>     

> 

>   

> 

>   

>> What we did for two different customers in a similar situation is sent
all

>>     

> 

>   

>> printed output via network printing to an intermediate server, in their

>>     

> 

>   

>> cases a Windows servers.  On the Windows server the HP 3000 generated
text

>>     

> 

>   

>> output is converted to PDF.  In each case, the printed reports contain

>>     

> 

>   

>> customer identifying tags. The output on the Windows server is placed in

>>     

> 

>   

>> customer specific directories.  

>>     

> 

>   

> 

>   

>> One customer allows their end users to access their own specific folders

>>     

> on

> 

>   

>> the Windows computer.  The second customer wrote their own Web
application

>>     

> 

>   

>> to allow customers to view the reports and upload only what they want to

>>     

> 

>   

>> print.  

>>     

> 

>   

> 

>   

>> We have done similar thing on UNIX and Linux but never with the web front

>>     

> 

>   

>> end. 

>>     

> 

>   

> 

>   

>> If I had to do it today, I would use a Linux computer because the
software

>>     

> 

>   

>> to convert text reports to PDF's is free on Linux or UNIX.  Our customers

>>     

> 

>   

>> paid someone a hefty price for the Windows software to do the same thing.

>>     

> 

>   

>> Of course the most recent one we did was 5 years ago so all of that might

>>     

> 

>   

>> have changed. 

>>     

> 

>   

> 

>   

>> The magic is to use the target server as an JetDirect connected and then

>>     

> to

> 

>   

>> send all output from the HP 3000 to what it thinks is a JetDirect printer

>>     

> 

>   

>> (port 9100).  The HP 3000 already knows how to do this. We created this

>>     

> 

>   

>> illusion with software on the Windows computer. That way we needed no

>>     

> 

>   

>> additional software on the HP 3000.   The UNIX environments that we did a

>>     

> 

>   

>> similar thing with did not involve an HP 3000 since it was all done for

>>     

> 

>   

>> clients who we migrated to various forms of UNIX. 

>>     

> 

>   

> 

>   

>> Since our custom JetDirect pretender was written in Visual Basic. I

>>     

> suppose

> 

>   

>> if we had to do it today we would re-implement the same thing in JAVA

>>     

> which

> 

>   

>> is probably only a few hours work. BTW, don't forget the JetDirect

>>     

> pretender

> 

>   

>> needs to know how to read the tags in the printed reports so that is

>>     

> stores

> 

>   

>> the generated PDF in a specific folder. 

>>     

> 

>   

> 

>   

>> I almost forgot that one of the two Windows customers had us update a SQL

>>     

> 

>   

>> Server database with the location of each file that we placed on their

>>     

> 

>   

>> server.  The web application they built accesses the SQL server database.


>>     

> 

>   

> 

>   

>> Building a web application that only allows a user to access specific

>>     

> 

>   

>> directories on a computer should be a relatively simple application.  It

>>     

> may

> 

>   

>> even be available free somewhere. 

>>     

> 

>   

> 

>   

>> So in conclusion, it can be done with mostly off-the-shelf open source

>>     

> 

>   

>> stuff. But someone still need to do a little programming.  

>>     

> 

>   

> 

>   

>> Hope it helps.

>>     

> 

>   

> 

>   

>> Charles Finley

>>     

> 

>   

>> (619) 795-0720

>>     

> 

>   

> 

>   

> 

>   

>> -----Original Message-----

>>     

> 

>   

>> From: Michael [mailto:[log in to unmask]] 

>>     

> 

>   

>> Sent: Thursday, August 12, 2010 4:17 PM

>>     

> 

>   

>> To: [log in to unmask]

>>     

> 

>   

>> Subject: Remote printing issues

>>     

> 

>   

> 

>   

>> Once again I need to tap into the endless knowledge of the experts on 

>>     

> 

>   

>> the HP3000-L, hello everyone.

>>     

> 

>   

> 

>   

>> I have a need to support "Printing on printers at the remote locations", 

>>     

> 

>   

>> to multiple client companies from my HP3000. Kind of like the old 

>>     

> 

>   

>> time-share paradigm. The client companies can access the HP3000 using 

>>     

> 

>   

>> Telnet/iX, but they need to be able to print from the HP3000 (Telnet 

>>     

> 

>   

>> session) to their own local printers.

>>     

> 

>   

> 

>   

>> My initial thought was to add an additional VPN service. Basically I 

>>     

> 

>   

>> want to "Push" print files to a remote client company printers, but I 

>>     

> 

>   

>> don't want personnel from the client company to have access to my entire 

>>     

> 

>   

>> network, and likewise, the client company would NOT want me to have full 

>>     

> 

>   

>> access to their network. This level of security can be accomplished 

>>     

> 

>   

>> using a separate VPN service for each client company. Would the HP3000 

>>     

> 

>   

>> need a 2nd NIC for the VPN, or worse, an addition NIC for each client 

>>     

> 

>   

>> company. Lots of issues! Just thinking out-loud ;-)

>>     

> 

>   

> 

>   

>> Another option would be that I "Not allow printing to the remote 

>>     

> 

>   

>> location", but instead the printfiles on the HP3000 could be retrieved 

>>     

> 

>   

>> (Pulled from the HP300) using a standard FTP, (with user level security) 

>>     

> 

>   

>> then printed on their local network. This would resolved most network 

>>     

> 

>   

>> security issues and not require any additional VPN services, but it 

>>     

> 

>   

>> would involve some additional programming to be done to modify the way 

>>     

> 

>   

>> the application prints on the HP3000, print to disc flatfile, convert to 

>>     

> 

>   

>> rtf or pdf. Then there is also some bar code font issues, jeeesh, the 

>>     

> 

>   

>> fun never ends.

>>     

> 

>   

> 

>   

>> Does anyone know of any "canned" software that would help achieve my 

>>     

> 

>   

>> goal, or perhaps another network strategy?

>>     

> 

>   

> 

>   

>> All options welcome,

>>     

> 

>   

>> Michael Anderson.

>>     

> 

>   

> 

>   

>> * To join/leave the list, search archives, change list settings, *

>>     

> 

>   

>> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

>>     

> 

>   

> 

>   

>> __________ Information from ESET Smart Security, version of virus

>>     

> signature

> 

>   

>> database 5361 (20100812) __________

>>     

> 

>   

> 

>   

>> The message was checked by ESET Smart Security.

>>     

> 

>   

> 

>   

>> http://www.eset.com

>>     

> 

>   

> 

>   

> 

>   

>>  

>>     

> 

>   

> 

>   

>> __________ Information from ESET Smart Security, version of virus

>>     

> signature

> 

>   

>> database 5361 (20100812) __________

>>     

> 

>   

> 

>   

>> The message was checked by ESET Smart Security.

>>     

> 

>   

> 

>   

>> http://www.eset.com

>>     

> 

>   

>>  

>>     

> 

>   

> 

>   

>> * To join/leave the list, search archives, change list settings, *

>>     

> 

>   

>> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

>>     

> 

>   

> 

>   

>>   

>>     

> 

>  

> 

> * To join/leave the list, search archives, change list settings, *

> 

> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

> 

>  

> 

> __________ Information from ESET Smart Security, version of virus
signature

> database 5361 (20100812) __________

> 

>  

> 

> The message was checked by ESET Smart Security.

> 

>  

> 

> http://www.eset.com

> 

>  

> 

>  

> 

> 

> * To join/leave the list, search archives, change list settings, *

> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

> 

>   

 

* To join/leave the list, search archives, change list settings, *

* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

 

__________ Information from ESET Smart Security, version of virus signature
database 5364 (20100813) __________

 

The message was checked by ESET Smart Security.

 

http://www.eset.com

 

 


* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2