Convert PowerPoint to TIFF

Convert PPT(X) to TIFF

The Save method exposed by Presentation class can be called by developers to convert the whole presentation into TIFF document. Further, TiffOptions class exposes ImageSize property enabling the developer to define the size of the image if required.

Convert PPT(X) to TIFF with Default Size

The following example shows how to convert a presentation into a TIFF document with default options.

// Instantiate a Presentation object that represents a presentation file
Presentation pres = new Presentation("presentation.pptx");
try {
    // Saving the presentation to TIFF document
    pres.save("tiff-image.tiff", SaveFormat.Tiff);
} finally {
    if (pres != null) pres.dispose();
}

Convert PPT(X) to TIFF with Custom Size

The following example shows how to convert a presentation into TIFF document with customized image size using TiffOptions class.

// Instantiate a Presentation object that represents a Presentation file
Presentation pres = new Presentation("presentation.pptx");
try {
    // Instantiate the TiffOptions class
    TiffOptions opts = new TiffOptions();
    
    // Setting compression type
    // Possible values are:
    // Default - Specifies the default compression scheme (LZW).
    // None - Specifies no compression.
    // CCITT3
    // CCITT4
    // LZW
    // RLE
    opts.setCompressionType(TiffCompressionTypes.Default);
    
    // Depth – depends on the compression type and cannot be set manually.
    
    // Setting image DPI
    opts.setDpiX(200);
    opts.setDpiY(100);
    
    // Set Image Size
    opts.setImageSize(new java.awt.Dimension(1728, 1078));
    
    INotesCommentsLayoutingOptions options = opts.getNotesCommentsLayouting();
    options.setNotesPosition(NotesPositions.BottomFull);
    // Save the presentation to TIFF with specified image size
    pres.save("tiff-ImageSize.tiff", SaveFormat.Tiff, opts);
} finally {
    if (pres != null) pres.dispose();
}    

Convert PPT(X) to TIFF with Custom Image Pixel Format

The following example shows how to convert a presentation into a TIFF document with customized Image Pixel Format using TiffOptions class. You can also include comments in generated TIFF by using TiffOptions class.

// Instantiate a Presentation object that represents a Presentation file
Presentation pres = new Presentation("presentation.pptx");
try {
    TiffOptions options = new TiffOptions();
    options.setPixelFormat(ImagePixelFormat.Format8bppIndexed);
    
    /*
     * ImagePixelFormat contains the following values (as could be seen from documentation):
     * Format1bppIndexed; // 1 bits per pixel, indexed.
     * Format4bppIndexed; // 4 bits per pixel, indexed.
     * Format8bppIndexed; // 8 bits per pixel, indexed.
     * Format24bppRgb;    // 24 bits per pixel, RGB.
     * Format32bppArgb;   // 32 bits per pixel, ARGB.
     */
    
    // Save the presentation to TIFF with specified image size
    pres.save("Tiff-PixelFormat.tiff", SaveFormat.Tiff, options);
} finally {
    if (pres != null) pres.dispose();
}