Render Project to Multipage TIFF
Aspose.Tasks for .NET lets you render Gantt chart to multipage TIFFs. The SaveFileFormat enumeration contains the available output options, including TIFF. The project can be rendered to TIFF with or without compression; supported compression schemes are RLE, CCITT3, CCITT4 and LZW.
Supported Compression Options
The rendering process supports various industry-standard compression schemes, which can significantly reduce the file size of the resulting TIFF without compromising layout fidelity:
- None – Uncompressed output
- RLE (Run-Length Encoding) – Suitable for simple images
- CCITT Group 3 – Used in fax transmission
- CCITT Group 4 – Improved compression for black-and-white images
- LZW (Lempel–Ziv–Welch) – Lossless compression widely used in TIFFs
These options can be applied via the TiffCompression
enumeration inside TiffSaveOptions
.
Rendering to Multipage TIFF
The following code sample:
- Reads a project file.
- Sets the output file format.
- Applies compression and saves an image to disk.
- Removes compression and saves an image to disk.
1Project project = new Project("New Project.mpp");
2
3// Save the project to TIFF
4project.Save("RenderMultipageTIFF_out.tif", SaveFileFormat.TIFF);
5
6// Save the project with CCITT4 compression
7ImageSaveOptions options = new ImageSaveOptions(SaveFileFormat.TIFF);
8options.TiffCompression = TiffCompression.Ccitt4;
9project.Save("RenderMultipageTIFF_options_out.tif", (SaveOptions)options);
10
11// Remove the compression
12options.TiffCompression = TiffCompression.None;
13project.Save("RenderMultipageTIFF_comp_none_out.tif", (SaveOptions)options);
Key Elements in Code
Project.Save()
— Main method to trigger rendering.SaveFileFormat.TIFF
— Target format.TiffSaveOptions
— Allows specifying compression, page size, rendering mode, etc.TiffCompression
— Enum controlling compression scheme (e.g.,TiffCompression.Ccitt4
).
Use Cases
- Documentation & Archiving: Save visual project representations as read-only TIFF files for long-term storage.
- Printing: Generate paginated images for high-resolution printing with layout consistency.
- Offline Review: Export project views to multipage TIFFs that can be distributed or reviewed without project management software.
Summary
Rendering project data to multipage TIFF using Aspose.Tasks for .NET offers flexibility, compatibility, and control over the final visual output. Developers can tailor export settings to fit specific business or technical requirements, including compression for storage optimization.
For more advanced rendering scenarios, consider exploring: