This quick tutorial explains how to insert footer in PowerPoint in Java. It covers setting up the development environment and gives step-by-step instructions for building the application. It also includes ready-to-run sample code for adding a footer for PowerPoint in Java. You will get an introduction to additional product features to enhance the sample code to customize the headers and footers in the output PPTX file.
Steps for Adding Footer to PowerPoint in Java
- Set the IDE to use Aspose.Slides for Java to add headers and footers
- Apply the product license to avail the product features without any limitations
- Create a new blank presentation that contains one slide by default
- Add another slide containing the same layout as the first default slide
- Put a text box on each slide and create sample automated content on each slide for the demo
- Set the same footer text for all the slides in the presentation using the PresentationHeaderFooterManager class
- Set flags to display the footer and slide number on each slide
- Set a text box as header on the master slide for making it visible on all the slides
- Save the presentation on the disk
These steps describe how to add a footer to PowerPoint in Java. Load the product license, create a new blank presentation or load an existing presentation into memory, add more slide(s) to the presentation if it has only a single slide in it, add some different text on both the slides, access the PresentationHeaderFooterManager object from the presentation, and utilize it to set footer text, flags for displaying the footer and slide number on each slide. Since there isn’t a built-in feature for adding a header to a presentation, you can add a text box at the top of the master slide to make it visible on all the slides, and save the presentation.
Code for Header and Footer in PowerPoint in Java
This code snippet demonstrates how to add footer in PowerPoint in Java. This API supports built-in header placeholders for setting headers in the notes and printed handouts, provides an option to set custom date/time display in the footer, and lets you hide or show the footer on the title slide, if required. You can also show the footer on selected slides only and assign the header text box a name and alternate text to make it more accessible.
This article assists with PowerPoint footers. To add transitions to PowerPoint, refer to the article Add Transitions to PowerPoint in Java.