Extraction of images is overlapped

Hi Team,

Extracting the images from the document using paragraph node.
The images is extracted based on the next sibling as fig caption.
but the source document having previous sibling as fig caption.
another oneThe final output is override the other image.
please let me know how to handle the issue.

The sample code is Test.zip (41.4 KB)
The input is Test.zip (1.7 MB)
The expected output OutputFolder.zip (1.7 MB)
The actual output ActualOutput.zip (1.6 MB)

Thanks & regards,
priyanga G

@priyanga

Thanks for your inquiry. We already answered your query here in this post. Please follow that thread for further proceedings.