Solved

How to Print .tif files using a shellscript in unix

Posted on 2008-06-11
4
554 Views
Last Modified: 2013-12-26
Hi,

 I am developing a program which will allow users to print  .tif files (po / invoice images) to a printer from unix using 'lp'.

 I am running the command:

 lp -o nobanner -d"${PAR_PRINTER_NAME}" "${PAR_DOC_NAME}"

where PAR_PRINTER_NAME is the printer's name
and PAR_DOC_NAME is the image file name say abcd1234.tif.

The Problem is that the printer seems to split a single page into 4 pages. It prints the top left part of the page on  one page, top right half on another, bottom left half on one page and bottom right half on another.

 If I manually ftp the file on to my local machine and try to print it through Windows, it prints properly on one page. I have been able to print other types of files (non .tif) successfully using the above command.
 I am not sure what the issue is but looks like the .tiff files is getting printed as 4 tiles or 4 parts.

 Could some one please help me in this regard?
Should I try converting the .tif files to some other format? if so how can it be done?

Thanks in Advance!
0
Comment
Question by:viveksapre
  • 2
4 Comments
 
LVL 2

Expert Comment

by:knowledge_riot
ID: 21767059
I have never actually tried it, but you could try converting the TIFF to PostScript first (using the unix tiff2ps command), and then print the PostScript (assuming the printer is PostScript compatible)
See: http://www.remotesensing.org/libtiff/man/tiff2ps.1.html

Another alternative would be to use GhostScript to generate PDFs and try printing them
http://www.firstpr.com.au/sys-admin/TIFF-to-PDF/
0
 

Author Comment

by:viveksapre
ID: 21769453

     I don't have the tiff2ps command on the unix servers that's used in our project. I'll have to check if our sysadmins can get that installed. Before that I'll try converting it online to a pdf / jpeg and try printing it out.
0
 
LVL 4

Expert Comment

by:robertfwoods
ID: 21778233
For a most elegent and useful tool,

visit http://www.swiftview.com/

Their product Swiftview will do the job nicely.

There is a price, and no I am not associated.
Just a user of their product over the years.

PS Look here http://www.swiftview.com/tech/supportfiles.htm
for tiffy a neat tool to print the tags in a tiff file.
0
 

Accepted Solution

by:
viveksapre earned 0 total points
ID: 21955868
I was able to manage it using java. sorry for not updating it earlier.

Thanks
0

Featured Post

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Line meaning 9 86
Unix/bash: scripted arithmetic 13 99
What is the meaning of mount pont? with respect to windows file server. 7 61
Making an alias 7 95
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question