I am attempting to use ogr2ogr to convert a PDF to a SHP through the OSGeo4W shell, part of the QGIS installation (3.6 i think) on windows 10. I have used this before successfully but been a while so unsure why it isn't working. I have tried using 2 PDFs (both georeferenced - i can see the latlong). Both PDFs are recognized in GDALInfo and all the info is provided easily.
When run in ogr2ogr i use the simple following line:
ogr2ogr dest.shp source.pdf
but get this error
Unable to open datasource `source.pdf' with the following drivers.
-> `JP2ECW'
-> `OCI'
-> `SOSI'
-> `PCIDSK'
-> `netCDF'
-> `JP2OpenJPEG'
-> `PDF'
It has the PDF driver (which works fine in GDALInfo) so why not here?
Both PDFs were made in ArcMap. When exporting PDFs I know the georeference option needs to be checked for this to work. I also found that only the middle option "Export PDF Layers Only" works in ogr2ogr. If either the flattened version "None" and the "Export PDF Layers and Feature Attributes" are chosen then the ogr2ogr conversion does not work. I cant see a way around this
Examples PDFs here if you want to see. Only GeoPDF2.pdf seems to work in OGR2OGR. https://we.tl/t-xBBRCJg9TH
ogr2ogr
is trying to open a vector