Convert PowerPoint to TIFF with Notes in JavaScript
Overview
Aspose.Slides for Node.js via Java provides a simple solution for converting PowerPoint and OpenDocument presentations (PPT, PPTX, and ODP) with notes to the TIFF format. This format is widely used for high-quality image storage, printing, and document archiving. With Aspose.Slides, you can not only export entire presentations with speaker notes but also generate slide thumbnails in the Notes Slide view. The conversion process is simple and efficient, utilizing the save
method of the Presentation class to transform the entire presentation into a series of TIFF images while preserving the notes and layout.
Convert a Presentation to TIFF with Notes
Saving a PowerPoint or OpenDocument presentation to TIFF with notes using Aspose.Slides for Node.js via Java involves the following steps:
- Instantiate the Presentation class: Load a PowerPoint or OpenDocument file.
- Configure the output layout options: Use the NotesCommentsLayoutingOptions class to specify how notes and comments should be displayed.
- Save the presentation to TIFF: Pass the configured options to the save method.
Let’s say we have a “speaker_notes.pptx” file with the following slide:
The code snippet below demonstrates how to convert the presentation to a TIFF image in Notes Slide view using the setSlidesLayoutOptions method.
// Instantiate the Presentation class that represents a presentation file.
let presentation = new aspose.slides.Presentation("speaker_notes.pptx");
try {
let notesOptions = new aspose.slides.NotesCommentsLayoutingOptions();
notesOptions.setNotesPosition(aspose.slides.NotesPositions.BottomFull); // Display the notes below the slide.
// Configure the TIFF options with Notes layouting.
let tiffOptions = new aspose.slides.TiffOptions();
tiffOptions.setDpiX(300);
tiffOptions.setDpiY(300);
tiffOptions.setSlidesLayoutOptions(notesOptions);
// Save the presentation to TIFF with the speaker notes.
presentation.save("TIFF_with_notes.tiff", aspose.slides.SaveFormat.Tiff, tiffOptions);
} finally {
presentation.dispose();
}
The result: