printing PDF files


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers printing PDF files
# 1  
Old 05-18-2004
printing PDF files

Hi all:

I'm trying to resolve a print issue in HPUX.

Background:

An ascii report file was being produced by a program. It was being sent to the printer via internal commands, to wit:

let #send_status = 0
let $send_cmd = 'lp -d lp03 /ps/tmp/edsprint/eds*.N.LIS'
call system using $send_cmd #send_status WAIT
if #send_status <> 0
Show 'Error in sending Report /ps/tmp/edsprint/edsprint.N.LIS to lp03 Status = ' #send_status
else
Show 'Report /ps/tmp/edsprint/edsprint.N.PDF sent to printer lp03 '
end-if



This works fine.
The user however, wanted the additional ability to view the report in the browser, so I changed the program to produce the report as a .PDF file. The user can bring up the report in the browser OK, but the above set of commands (with the file extension of "LIS", now changed to "PDF") is sending garbage to the printer (it looks like the junk you get when you try to print something using the wrong driver). I tried different printers, but no joy.
I can ftp the file to a Win2000 box and bring it up with Acrobat reader OK and print it OK, but even using the the Unix command line to print it produces garbage.

I've been bugging our UX admin for ideas, but I'm not getting anywhere. Anyone got any suggestions?
# 2  
Old 05-19-2004
Does the printer have postscript enabled? If not enable it... it can be done from within sam..
# 3  
Old 05-19-2004
Yes, it's PS enabled.
# 4  
Old 05-19-2004
does the physical printer support postscript.?
# 5  
Old 05-20-2004
Re: printing PDF files

Hi all:

Well, my Ux Admin came through after all. He installed Acrobat5 (and did some tweaking - I'll post back with the details if they're relevant) and I changed the commands as follows:
Quote:
let #send_status = 0
let $send_cmd = 'cat /ps/tmp/edsprint/eds*.W.PDF |/opt/Acrobat5/bin/acroread -toPostScript |lp -d lp03'
call system using $send_cmd #send_status WAIT
if #send_status <> 0
Show 'Error in sending Report /ps/tmp/edsprint/edsprint.N.PDF to lp03. Status = ' #send_status
else
Show 'Report /ps/tmp/edsprint/edsprint.N.PDF sent to printer lp03 '
end-if
Looks like it worked. Thanks for the help, guys.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. Solaris

Printing pdf problem using pasta.cfg

hi folks I have issue in printing pdf while using ERP application, it's using pasta utility to print pdf. If i print from command line its successful while when ERP user give print command the printer doesnot print anything rather it gives error which is as follows ESP Ghostscript 815.01:... (12 Replies)
Discussion started by: smazshah
12 Replies

5. Shell Programming and Scripting

[Solved] Pdf Printing in Solaris

HI All I need help related to Pdf printing in Solaris.as I print pdf file in solaris it print garbage.how can I print pdf correctly. need help asap. Regards (21 Replies)
Discussion started by: smazshah
21 Replies

6. Windows & DOS: Issues & Discussions

Linux to Windows Printing: PDF starts printing from middle of page.

We are using Red Hat. We have a issue like this: We want to print from Linux, to a printer attached to a Windows machine. What we want to print is a PDF. It prints, but the printing starts from the middle of the page. In the report, there is no space at the top but still printing starts from the... (5 Replies)
Discussion started by: rohan69
5 Replies

7. 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

8. Shell Programming and Scripting

Printing to PDF - Advanced usage

Hello, Just a rather long query regarding printing to PDF. I have installed the Cups-PDF printing system which enables me to send a normal text file and create a PDF of it. I then use the pdftk to merge that file with a template. My question is, that I have a database system that will need... (2 Replies)
Discussion started by: stuaz
2 Replies

9. UNIX for Dummies Questions & Answers

PDF Printing....

:confused: We have a Sco Open Unix 5.0.5 Server that I am trying to configure to allow for PDF creation. Currently the server is just using lpr to print to laser printers located throughout the facility. The goal is to be able to also print to pdf documents. There is no option for... (2 Replies)
Discussion started by: pabloescobar
2 Replies

10. UNIX for Dummies Questions & Answers

printing in postscript or convert from pdf?

hi - go easy on me, i'm new to UNIX... i need to resample huge pdf files and make them smaller. distiller won't resize existing pdf files. i thought i could print the pdf to a postscript file and then resample that. would that work? if so, how? is this the best way forward or should... (1 Reply)
Discussion started by: jono2000
1 Replies
Login or Register to Ask a Question