用于Pika传真的Pdf 2 Tiff转换

时间:2013-09-09 11:35:13

标签: java image tiff fax

我正在努力将pdf文件转换为tiff图像以便在java中传真.Pika应用程序负责处理和发送创建的tiff文件。一切都很好,tiff文件是用tags创建的。但是Pika不发送tiff文件。它提供了有关不支持的文件格式的错误.Pika错误消息在

下面
  

   - (PK_STATUS PKH_ERROR_FAX_UNSUPPORTED_FILE_FORMAT)

问题是什么,我错过了什么,有人可以帮忙吗? Tiff标签数据

SubFileType (1 Long): Page
ImageWidth (1 Long): 1728
ImageLength (1 Long): 2297
BitsPerSample (1 Short): 1
Compression (1 Short): Group 4 Fax (aka CCITT FAX4)
Photometric (1 Short): MinIsWhite
FillOrder (1 Short): Lsb2Msb
StripOffsets (288 Long): 2625, 2629, 2633, 2637, 2641, 2645, 2649,...
SamplesPerPixel (1 Short): 1
RowsPerStrip (1 Long): 8
StripByteCounts (288 Long): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,...
XResolution (1 Rational): 204
YResolution (1 Rational): 196
Group4Options (1 Long): 0
ResolutionUnit (1 Short): Inch
PageNumber (2 Short): 0, 1
Software (19 ASCII): DDoc2TiffConverter 
DateTime (20 ASCII): 2013:09:08 23:35:17 
BadFaxLines (1 Long): 0
CleanFaxData (1 Short): 0
ConsecutiveBadFaxLines (1 Long): 0

1 个答案:

答案 0 :(得分:0)

解决了问题。它与tiff图像的条带数有关。从多条带转换为单条带然后成功通过传真发送tiff。要提供信息,我将分享如何将tiff从多个转换为单条。

TIFFEncodeParam param = new TIFFEncodeParam();
param.setCompression(TIFFEncodeParam.COMPRESSION_GROUP4);
param.setReverseFillOrder(true);

param.setLittleEndian(true);
param.setWriteTiled(false);
param.setTileSize(-1, images[0].getHeight());

param.setTileSize(-1,images [0] .getHeight());这部分设置为单条。