Received: from mailgate002.isp.belgacom.be (mailgate002.isp.belgacom.be [195.238.6.87])
	by maildelivery001.isp.belgacom.be (Postfix) with ESMTP id E0DC25A8009
	for <joris.at.lebbeke@skynet.be>; Wed, 27 Feb 2008 21:49:55 +0100 (CET)
Authentication-Results: in.mx.skynet.be; dkim=neutral (message not signed) header.i=none
Received: from r153.dmsolutions.ca (HELO duke.maptools.org) ([209.217.116.153])
  by in.mx.skynet.be with ESMTP; 27 Feb 2008 21:49:54 +0100
Received: from duke.maptools.org (duke.maptools.org [127.0.0.1])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id m1RKXWx9015410;
	Wed, 27 Feb 2008 15:35:00 -0500
Received: from mpls-qmqp-01.inet.qwest.net (mpls-qmqp-01.inet.qwest.net
	[63.231.195.112])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id m1RKXTuO015405
	for <tiff@lists.maptools.org>; Wed, 27 Feb 2008 15:33:29 -0500
Received: from mpls-pop-06.inet.qwest.net (mpls-pop-06.inet.qwest.net
	[63.231.195.6])
	by mpls-qmqp-01.inet.qwest.net (Postfix) with QMQP id 1D9371A9897
	for <tiff@lists.maptools.org>; Wed, 27 Feb 2008 20:33:20 +0000 (UTC)
Received: from 70-59-61-250.hlrn.qwest.net (HELO css2.css.com) (70.59.61.250)
	by mpls-pop-06.inet.qwest.net with SMTP; 27 Feb 2008 20:33:19 -0000
Message-ID: <47C5C90F.6060605@qwest.net>
Date: Wed, 27 Feb 2008 13:33:19 -0700
From: Richard Nolde <nrichard8@qwest.net>
User-Agent: Thunderbird 2.0.0.9 (X11/20071115)
MIME-Version: 1.0
To: tiff@lists.maptools.org
References: <200802271705.m1RH5Kh3013136@duke.maptools.org>
In-Reply-To: <200802271705.m1RH5Kh3013136@duke.maptools.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Subject: [Tiff] Printing TIff images
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.4
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
X-UIDL: 000000000023ceae.00002b01
X-MSP-STORE: Wed, 27 Feb 2008 21:49:56 +0100
Status:   

Regarding printing TIFF images:
> > I'm new to libtiff and image manipulation for that matter and was wondering
> > how folks are sending tiff images for print in a  UNIX environment (lpr). I
> > realize there is a requirement from text to postscript which can be provided
> > by associated printcap filter designations. Oh.. I'm looking at doing this
> > via command line as I need to script a process for this.
>   
Not surprisingly I use GraphicsMagick to do this.  ;-) 
gm convert file.tiff -rotate 90 -page Letter PS:- | lp -c -d myprinter
Bob


There are other possibilities as well depending on the size and nature of your images.
Tiff2ps has numerous options for arranging the image on the page including rotating, 
centering, etc.  I submitted some patches that may or may not have ever made it into the
libtiff distribution to provide an "auto" option for the rotate flag and added 90 and 270
degrees as other options.  Auto will position the image on the page such that the longest
side of the image will match the longest side of the page specified with the -h and -w flags.
You can also chop a large image into multiple pages of the size specified with -h and -w.

Tiffcrop carries this one step farther and allows you to specify a PAPER size eg letter, legal
instead of a width or height or to use the width and height options. It also allows you to
add a margin when dividing large images into separate sheets but it does not rescale the 
data so your target sheet size must allow enough room for the margin or the image will span
an extra page. Since tiffcrop does not yet support direct output to Postscript, you would have
to use tiff2ps afterwards before sending to the printer.  The advantage of the two step process
for reimaging large sheets is that tiff2ps uses the Postscript masking operation to show only 
the portion of the image that fits on the target page size but includes the full sized image 
on each page of output.  Tiffcrop creates multiple pages, each with ONLY the data for that page.

If you are printing large arcitectural drawings that are 36" x 48" on a legal size page, you
would need 12 sheets to print the image.  With tiff2ps, you would be sending the full resolution
image to the printer 12 times and throwing most of the data away each time.  With preprocessing
with tiffcrop, you would send no more than 1/12 of the data each time.  I'd like to add the logic
to produce Postscript into tiffcrop but I haven't had the time.

If you have images in a variety of sizes and want to print them on different media based on the 
size, you can parse the output of tiffinfo and calculate the largest and/or smallest page sizes
required and translate that into letter, legal, etc which might be of use if the resolution of 
the images does not match the resolution at which you want to print them. I have an awk script that
does this if you are interested.


> This is great to know. While I have downloaded/installed libtiff
> (tiff-3.8.2.zip) on my UNIX server, I do not have tiffcrop installed as one
> of the utilities.How can I configure/install this. Configure/make didn't
> create this. I'm no developer, so need a bit of help if possible in getting
> this set-up.
>
> Thanks 
> Robert
>   

_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
