You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Mehmet Fatih ÇİN <mf...@outlook.com.tr> on 2022/09/12 14:41:36 UTC

Converting TIF File to PDF File

Hello everyone,
 I have a file with the extension ".tif" consisting of several pages.
 How can I convert this image to PDF?  I also need to set the file size to very small.  While doing this, I must not compromise on quality.


Mehmet Fatih ÇİN



Re: Converting TIF File to PDF File

Posted by Tilman Hausherr <TH...@t-online.de>.
On 12.09.2022 16:41, Mehmet Fatih ÇİN wrote:
> Hello everyone,
>   I have a file with the extension ".tif" consisting of several pages.
>   How can I convert this image to PDF?  I also need to set the file size to very small.  While doing this, I must not compromise on quality.

Hi,

PDFBox doesn't change your files so you'd need to do the shrinking before.

To convert to PDF you should look at the ImageToPDF.java example and 
alter that one so that it uses CCITTFactory.createFromFile() which 
supports a page number. However this works only with b/w files. If you 
have color files then you'll have to extract them yourself with JAI and 
then use LosslessFactory.

Tilman



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org