I'm interested to create a vector point layer representing the centroid of some 500-1000 PDF files exported from QGIS to find PDFs geographically rather than using file explorer. I would like to automate this using PyQGIS.
I tested with the algorithm
'Tile Index' to manually extract the extents of 3 PDFs into a single GeoPackage through a batch process. Setting the output to the same
.gpkg successfully appends each tile index into one GeoPackage. Writing the PyQGIS to take the centroid would then be straight forward. It is the first part which is convoluted. Below is the end result of my test.
I have a filing system where all 500-1000 PDFs are stored in client folders structured as below. The PDFs outlined green below are always stored in a folder named
"!pdf's". An example of the file path is below.
"V:/GIS - Files/1. Client Projects/A/Angus, A/ALN511253 - Lo/!pdf's/ALN511220-01.pdf"
I'd like to get the tile index of all 500-1000 PDFs in one swoop. Is it possible to target the
"!pdf's" folder across all client folders using PyQGIS?
There are generic PDFs in the folder named
'Other' so I cannot search for all PDFs from the directory