Skip to main content

Need Help on converting PDF to CCITT tiff (Fax image)

3 replies [Last post]
neowritescode
Offline
Joined: 2009-03-02
Points: 0

I am trying to convert PDF to Tiff to send it as a fax. But the TIFF file should be CCITT T4 format. Because my fax server support only this tiff. But while i used JAI to convert to pdf. we can't able to convert it to CCITT format. param.setCompression(TIFFEncodeParam.COMPRESSION_GROUP4); It throws
Exception in thread "main" java.lang.Error: Bilevel encodings are supported for bilevel images only.

at com.sun.media.jai.codecimpl.TIFFImageEncoder.encode(Unknown Source)

at com.sun.media.jai.codecimpl.TIFFImageEncoder.encode(Unknown Source)

at com.realsoftinc.Fax.CreateFax.PdfToTif(CreateFax.java:347)

at com.realsoftinc.Fax.CreateFax.generateTif(CreateFax.java:309)

at com.realsoftinc.Fax.CreateFax.main(CreateFax.java:290) Can you please help me out to solve it. Its an urgent help. Or could please suggest any good API in java to convert PDF to TIFF CCITT for Fax compatibility.

Expecting you reply.

Thanks,
Neo

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
marcojacob
Offline
Joined: 2006-07-10
Points: 0

You need to convert the color image to bilevel using JAI.
There are several examples posted in the jai-interest list or
the archives. I remember some posts 5 or more years ago.

This is more a topic for the JAI-list but jai_imageio.

robert engels

The TIFF being created is most likely color, it needs to be black and
white for CCITT T4 compression (the bi-level error...) for B & W faxes.

Also, you are not using JAI to convert from PDF to TIFF. You are
using software from realsoft. The problem is really in their
PdfToTif method, as it should be handling this for you. Maybe you
are not calling generateTif with the proper arguments ????

On Mar 2, 2009, at 7:53 AM, jai-imageio@javadesktop.org wrote:

> I am trying to convert PDF to Tiff to send it as a fax. But the
> TIFF file should be CCITT T4 format. Because my fax server support
> only this tiff. But while i used JAI to convert to pdf. we can't
> able to convert it to CCITT format. param.setCompression
> (TIFFEncodeParam.COMPRESSION_GROUP4); It throws
> Exception in thread "main" java.lang.Error: Bilevel encodings are
> supported for bilevel images only.
>
> at com.sun.media.jai.codecimpl.TIFFImageEncoder.encode(Unknown Source)
>
> at com.sun.media.jai.codecimpl.TIFFImageEncoder.encode(Unknown Source)
>
> at com.realsoftinc.Fax.CreateFax.PdfToTif(CreateFax.java:347)
>
> at com.realsoftinc.Fax.CreateFax.generateTif(CreateFax.java:309)
>
> at com.realsoftinc.Fax.CreateFax.main(CreateFax.java:290) Can you
> please help me out to solve it. Its an urgent help. Or could please
> suggest any good API in java to convert PDF to TIFF CCITT for Fax
> compatibility.
>
> Expecting you reply.
>
> Thanks,
> Neo
> [Message sent by forum member 'neowritescode' (neowritescode)]
>
> http://forums.java.net/jive/thread.jspa?messageID=334571
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@jai-imageio.dev.java.net
> For additional commands, e-mail: interest-help@jai-
> imageio.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@jai-imageio.dev.java.net
For additional commands, e-mail: interest-help@jai-imageio.dev.java.net

markee174
Offline
Joined: 2007-03-09
Points: 0

If you want to use PDF java have a look at

http://www.jpedal.org
https://pdf-renderer.dev.java.net/
http://multivalent.sourceforge.net/

Or you call call something native like Ghsotscript or Acrobat.