Solved

How to Print .tif files using a shellscript in unix

Posted on 2008-06-11
4
549 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
LastLogonTimeStamp Attribute 7 47
text in table need to be center of the box 4 67
Linux: disable vim auto-comment 7 63
Not needed 13 55
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

705 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now