Return-Path: <tiff-bounces@lists.maptools.org>
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-s.b-one.net (mx-s.one.com [91.198.169.250])
	by mail9.b-one.net (Postfix) with ESMTP id E2551400400
	for <info@awaresystems.be>; Wed, 31 Mar 2010 14:50:28 +0200 (CEST)
Received: by mx-s.b-one.net (Postfix, from userid 106)
	id D9191250B577; Wed, 31 Mar 2010 14:50:28 +0200 (CEST)
X-Virus-Scanned: by one.com
X-Spam-Score: 0
X-Spam-Level: 
X-Spam-Status: No, score=0 tagged_above=0 required=4 tests=[none]
X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4
Received: from lists.maptools.org (lists.maptools.org [65.39.174.144]) by
 mx-s.b-one.net (Postfix) with ESMTP id 1F910250B577 for
 <info@awaresystems.be>; Wed, 31 Mar 2010 14:50:28 +0200 (CEST)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by
 lists.maptools.org (Postfix) with ESMTP id 3E6F31D4679CA; Wed, 31 Mar 2010
 07:49:17 -0500 (EST)
Received: from mail.howardsilvan.com (216-235-106-HCC-115.hcc.net
 [216.235.106.115]) by lists.maptools.org (Postfix) with ESMTPS id
 57CBF1D46790E for <tiff@lists.maptools.org>; Wed, 31 Mar 2010 07:44:42 -0500
 (EST)
Received: from fangorn.howardsilvan.com (localhost [127.0.0.1]) by
 mail.howardsilvan.com (Postfix) with ESMTP id 87EC1C420E9; Wed, 31 Mar 2010
 05:44:31 -0700 (PDT)
Received: from bilbo.x101.com ([64.146.212.27] helo=bilbo.x101.com) with
 IPv4:25 by fangorn.howardsilvan.com; 31 Mar 2010 05:44:31 -0700
Message-ID: <4BB343B0.3040102@howardsilvan.com>
Date: Wed, 31 Mar 2010 05:44:32 -0700
From: Lee Howard <faxguy@howardsilvan.com>
User-Agent: Thunderbird 2.0.0.19 (X11/20090105)
MIME-Version: 1.0
To: Marcus Hermansson <marcus.hermansson@swedprint.se>
References: <o2hf96a971e1003310241s88872c72i546c79bea353ffa@mail.gmail.com>
In-Reply-To: <o2hf96a971e1003310241s88872c72i546c79bea353ffa@mail.gmail.com>
Cc: tiff@lists.maptools.org
Subject: Re: [Tiff] Tiff2pdf-problem with pages in the wrong order.
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.9
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>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

Marcus Hermansson wrote:
> To make myself short.
> Running tiff2pdf.exe without modifications, "tiff2pdf.exe -o test.pdf 
> test36p.tif", on my WinXP SP3.
> This generates a pdf containing all 36 pages, but in a wierd order.
> In the original file has the pagenumber printed in the top righthand 
> corner. and the order of the pages is as follows:
> 3,4,5,6,7,8,9,10,11,  3,4,5,6,7,8,9,10,11, 3,4,5,6,7,8,9,10,11  
> 3,4,5,6,7,8,9,10,11
>
> the pdf is ordered 
> 4,3,5,10,11,6,7,4,8,5,9,10,11,4,5,3,10,11,4,6,5,7,10,8,9,11,3,6,7,8,9,3,6,7,8,9
>
> Some other files I've ran produce the same error, some other don't. It 
> bugs me to not know why!
>
> The tif-file is located here: http://dl.dropbox.com/u/5362998/test36p.tif
> The pdf that I produce can be downloaded here: 
> http://dl.dropbox.com/u/5362998/test.pdf
> both are around 1,5MB.
>
> Does this happen to everyone? What can I do about it?

Your TIFF is confusing.  And for what it's worth, the same thing happens 
with tiff2pdf on Linux.  If you look at tiffinfo output run against 
test36p.tif you'll see the matter:

TIFF Directory at offset 0x9db6 (40374)
  Subfile Type: (0 = 0x0)
  Image Width: 2486 Image Length: 3511
  Resolution: 300, 300 pixels/inch
  Bits/Sample: 1
  Compression Scheme: CCITT Group 4
  Photometric Interpretation: min-is-white
  FillOrder: msb-to-lsb
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 3511
  Min Sample Value: 0
  Max Sample Value: 1
  Planar Configuration: single image plane
TIFF Directory at offset 0x138d2 (80082)
  Subfile Type: multi-page document (2 = 0x2)
  Image Width: 2480 Image Length: 3507
  Resolution: 300, 300 pixels/inch
  Bits/Sample: 1
  Compression Scheme: CCITT Group 4
  Photometric Interpretation: min-is-white
  FillOrder: msb-to-lsb
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 3507
  Planar Configuration: single image plane
  Page Number: 0-0
  Group 4 Options: (0 = 0x0)

Some pages have "PageNumber" tags in them, and some of them don't.  And 
those pages that do have PageNumber tags in them contain PageNumber 
values that do not correspond to the TIFF Directory sequence number.

Thanks,

Lee.

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