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-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org

Reply via email to