### Custom Font Directory Configuration
Source: https://github.com/hidekatsu-izuno/wmf2svg/blob/master/README.md
Specify a directory containing font files for rendering when fonts are not installed on the host OS.
```bash
java -Djava.awt.headless=true -jar wmf2svg-[version].jar -fontdir /path/to/fonts input.wmf output.png
```
--------------------------------
### Build Project with Maven
Source: https://github.com/hidekatsu-izuno/wmf2svg/blob/master/docs/index.md
Command to build the wmf2svg jar file using Maven.
```bash
mvn package
```
--------------------------------
### Run wmf2svg via Command Line
Source: https://github.com/hidekatsu-izuno/wmf2svg/blob/master/docs/index.md
Basic syntax for executing the wmf2svg jar file to convert metafile formats.
```bash
java -jar wmf2svg-[version].jar [options...] [wmf/emf filename] [svg/svgz/png/jpg/jpeg filename]
```
--------------------------------
### Generate WMF Metafile
Source: https://github.com/hidekatsu-izuno/wmf2svg/blob/master/docs/index.md
Use WmfGdi to programmatically create a WMF file by recording GDI calls.
```java
try (OutputStream out = new FileOutputStream("output.wmf")) {
WmfGdi gdi = new WmfGdi();
gdi.placeableHeader(0, 0, 1000, 1000, 1440);
gdi.header();
gdi.rectangle(100, 100, 900, 900);
gdi.write(out);
}
```
--------------------------------
### Run wmf2svg in Headless Environment
Source: https://github.com/hidekatsu-izuno/wmf2svg/blob/master/docs/index.md
Execute the conversion tool in Java's headless mode, which is necessary for rendering raster images like PNG or JPEG in environments without a display.
```bash
java -Djava.awt.headless=true -jar wmf2svg-[version].jar input.wmf output.png
```
--------------------------------
### Build and Test Tasks
Source: https://github.com/hidekatsu-izuno/wmf2svg/blob/master/README.md
Use mise to execute Maven build and test commands.
```bash
mise run build
```
```bash
mise run test
```
--------------------------------
### WMF/EMF Metafile Generation
Source: https://github.com/hidekatsu-izuno/wmf2svg/blob/master/README.md
Uses WmfGdi or EmfGdi to generate or transcode metafiles.
```APIDOC
## Java Library: Metafile Generation
### Description
Generates a new WMF file by recording GDI calls.
### Usage
```java
try (OutputStream out = new FileOutputStream("output.wmf")) {
WmfGdi gdi = new WmfGdi();
gdi.placeableHeader(0, 0, 1000, 1000, 1440);
gdi.header();
gdi.rectangle(100, 100, 900, 900);
gdi.write(out);
}
```
```
--------------------------------
### Maven Dependency Configuration
Source: https://github.com/hidekatsu-izuno/wmf2svg/blob/master/docs/index.md
Include the wmf2svg library in your project using Maven.
```xml
net.arnx
wmf2svg
0.10.2
```
--------------------------------
### Transcode WMF to EMF
Source: https://github.com/hidekatsu-izuno/wmf2svg/blob/master/docs/index.md
Use EmfGdi to parse a WMF file and serialize it as an EMF file.
```java
try (InputStream in = new FileInputStream("input.wmf");
OutputStream out = new FileOutputStream("output.emf")) {
EmfGdi gdi = new EmfGdi();
new WmfParser().parse(in, gdi);
gdi.write(out);
}
```
--------------------------------
### PNG/JPEG Output Conversion
Source: https://github.com/hidekatsu-izuno/wmf2svg/blob/master/README.md
Renders a WMF/EMF file to a raster image format (PNG or JPEG) using AwtGdi.
```APIDOC
## Java Library: Raster Image Conversion
### Description
Parses a metafile and renders it to a PNG or JPEG image using Java2D/ImageIO.
### Usage
```java
try (InputStream in = new FileInputStream("input.emf");
OutputStream out = new FileOutputStream("output.png")) {
AwtGdi gdi = new AwtGdi();
gdi.setOpaqueBackground(true);
new EmfParser().parse(in, gdi);
gdi.write(out, "png");
}
```
*Note: Use "jpeg" as the second argument to `gdi.write` to output JPEG files.*
```
--------------------------------
### Convert WMF to SVG
Source: https://github.com/hidekatsu-izuno/wmf2svg/blob/master/docs/index.md
Use SvgGdi to parse a WMF file and write it as an SVG.
```java
try (InputStream in = new FileInputStream("input.wmf");
OutputStream out = new FileOutputStream("output.svg")) {
SvgGdi gdi = new SvgGdi();
new WmfParser().parse(in, gdi);
gdi.write(out);
}
```
--------------------------------
### SVG Output Conversion
Source: https://github.com/hidekatsu-izuno/wmf2svg/blob/master/README.md
Converts a WMF file to an SVG file using the SvgGdi implementation.
```APIDOC
## Java Library: SVG Conversion
### Description
Parses a WMF input stream and writes the output as an SVG file.
### Usage
```java
try (InputStream in = new FileInputStream("input.wmf");
OutputStream out = new FileOutputStream("output.svg")) {
SvgGdi gdi = new SvgGdi();
new WmfParser().parse(in, gdi);
gdi.write(out);
}
```
*Note: Use `new EmfParser()` for EMF input files.*
```
--------------------------------
### Convert EMF to PNG or JPEG
Source: https://github.com/hidekatsu-izuno/wmf2svg/blob/master/docs/index.md
Use AwtGdi to render an EMF file into a raster image format like PNG or JPEG.
```java
try (InputStream in = new FileInputStream("input.emf");
OutputStream out = new FileOutputStream("output.png")) {
AwtGdi gdi = new AwtGdi();
gdi.setOpaqueBackground(true);
new EmfParser().parse(in, gdi);
gdi.write(out, "png");
}
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.