Page 1 of 1

[FAX] Try to convert PDF to compatible TIFF

Posted: 2007-02-20T05:22:47-07:00
by teufboy
Hello,

I try to convert a PDF to a TIFF file for my fax gateaway.
Here are the informations of a TIFF correctly generated by I program :

Code: Select all

# tiffinfo t378637.tif
TIFF Directory at offset 0x8 (8)
  Subfile Type: multi-page document (2 = 0x2)
  Image Width: 1728 Image Length: 2255
  Resolution: 204, 196 pixels/inch
  Bits/Sample: 1
  Compression Scheme: CCITT Group 4
  Photometric Interpretation: min-is-white
  FillOrder: lsb-to-msb
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: (infinite)
  Planar Configuration: single image plane
  Page Number: 0-0
  Software: Windows NT Fax Server
  Group 4 Options: (0 = 0x0)
And here are the informations from my bad tiff file :

Code: Select all

# tiffinfo Test-Fax3.tif
TIFF Directory at offset 0x5c2 (1474)   
  Image Width: 1728 Image Length: 2236
  Resolution: 204, 196 pixels/inch
  Bits/Sample: 1
  Compression Scheme: CCITT Group 4 
  Photometric Interpretation: min-is-white
  FillOrder: lsb-to-msb
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 2236
  Planar Configuration: single image plane
  DocumentName: testfax.tif
  ImageDescription:  Image generated by ESP Ghostscript (device=pnmraw)

  Software: ImageMagick 6.3.0 11/27/06 Q16 http://www.imagemagick.org
I use the following command :

Code: Select all

convert FileIN -resize 1728x2255 -monochrome -units PixelsPerInch -density 204x196 -compress group4 -endian lsb FileOut
I don't know why the first TIFF works with my gateaway and not the second that I've generated.

Any help would be extremely appreciated :-)

TIFF expert Needed

Posted: 2007-02-21T01:41:08-07:00
by teufboy
Is there someone who can help me ?
The right file is :http://www.sendspace.com/file/6n1lep

The bad file is : http://www.sendspace.com/file/3nq1sg

and the PDF : http://www.sendspace.com/file/sh0ist

The only differences that tiffcmp say is the tag subFileType which appears only in the correct file.

As I say any help will be appreciated a lot !!!

Re: [FAX] Try to convert PDF to compatible TIFF

Posted: 2007-02-21T02:19:28-07:00
by teufboy
tiffdump fileOK

Code: Select all

Magic: 0x4949 <little-endian> Version: 0x2a
Directory 0: offset 8 (0x8) next 0 (0)
ImageWidth (256) LONG (4) 1<1728>
ImageLength (257) LONG (4) 1<2255>
BitsPerSample (258) SHORT (3) 1<1>
Compression (259) SHORT (3) 1<4>
Photometric (262) SHORT (3) 1<0>
FillOrder (266) SHORT (3) 1<2>
StripOffsets (273) LONG (4) 1<290>
Orientation (274) SHORT (3) 1<1>
SamplesPerPixel (277) SHORT (3) 1<1>
RowsPerStrip (278) LONG (4) 1<4294967295>
StripByteCounts (279) LONG (4) 1<3308>
XResolution (282) RATIONAL (5) 1<204>
YResolution (283) RATIONAL (5) 1<196>
PlanarConfig (284) SHORT (3) 1<1>
ResolutionUnit (296) SHORT (3) 1<2>
Software (305) ASCII (2) 32<Windows NT Fax Server\0   ...>
PageNumber (297) SHORT (3) 2<0 0>
SubFileType (254) LONG (4) 1<2>
Group4Options (293) LONG (4) 1<0>
tiffdump fileKO :

Code: Select all

Magic: 0x4949 <little-endian> Version: 0x2a
Directory 0: offset 1474 (0x5c2) next 0 (0)
ImageWidth (256) SHORT (3) 1<1728>
ImageLength (257) SHORT (3) 1<2236>
BitsPerSample (258) SHORT (3) 1<1>
Compression (259) SHORT (3) 1<4>
Photometric (262) SHORT (3) 1<0>
FillOrder (266) SHORT (3) 1<2>
DocumentName (269) ASCII (2) 13< testfax.tiff\0>
ImageDescription (270) ASCII (2) 53< Image generated by ESP  ...>
StripOffsets (273) LONG (4) 1<8>
Orientation (274) SHORT (3) 1<1>
SamplesPerPixel (277) SHORT (3) 1<1>
RowsPerStrip (278) SHORT (3) 1<2236>
StripByteCounts (279) LONG (4) 1<1466>
XResolution (282) RATIONAL (5) 1<204>
YResolution (283) RATIONAL (5) 1<196>
PlanarConfig (284) SHORT (3) 1<1>
ResolutionUnit (296) SHORT (3) 1<2>
Software (305) ASCII (2) 58<ImageMagick 6.3.0 11/27/ ...>

Re: [FAX] Try to convert PDF to compatible TIFF

Posted: 2007-02-21T06:57:51-07:00
by teufboy
After some investigation I've found that I have to generate a TIFF file with Profile S as described in RFC 2301.
But I don't know how can I do this magical thing !
I've seen that the tag of my generated TIFF are correct, and know how to add some tag, but I think it's not the good way.

If anyone has an idea ?
I'm a little bit tired do discuss with myself :?

Re: [FAX] Try to convert PDF to compatible TIFF

Posted: 2011-05-06T05:18:39-07:00
by mc85
Did you have any luck getting this to work? Having the same issue.

Thanks

Re: [FAX] Try to convert PDF to compatible TIFF

Posted: 2011-05-06T09:30:00-07:00
by fmw42
I really don't know anything about TIFF for FAXing. But you can look at the following section of Anthony's notes about TIFF and look at the fax section. http://www.imagemagick.org/Usage/formats/#tiff

Re: [FAX] Try to convert PDF to compatible TIFF

Posted: 2011-05-07T04:34:00-07:00
by whugemann
I think that it is hard to help you as we don't know what fax gateway you are using. This may be a problem in the specific software you use for faxing and the problems it has when interpreting the TIFF created by ImageMagick. (The file links you supplied are no longer active.)

You do have some influence on TIFF coding by means of the -define option, see http://www.imagemagick.org/script/formats.php and Anthony's page that Fred already told you about.

I would rather guess that that is something wrong with the byte ordering (msb/lsb) or the rows per strip.