Sponsored Content
Full Discussion: Create a PDF file
Operating Systems SCO Create a PDF file Post 302455025 by RicardoM on Monday 20th of September 2010 02:53:09 PM
Old 09-20-2010
PDF

I am currently using an application called PRO IV which runs on OpenServer 6. I want to be able to print to a "PDF printer" so whatever I print gets converted to a pdf file. Guess like "PDF Creator" for Windows only that I need it for unix. I've installed all my printers on this sytem under the HP network printer manger option at scoadmin. Here's the conf file for one of them.

#!/bin/sh
#
# @(#) hpnp.model 62.2 97/03/03
#
# $Header: hpnp.model,v 1.9 91/11/14 10:44:35 pma Exp $
#
# Copyright (C) 1991-1997 The Santa Cruz Operation, Inc.
# All Rights Reserved.
# The information in this file is provided for the exclusive use of
# the licensees of The Santa Cruz Operation, Inc. Such users have the
# right to use, modify, and incorporate this code into other products
# for purposes authorized by the license agreement provided they include
# this notice and the associated copyright notice with any such product.
# The information in this file is provided "AS IS" without warranty.
#
# (c)Copyright Hewlett-Packard Company 1991. All Rights Reserved.
# (c)Copyright 1983 Regents of the University of California
# (c)Copyright 1988, 1989 by Carnegie Mellon University
#
# RESTRICTED RIGHTS LEGEND
# Use, duplication, or disclosure by the U.S. Government is subject to
# restrictions as set forth in sub-paragraph (c)(1)(ii) of the Rights in
# Technical Data and Computer Software clause in DFARS 252.227-7013.
#
# Hewlett-Packard Company
# 3000 Hanover Street
# Palo Alto, CA 94304 U.S.A.
#
# HP-UX Network Peripheral Model Script
#
# This script invokes the original model script
# from the subdirectory model.orig and pipes its
# output to hpnpf.
#
# Hpnpf does not exit on signal 15. Thus, the
# original model script can catch the signal,
# echo a string and exit. Hpnpf will exit when
# its standard input is closed.
#

MODEL=`basename $0`
REALMODEL=`echo $0 | sed -e "s%$MODEL%model.orig/$MODEL%"`
PORTNO="9101"
#
# This name may be initialized when the script is
# installed in the spooler. If not, use the name
# of this script ($MODEL) as the peripheral to contact.
#
PERIPH=jd01d
if [ "$PERIPH" = "" ]
then
PERIPH=$MODEL
fi
LOG=/tmp/$PERIPH.$$
HPNPF=/usr/lib/hpnp/hpnpf
LPLOG=/tmp/hpnpf.$$
LOGTRIES=5

echo "$1\t$REALMODEL | $HPNPF -x $PERIPH -p $PORTNO" >> $LPLOG

#
# Remove the log file if job is cancelled
# or the scheduler is shutdown.
#
trap "rm -f $LOG $LPLOG; trap 15;kill -15 0;exit 0" 15

ERRORLOGS=0
while :
do
#
# Save the stderr messages in a temporary log file
# and discard stdout which is the peripheral output.
#
rm -f $LOG
if $REALMODEL "$@" | $HPNPF -x $PERIPH -p $PORTNO 2> $LOG > /dev/null
then
#
# If the transfer is successful, remove
# the log file and exit.
#
rm -f $LOG $LPLOG
exit 0
else
#
# Added the request ID to the stderr message
# and store it in the lp log file.
#
# Only record the first $LOGTRIES errors. If
# the spooler gets in a loop retrying a job, the
# disk won't fill up with spooler log error messages.
#
if test -s $LOG -a $ERRORLOGS -lt $LOGTRIES
then
echo "$1\t`cat $LOG`" >> $LPLOG
ERRORLOGS=`expr $ERRORLOGS + 1`
fi
if test $ERRORLOGS -eq $LOGTRIES
then
echo "$1\t$LOGTRIES errors logged for $1; errors no longer logged" >> $LPLOG
ERRORLOGS=`expr $ERRORLOGS + 1`
fi
fi
if [ ! -s $LPLOG ]
then
rm -f $LPLOG
fi
sleep 10
done
 

