public final class Image_Api extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Image_Api.ImageData |
Constructor and Description |
---|
Image_Api() |
Modifier and Type | Method and Description |
---|---|
static void |
drawImage(InternalPdfDocument internalPdfDocument,
byte[] imageBytes,
Iterable<Integer> pageIndexes,
double x,
double y,
double desiredWidth,
double desiredHeight)
Draw an image multiple times according to the specified parameters; all occurrences of the
image will share a single data stream
|
static List<byte[]> |
extractAllImages(InternalPdfDocument internalPdfDocument)
Finds all embedded Images from within the PDF and returns as list of image bytes
|
static List<byte[]> |
extractAllImages(InternalPdfDocument internalPdfDocument,
Iterable<Integer> pageIndexes)
Finds all embedded Images from within the PDF and returns then as image byte[] objects
|
static InternalPdfDocument |
imageToPdf(List<Image_Api.ImageData> imagesData,
ImageBehavior imageBehavior,
ChromePdfRenderOptions renderOptions)
Converts multiple image files to a PDF document.
|
static List<byte[]> |
pdfToImage(InternalPdfDocument internalPdfDocument)
Renders the PDF and exports image Files in convenient formats.
|
static List<byte[]> |
pdfToImage(InternalPdfDocument internalPdfDocument,
Iterable<Integer> pageIndexes)
Renders the PDF and exports image Files in convenient formats.
|
static List<byte[]> |
pdfToImage(InternalPdfDocument internalPdfDocument,
Iterable<Integer> pageIndexes,
int dpi)
Renders the PDF and exports image Files in convenient formats.
|
static List<byte[]> |
pdfToImage(InternalPdfDocument internalPdfDocument,
Iterable<Integer> pageIndexes,
int dpi,
Integer imageMaxWidth)
Renders the PDF and exports image Files in convenient formats.
|
static List<byte[]> |
pdfToImage(InternalPdfDocument internalPdfDocument,
Iterable<Integer> pageIndexes,
int dpi,
Integer imageMaxWidth,
Integer imageMaxHeight)
Renders the PDF and exports image Files in convenient formats.
|
static byte[] |
toMultiPageTiff(InternalPdfDocument internalPdfDocument,
Iterable<Integer> pageIndexes,
int dpi,
Integer imageMaxWidth,
Integer imageMaxHeight) |
public static InternalPdfDocument imageToPdf(List<Image_Api.ImageData> imagesData, ImageBehavior imageBehavior, ChromePdfRenderOptions renderOptions)
ChromePdfRenderOptions.setPaperSize(PaperSize)
Note: Imaging.ImageBehavior.CropPage will set PaperSize equal to ImageSize.imagesData
- The Image_Api.ImageData
imageBehavior
- Describes how image should be placed on the PDF pagerenderOptions
- Rendering optionspublic static void drawImage(InternalPdfDocument internalPdfDocument, byte[] imageBytes, Iterable<Integer> pageIndexes, double x, double y, double desiredWidth, double desiredHeight)
internalPdfDocument
- the internal pdf documentimageBytes
- images to drawpageIndexes
- Target page indexesx
- X coordinatey
- Y coordinatedesiredWidth
- Desired widthsdesiredHeight
- Desired heightspublic static List<byte[]> extractAllImages(InternalPdfDocument internalPdfDocument) throws IOException
internalPdfDocument
- the internal pdf documentIOException
- the io exceptionpublic static List<byte[]> extractAllImages(InternalPdfDocument internalPdfDocument, Iterable<Integer> pageIndexes) throws IOException
internalPdfDocument
- the internal pdf documentpageIndexes
- Index of the page. Note: Page 1 has index 0. Defaults to all pagesIOException
- the io exceptionpublic static List<byte[]> pdfToImage(InternalPdfDocument internalPdfDocument, Iterable<Integer> pageIndexes, int dpi, Integer imageMaxWidth) throws IOException
FileNamePattern should normally contain an asterisk (*) character which will be substituted for the page numbers
internalPdfDocument
- the internal pdf documentpageIndexes
- A list of the specific zero based page number to render as images.dpi
- The desired resolution of the output Images.imageMaxWidth
- The target maximum width(in pixel) of the output images.The DPI will be ignored under Linux and macOS.
IOException
- the io exceptionpublic static List<byte[]> pdfToImage(InternalPdfDocument internalPdfDocument, Iterable<Integer> pageIndexes, int dpi, Integer imageMaxWidth, Integer imageMaxHeight) throws IOException
FileNamePattern should normally contain an asterisk (*) character which will be substituted for the page numbers
internalPdfDocument
- the internal pdf documentpageIndexes
- A list of the specific zero based page number to render as images.dpi
- The desired resolution of the output Images.imageMaxWidth
- The target maximum width(in pixel) of the output images.imageMaxHeight
- The target maximum height(in pixel) of the output images.IOException
- the io exceptionpublic static List<byte[]> pdfToImage(InternalPdfDocument internalPdfDocument, Iterable<Integer> pageIndexes, int dpi) throws IOException
FileNamePattern should normally contain an asterisk (*) character which will be substituted for the page numbers
internalPdfDocument
- the internal pdf documentpageIndexes
- A list of the specific zero based page number to render as images.dpi
- The desired resolution of the output Images.IOException
- the io exceptionpublic static List<byte[]> pdfToImage(InternalPdfDocument internalPdfDocument, Iterable<Integer> pageIndexes) throws IOException
FileNamePattern should normally contain an asterisk (*) character which will be substituted for the page numbers
internalPdfDocument
- the internal pdf documentpageIndexes
- A list of the specific zero based page number to render as images.IOException
- the io exceptionpublic static List<byte[]> pdfToImage(InternalPdfDocument internalPdfDocument) throws IOException
FileNamePattern should normally contain an asterisk (*) character which will be substituted for the page numbers
internalPdfDocument
- the internal pdf documentIOException
- the io exceptionpublic static byte[] toMultiPageTiff(InternalPdfDocument internalPdfDocument, Iterable<Integer> pageIndexes, int dpi, Integer imageMaxWidth, Integer imageMaxHeight) throws IOException
IOException
Copyright © 2022–2023 Iron Software. All rights reserved.