Hi Team,
We have a requirement to get following property from PDF
1. Height of image in points
2. Width of image in points
3. Colorspace used in PDF
Thanking You
Priya Dharshini J P
Hi Team,
We have a requirement to get following property from PDF
1. Height of image in points
2. Width of image in points
3. Colorspace used in PDF
Thanking You
Priya Dharshini J P
Hello Priya,
Thanks for contacting support.
In order to get Height, Width and Colorsapce of the image, please check following code snippet and attached output.
Document
document = new Document(dataDir + “gr7-grey.pdf”);
XImage xImage = document.getPages().get_Item(1).getResources().getImages().get_Item(1);
System.out.println("Height=" + xImage.getHeight());
System.out.println("Width=" + xImage.getWidth());
switch (xImage.getColorType()) {
case ColorType.***Grayscale*** :
System.out.println("Grayscale Image");
break;
case ColorType.Rgb :
System.out.println("Colored Image");
break;
}
Furthermore, you may visit following links for more information.
In case of any further assistance, please feel free to contact us.
Best Regards,
Hi asad,
Hi Priya,
Hi team,
Hello Priya,