10 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

How to create PDF documents from my word files?

Hi guys, I need to create PDF documents from my word files. How do I do it? (4 Replies)
Discussion started by: Hilda Thompson
4 Replies

2. Shell Programming and Scripting

Perl - Convert html to pdf - PDF::FromHTML

Hi, I am trying to convert html to pdf using perl module PDF::FromHTML, am getting the error as given below. not well-formed (invalid token) at line 2, column 17, byte 56 at C:/Perl/lib/XML/Parser.pm line 187 at C:/Perl/site/lib/PDF/FromHTML.pm line 140 The perl code is as given... (2 Replies)
Discussion started by: DILEEP410
2 Replies

3. AIX

Create pdf printer queu

I need to create a print queue in AIX to be able to print directly to pdf (or a network based printer) from a informix based application (Genero/FourJ). I have a AIX 5.3 a I canīt find any documentation for this. If possible I would not like to use any thirth party software. Can someone help me on... (2 Replies)
Discussion started by: marques_rmc
2 Replies

4. Red Hat

create pdf of text file help

Can someone please tell me why this is not working? I have created numerous pdf's from text files by following these instructions and this time it is not working. Convert jpeg files to PDF under Linux | bitPrison.net convert /home/liveuser/Documents/hw7 /home/liveuser/Documents/hw7.pdf... (5 Replies)
Discussion started by: cokedude
5 Replies

5. Shell Programming and Scripting

Create invoice pdf file

Hi all, I'm trying to create a script to merge a csv or txt file with a pdf template. So i have a pdf template with company logo and i want to merge it with a csv or txt file so i can create a complete invoice in pdf. now i do find some command line tools to do this but i need a pro version... (3 Replies)
Discussion started by: dicenl
3 Replies

6. Shell Programming and Scripting

PDF Script to extract PDF Links MOD in Need

In here we have a script to extract all pdf links from a single page.. any idea's in how make this read instead of a page a list of pages.. and extract all pdf links ? #!/bin/bash # NAME: pdflinkextractor # AUTHOR: Glutanimate (http://askubuntu.com/users/81372/), 2013 #... (1 Reply)
Discussion started by: danielldf
1 Replies

7. Shell Programming and Scripting

Converting secured pdf files to pdf using acroread

Does anybody have idea of Converting secured pdf files to pdf using acroread ? ---------- Post updated at 04:49 PM ---------- Previous update was at 04:44 PM ---------- This file is not password protected. (4 Replies)
Discussion started by: Soham
4 Replies

8. Shell Programming and Scripting

How to create or convert to pdf files from csv files using shell script?

Hi, Can anyone help me how to convert a .csv file to a .pdf file using shell script Thanks (2 Replies)
Discussion started by: ssk250
2 Replies

9. Shell Programming and Scripting

Create pdf of a jpg image in shell script

Dear Team, Can any one please let me know, if there is any way to create pdf of a Jpg image file in shell script. I work on Solaris, Korn Shell. Currently we are using sunpcl2pdf.exe to create PDF from PCL(Printer Control Language) files. But we are searching for some different way to... (2 Replies)
Discussion started by: Uttam Maji
2 Replies

10. Shell Programming and Scripting

Create a text file and a pdf file from Linux command results.

Hello. The task : Using multiple commands like : gdisk -l $SOME_DISK >> $SOME_FILEI generate some text file. For readiness I must insert page break. When the program is finished I want to convert the final text file to a pdf file. When finished, I got two files : One text file and One pdf... (1 Reply)
Discussion started by: jcdole
1 Replies
All times are GMT -4. The time now is 09:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy