Class Image_Api
- java.lang.Object
- 
- com.ironsoftware.ironpdf.internal.staticapi.Image_Api
 
- 
 public final class Image_Api extends Object The type Image api.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classImage_Api.ImageData
 - 
Constructor SummaryConstructors Constructor Description Image_Api()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static voiddrawImage(InternalPdfDocument internalPdfDocument, byte[] imageBytes, List<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 streamstatic List<byte[]>extractAllImages(InternalPdfDocument internalPdfDocument)Finds all embedded Images from within the PDF and returns as list of image bytesstatic List<byte[]>extractAllImages(InternalPdfDocument internalPdfDocument, List<Integer> pageIndexes)Finds all embedded Images from within the PDF and returns then as image byte[] objectsstatic InternalPdfDocumentimageToPdf(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, List<Integer> pageIndexes)Renders the PDF and exports image Files in convenient formats.static List<byte[]>pdfToImage(InternalPdfDocument internalPdfDocument, List<Integer> pageIndexes, int dpi)Renders the PDF and exports image Files in convenient formats.static List<byte[]>pdfToImage(InternalPdfDocument internalPdfDocument, List<Integer> pageIndexes, int dpi, Integer imageMaxWidth)Renders the PDF and exports image Files in convenient formats.static List<byte[]>pdfToImage(InternalPdfDocument internalPdfDocument, List<Integer> pageIndexes, int dpi, Integer imageMaxWidth, Integer imageMaxHeight)Renders the PDF and exports image Files in convenient formats.static byte[]toMultiPageTiff(InternalPdfDocument internalPdfDocument, List<Integer> pageIndexes, int dpi, Integer imageMaxWidth, Integer imageMaxHeight)
 
- 
- 
- 
Method Detail- 
imageToPdfpublic static InternalPdfDocument imageToPdf(List<Image_Api.ImageData> imagesData, ImageBehavior imageBehavior, ChromePdfRenderOptions renderOptions) Converts multiple image files to a PDF document. Each image creates 1 page which matches the image dimensions. The default PaperSize is A4. You can set it viaChromePdfRenderOptions.setPaperSize(PaperSize)Note: Imaging.ImageBehavior.CropPage will set PaperSize equal to ImageSize.- Parameters:
- imagesData- The- Image_Api.ImageData
- imageBehavior- Describes how image should be placed on the PDF page
- renderOptions- Rendering options
- Returns:
- the internal pdf document
 
 - 
drawImagepublic static void drawImage(InternalPdfDocument internalPdfDocument, byte[] imageBytes, List<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- Parameters:
- internalPdfDocument- the internal pdf document
- imageBytes- images to draw
- pageIndexes- Target page indexes
- x- X coordinate
- y- Y coordinate
- desiredWidth- Desired widths
- desiredHeight- Desired heights
 
 - 
extractAllImagespublic static List<byte[]> extractAllImages(InternalPdfDocument internalPdfDocument) throws IOException Finds all embedded Images from within the PDF and returns as list of image bytes- Parameters:
- internalPdfDocument- the internal pdf document
- Returns:
- the list
- Throws:
- IOException- the io exception
 
 - 
extractAllImagespublic static List<byte[]> extractAllImages(InternalPdfDocument internalPdfDocument, List<Integer> pageIndexes) throws IOException Finds all embedded Images from within the PDF and returns then as image byte[] objects- Parameters:
- internalPdfDocument- the internal pdf document
- pageIndexes- Index of the page. Note: Page 1 has index 0. Defaults to all pages
- Returns:
- the list
- Throws:
- IOException- the io exception
 
 - 
pdfToImagepublic static List<byte[]> pdfToImage(InternalPdfDocument internalPdfDocument, List<Integer> pageIndexes, int dpi, Integer imageMaxWidth) throws IOException Renders the PDF and exports image Files in convenient formats. Page Numbers may be specified. 1 image file is created for each page.FileNamePattern should normally contain an asterisk (*) character which will be substituted for the page numbers - Parameters:
- internalPdfDocument- the internal pdf document
- pageIndexes- 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.
- Returns:
- An array of the file paths of the image files created. The DPI will be ignored under Linux and macOS. 
- Throws:
- IOException- the io exception
 
 - 
pdfToImagepublic static List<byte[]> pdfToImage(InternalPdfDocument internalPdfDocument, List<Integer> pageIndexes, int dpi, Integer imageMaxWidth, Integer imageMaxHeight) throws IOException Renders the PDF and exports image Files in convenient formats. Page Numbers may be specified. 1 image file is created for each page.FileNamePattern should normally contain an asterisk (*) character which will be substituted for the page numbers - Parameters:
- internalPdfDocument- the internal pdf document
- pageIndexes- 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.
- Returns:
- An array of the file paths of the image files created.
- Throws:
- IOException- the io exception
 
 - 
pdfToImagepublic static List<byte[]> pdfToImage(InternalPdfDocument internalPdfDocument, List<Integer> pageIndexes, int dpi) throws IOException Renders the PDF and exports image Files in convenient formats. Page Numbers may be specified. 1 image file is created for each page.FileNamePattern should normally contain an asterisk (*) character which will be substituted for the page numbers - Parameters:
- internalPdfDocument- the internal pdf document
- pageIndexes- A list of the specific zero based page number to render as images.
- dpi- The desired resolution of the output Images.
- Returns:
- An array of the file paths of the image files created.
- Throws:
- IOException- the io exception
 
 - 
pdfToImagepublic static List<byte[]> pdfToImage(InternalPdfDocument internalPdfDocument, List<Integer> pageIndexes) throws IOException Renders the PDF and exports image Files in convenient formats. Page Numbers may be specified. 1 image file is created for each page.FileNamePattern should normally contain an asterisk (*) character which will be substituted for the page numbers - Parameters:
- internalPdfDocument- the internal pdf document
- pageIndexes- A list of the specific zero based page number to render as images.
- Returns:
- An array of the file paths of the image files created.
- Throws:
- IOException- the io exception
 
 - 
pdfToImagepublic static List<byte[]> pdfToImage(InternalPdfDocument internalPdfDocument) throws IOException Renders the PDF and exports image Files in convenient formats. Page Numbers may be specified. 1 image file is created for each page.FileNamePattern should normally contain an asterisk (*) character which will be substituted for the page numbers - Parameters:
- internalPdfDocument- the internal pdf document
- Returns:
- An array of the file paths of the image files created.
- Throws:
- IOException- the io exception
 
 - 
toMultiPageTiffpublic static byte[] toMultiPageTiff(InternalPdfDocument internalPdfDocument, List<Integer> pageIndexes, int dpi, Integer imageMaxWidth, Integer imageMaxHeight) throws IOException - Throws:
- IOException
 
 
- 
 
-