I'm trying to remove a layer from a geospatial pdf (specifically the orthoimage layer in USGS topos). ogrinfo reports 26 layers in the meta-data report, but only 12 layers with vector features.
When I try to remove the image layer with this command
ogr2ogr -f "PDF" map.pdf NM_Canada_Ojitos_20110201_TM_geo_enabled.pdf --config GDAL_PDF_LAYERS_OFF "Images.Orthoimage"

the output file is missing the layers with the text labels. In addition, the styling of at least some of the layers is different. For example, the contours in the input have two different line weights, but the output is a single line weight.
Are these differences a limitation of the driver, or do I need to add more parameters/options?

gdal_translate creates an accurate representation in a pdf file, but the output is a bitmap within a pdf, not a layered vector file. ghostscript can be used to remove the image and maintain a vector file, but the layers are gone. And of course, the proprietary Adobe Acrobat can do the task.

 


_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to