This function returns information about the images inside a given PDF document. The result is returned as a table array.
PDFGetImageDetails([PDF File])
Where:
PDF File is the path to the PDF file from which to get the info. If a full file path is not given the path will be resolved to the Project location unless one of the following prefixes is used:
Rule | Result |
---|---|
PDFGetImageDetails("C:\DriveWorks\Document.pdf") | This will return a table with all the image data in the PDF file called "Document.pdf".
The table will contain nine columns: PageNumber, ImageIndex, Height, Width, UpperRightX, UpperRightY, LowerLeftX and LowerLeftY. The returned array will be ordered by PageIndex, and then ImageIndex in ascending order. |
The following is an example of the PDF file used to extract the image details.
PDFGetImageDetailsPDFExamplePageNumber | ImageIndex | Height | Width | UpperRightX | UpperRightY | LowerLeftX | LowerLeftY |
---|---|---|---|---|---|---|---|
1 | 1 | 85 | 85 | 566.9 | 809.02 | 481.9 | 724.02 |
1 | 2 | 177.6 | 355.2 | 475.1 | 309.78 | 119.9 | 132.18 |
1 | 3 | 225 | 450 | 522.65 | 641.72 | 72.65 | 416.72 |
2 | 1 | 225 | 450 | 522.65 | 641.12 | 72.65 | 416.12 |
2 | 2 | 85 | 85 | 566.9 | 811.02 | 481.9 | 726.02 |
Results are sorted on ascending PageNumber and PageIndex, you can use other table functions to perform any other sorting you need.
Image Position is measured from the bottom left of each page in DPI.
Image Height and Width are in DPI.
DPI = dots per inch.
For each image, the following data will be returned:
The image below explains where each coordinate is taken from.