ImageExportType Enum
Specifies output formats for image export.
Declaration
public enum ImageExportType extends Enum<ImageExportType> implements IIntEnum
Members
| Name | Description |
|---|---|
BITMAP
|
Exports pages as bitmap images. |
SVG
|
Exports pages as SVG images. |
fromValue(int value)
|
Returns the enum value that corresponds to the specified integer. |
getName()
|
Returns the name of this enum value. |
getValue()
|
Returns the integer value of this enum item. |
toString()
|
Returns the string representation of this enum value. |
valueOf(String name)
|
Returns the enum value with the specified name. |
values()
|
Returns an array that contains all enum values. |
Remarks
The following code snippet exports the first two pages to SVG images using custom image export options:
import com.devexpress.drawing.*;
import com.devexpress.docs.pdf.*;
import java.nio.channels.*;
import java.nio.file.*;
public class Main {
public static void main(String[] args) throws Exception {
try (PdfDocument pdfDocument =
new PdfDocument(FileChannel.open(Path.of("document.pdf")))) {
// Configure image export settings.
ImageExportOptions options = new ImageExportOptions();
options.setImageExportType(ImageExportType.SVG);
options.setLargestEdgeLength(1000);
// Export pages 1 and 2 to images.
DXImage[] images = pdfDocument.exportToImages(
options,
new int[] { 0, 1 });
try {
// Save each exported page as an SVG file.
for (int i = 0; i < images.length; i++) {
images[i].save("page-" + (i + 1) + ".svg");
}
} finally {
// Release image resources.
for (DXImage image : images) {
image.close();
}
}
}
}
}
Implements
com.devexpress.java.enums.IIntEnum
Inherited Members
java.lang.Enum.<T>valueOf(java.lang.Class<T>,java.lang.String)
java.lang.Enum.clone()
java.lang.Enum.compareTo(E)
java.lang.Enum.describeConstable()
java.lang.Enum.equals(java.lang.Object)
java.lang.Enum.finalize()
java.lang.Enum.getDeclaringClass()
java.lang.Enum.hashCode()
java.lang.Enum.name()
java.lang.Enum.ordinal()
java.lang.Enum.toString()
java.lang.Object.getClass()
java.lang.Object.notify()
java.lang.Object.notifyAll()
java.lang.Object.wait()
java.lang.Object.wait(long)
java.lang.Object.wait(long,int)
Inheritance
Object
java.lang.Enum
ImageExportType