-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMasterShowcasePptxExample.java
More file actions
49 lines (43 loc) · 1.72 KB
/
Copy pathMasterShowcasePptxExample.java
File metadata and controls
49 lines (43 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package com.demcha.examples.flagships;
import com.demcha.compose.document.api.DocumentSession;
import com.demcha.examples.support.ExampleOutputPaths;
import java.nio.file.Path;
/**
* The {@link MasterShowcaseExample} kitchen-sink report emitted as a PowerPoint
* deck: the same composition, built once through the shared session config and
* written through the fixed-layout PPTX backend via
* {@link DocumentSession#buildPptx(java.nio.file.Path)}. Each resolved page becomes one
* identically-sized slide, so the multi-page report opens in PowerPoint as an
* editable copy of the PDF — rich text, the advanced table, header/footer
* chrome, and barcodes arrive as native shapes and text frames; the rotated,
* clip-masked seal is the one region that lands as a pixel-exact picture.
*
* @since 2.1.0
*/
public final class MasterShowcasePptxExample {
private MasterShowcasePptxExample() {
}
/**
* Builds the report as the .pptx twin of {@link MasterShowcaseExample}.
*
* @return the generated file path
* @throws Exception when composition or rendering fails
*/
public static Path generate() throws Exception {
Path outputFile = ExampleOutputPaths.prepare("flagships", "master-showcase.pptx");
try (DocumentSession document = MasterShowcaseExample.document(outputFile).create()) {
MasterShowcaseExample.compose(document);
document.buildPptx(outputFile);
}
return outputFile;
}
/**
* Generates the deck from the command line.
*
* @param args unused
* @throws Exception when rendering fails
*/
public static void main(String[] args) throws Exception {
System.out.println("Generated: " + generate());
}
}