We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Converting Presentation to TIFF format using Aspose.Slides for Java

Hello Aspose,

I have to convert *.ppt, *.pptx, *.odp files to the TIFF format with CCITTFAX3 compression, 1 bit per pixel. I tried this code:

import com.aspose.slides.ImagePixelFormat;
import com.aspose.slides.Presentation;

    public class SlidesTest {

        public static void main(String[] args) {
            Presentation presentation = new Presentation(SlidesTest.class.getResourceAsStream("off6626PptxAttachment.pptx"));

            com.aspose.slides.TiffOptions options = new com.aspose.slides.TiffOptions();
            options.setPixelFormat(ImagePixelFormat.Format1bppIndexed);
            // options.setCompressionType(TiffCompressionTypes.CCITT4);

            // Save the presentation to TIFF with specified image size
            presentation.save("off6626PptxAttachment.tiff", com.aspose.slides.SaveFormat.Tiff, options);
        }
    }

It appears to me, that setting the pixel format is ignored because the result is a TIFF with colour. Also, the line with options.setCompressionType(…) causes an exception when activated, complaining that CCITT3 (or 4) requires 1bpp.

Is this a bug or restriction in Aspose or am I doing something wrong?

Environment:

/opt/jdk8/bin/java -version
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Djava.net.preferIPv4Stack=true
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
uname -a
Linux 4.16.8-1-ARCH #1 SMP PREEMPT Wed May 9 11:25:02 UTC 2018 x86_64 GNU/Linux

Thanks for your help!
Regards,
Ottosrc.zip (1.3 MB)off6626PptxAttachment.zip (300.6 KB)

@cfodev,

I have observed your comments. Can you please share source files along with generated result and environment details so that we may further investigate to help you out. Also please share which Aspose.Slides version you are using on your end.

Hello Adnan,
thanks for your quick response. I added what you asked for. Aspose Slides version is 18.4 (added it to the headline)

@cfodev,

I have worked with the presentation file shared by you and have been able to observe the issue specified. An issue with ID SLIDESJAVA-370231 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be fixed.