Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to Print .tif files using a shellscript in unix

Posted on 2008-06-11
4
Medium Priority
?
565 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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 will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Suggested Courses

664 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