Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print to scannable document from SCO Unix 3

Status
Not open for further replies.

sanjlarson

Programmer
Sep 24, 2008
4
0
0
US
I have a request to find out if it's possible to print a report out of a SCO Unix system to a document that can be scanned, such as a PDF file or a tif.

Does anyone know if this is possible?
 
What do you mean by "scanned"? Do you mean placing a piece of paper in a scanner? If so, it doesn't make much sense... you can scan anything that you can print onto a piece of paper... and if you were to scan it you would be creating a PDF or TIF, so why would you need to scan it if you had the file already... confused!!

Annihilannic.
 
Let me clarify. We have items which we can print out, however what we would like to do is bypass the printout part, and write it directly to a pdf or tif which could then be automatically scanned into a document storage database. We don't want to have to print them out anymore, just store them for viewing. The software we are using to do the capturing of documents right now is SentryFile which stores PDFs or tifs.

Is there some utility out there that can take a text file and convert it into a pdf or tif which the printer could then automatically scan and store it?

Thanks for any help in advance.
 
Why boring with pdf or tif ?
Can't your document storage database deal with plain text files ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
No, we tried the text, and it doesn't display correctly. It needs to store in a PDF, or be in a tif which it has the ability to convert to a PDF.
 
Have a look here:

You may try one of the following:
SCO scopcl2pdf600e (176,972 bytes) Built on SCO Unixware 7, compatible with SCO OpenServer 6.0.0 also

SCO sco5pcl2pdf600e (211,612 bytes) Built on SCO OpenServer Release 5



Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
If you can capture the text stream (in the printer I/F script, perhaps?), you can pipe it through 2 utilities which are standard in SCO6 (optional in SCO5).

The first "/usr/spool/lp/bin/text2post" will convert the text stream to PostScript. The second "ps2pdf" will convert the PostScript to PDF.

As an example, one of our applications uses this command:

Code:
alias PR "|/usr/spool/lp/bin/text2post|ps2pdf -dDEVICEWIDTHPOINTS=792 - `echo /usr2/reports/`logname`.`date +%Y%m%d.%H%M`.pdf`"


man text2post
man ps2pdf



"Proof that there is intelligent life in Oregon. Well, Life anyway.
 
Oops. I had modified the actual line to make it easier to understand. I can see that I messed up the portion which creates the destination filename.

In our example, the actual command is:

Code:
alias PR "|/usr/spool/lp/bin/text2post|ps2pdf -dDEVICEWIDTHPOINTS=792 - `file_name`"

And the script "file_name" contains:
Code:
echo /usr2/reports/`logname`.`date +%Y%m%d.%H%M`.pdf

"Proof that there is intelligent life in Oregon. Well, Life anyway.
 
You can take it one small step further and create a printer model file using the line motoslide gave.

This will allow the PDF files to be available as soon as it would have printed (really close at least). I also set the destination directory up as a Read Only Samba share so the wintel community could browse the files as they wished. (They could also index/search using windows search)

I also setup a cronjob to run monthly and cleanup the stuff that's more than x months old. Then it should live longer without me needing to show it love.

Best of luck!
 
I'm trying to implement this on SCO 6.0 and I'm not getting to far, I've defined a printer that the spool interfaces with but when I test it nothing is generated. I'm not sure if the file_name script is being picked up to generate the file name.

I've created a dumy printer and modified it by defining a filter. Just after this section I entered a FILTER type.

#If we are not using a filter, use the default one.
if [ -z "${FILTER}" ] then
FILTER="${LPCAT}"
fi

I added this bit:

FILTER=pr "|/usr/spool/lp/bin/text2post|ps2pdf -dDEVICEWIDTHPOINTS=792 - `file_name`"

I need help fixing this or replace with a working printer model file. Any help would be great. Thanks in advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top