Debenu Quick PDF Library lets you analyze, extract and replace embedded images in PDF files using the extensive image handling functions.

The GetPageImageList function returns an ImageListID which you can use in the GetImageListItemDblProperty function. With this function you can get the coordinates for each image in the image list. The GetImageListItemIntProperty function useful for other image properties. Here is some C# sample code which demonstrates how to retrieve image coordinates for all images in a PDF.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
int nd = DPL.LoadFromFile(@"images.pdf", "");
int il = DPL.GetPageImageList(0);
int ic = DPL.GetImageListCount(il);
for (int k = 1; k <= ic; k++)
{
    int gid = DPL.GetImageListItemIntProperty(il, k, 406);
    txtOutput.AppendText("Image ID: " + Convert.ToString(gid));
    txtOutput.AppendText(Environment.NewLine);
 
    for (int i = 501; i < 509; i++)
    {
        double cOodinate = DPL.GetImageListItemDblProperty(il, ic, i);
 
        switch (i)
        {
case 501:
    txtOutput.AppendText(i + " Horizontal co-ordinate of top-left corner: " + Convert.ToString(cOodinate));
    txtOutput.AppendText(Environment.NewLine);
    break;
case 502:
    txtOutput.AppendText(i + " Vertical co-ordinate of top-left corner: " + Convert.ToString(cOodinate));
    txtOutput.AppendText(Environment.NewLine);
    break;
case 503:
    txtOutput.AppendText(i + " Horizontal co-ordinate of top-right corner: " + Convert.ToString(cOodinate));
    txtOutput.AppendText(Environment.NewLine);
    break;
case 504:
    txtOutput.AppendText(i + " Vertical co-ordinate of top-right corner: " + Convert.ToString(cOodinate));
    txtOutput.AppendText(Environment.NewLine);
    break;
case 505:
    txtOutput.AppendText(i + " Horizontal co-ordinate of bottom-right corner: " + Convert.ToString(cOodinate));
    txtOutput.AppendText(Environment.NewLine);
    break;
case 506:
    txtOutput.AppendText(i + " Vertical co-ordinate of bottom-right corner: " + Convert.ToString(cOodinate));
    txtOutput.AppendText(Environment.NewLine);
    break;
case 507:
    txtOutput.AppendText(i + " Horizontal co-ordinate of bottom-left corner: " + Convert.ToString(cOodinate));
    txtOutput.AppendText(Environment.NewLine);
    break;
case 508:
    txtOutput.AppendText(i + " Vertical co-ordinate of bottom-left corner: " + Convert.ToString(cOodinate));
    txtOutput.AppendText(Environment.NewLine);
    break;
        }
 
    }
txtOutput.AppendText(Environment.NewLine);
txtOutput.AppendText(Environment.NewLine);

for (int i = 501; i < 509; i++)
{
double cOodinate = DPL.GetImageListItemDblProperty(il, ic, i);

switch (i)
{
case 501:
txtOutput.AppendText(i + " Horizontal co-ordinate of top-left corner: " + Convert.ToString(cOodinate));
txtOutput.AppendText(Environment.NewLine);
break;
case 502:
txtOutput.AppendText(i + " Vertical co-ordinate of top-left corner: " + Convert.ToString(cOodinate));
txtOutput.AppendText(Environment.NewLine);
break;
case 503:
txtOutput.AppendText(i + " Horizontal co-ordinate of top-right corner: " + Convert.ToString(cOodinate));
txtOutput.AppendText(Environment.NewLine);
break;
case 504:
txtOutput.AppendText(i + " Vertical co-ordinate of top-right corner: " + Convert.ToString(cOodinate));
txtOutput.AppendText(Environment.NewLine);
break;
case 505:
txtOutput.AppendText(i + " Horizontal co-ordinate of bottom-right corner: " + Convert.ToString(cOodinate));
txtOutput.AppendText(Environment.NewLine);
break;
case 506:
txtOutput.AppendText(i + " Vertical co-ordinate of bottom-right corner: " + Convert.ToString(cOodinate));
txtOutput.AppendText(Environment.NewLine);
break;
case 507:
txtOutput.AppendText(i + " Horizontal co-ordinate of bottom-left corner: " + Convert.ToString(cOodinate));
txtOutput.AppendText(Environment.NewLine);
break;
case 508:
txtOutput.AppendText(i + " Vertical co-ordinate of bottom-left corner: " + Convert.ToString(cOodinate));
txtOutput.AppendText(Environment.NewLine);
break;
}

}
txtOutput.AppendText(Environment.NewLine);
txtOutput.AppendText(Environment.NewLine);

The output will look something like this for every embedded image in the PDF:

Image ID: 1476395011
501 Horizontal co-ordinate of top-left corner: 71.8800049
502 Vertical co-ordinate of top-left corner: 237.1199951
503 Horizontal co-ordinate of top-right corner: 273.9599915
504 Vertical co-ordinate of top-right corner: 237.1199951
505 Horizontal co-ordinate of bottom-right corner: 273.9599915
506 Vertical co-ordinate of bottom-right corner: 85.4400024
507 Horizontal co-ordinate of bottom-left corner: 71.8800049
508 Vertical co-ordinate of bottom-left corner: 85.4400024