Disegnare forme in PowerPoint usando Java

This article guides you on how to add shapes to PowerPoint using Java. This guide includes IDE setup, step-by-step instructions, and sample code to draw shapes in PowerPoint using Java. You will also learn how to customize the shapes in the sample code to create custom shapes in the output PPTX.

Passaggi per disegnare forme in PowerPoint usando Java

  1. Set up the environment to use Aspose.Slides for Java to add shapes to a slide.
  2. Import all the necessary modules and classes from the library.
  3. Crea un nuovo presentation vuoto e seleziona la prima diapositiva
  4. Get the collection of shapes from the selected slide.
  5. Use addAutoShape() to add more shapes such as a rectangle, an ellipse, a triangle, a rounded rectangle, a line, and a star.
  6. Salva la presentazione dopo aver aggiunto più forme

Questi passaggi descrivono come aggiungere forme in PowerPoint usando Java. Add a license to the program, create an empty presentation, access the first slide, and get the slide’s shape collection to add other shapes using the addAutoShape() method. Add more shapes such as rectangle, ellipse, triangle, line, and star, and save the presentation.

Codice per creare forme in PowerPoint con Java

This code snippet demonstrates how to create shapes in PowerPoint using Java. È possibile impostare i nomi delle forme e il testo alternativo, bloccare le forme per evitare modifiche accidentali e impostare l’allineamento e la formattazione del testo. È inoltre possibile modificare l’ordine di sovrapposizione delle forme, aggiungere forme correlate in un gruppo, utilizzare connettori per collegare le forme e impostare lo stile della linea.

Questo articolo spiega come disegnare forme in una diapositiva. To insert footers, refer to the article Insert the footer in PowerPoint in Java.

 Italiano