[gdal-dev] ogr2ogr using PDF driver reports: ERROR 1: Max token stack size reached

Bureau voor Archeologie arjan at bureauvoorarcheologie.nl
Thu Feb 8 00:24:09 PST 2024


I'm trying to convert a PDF with vector data into a shape with:

ogr2ogr test.shp Archeologische\ beleidskaart\ 2023.pdf  --config 
OGR_PDF_READ_NON_STRUCTURED YES

However, It gives the error: ERROR 1: Max token stack size reached

The sources are only converted partly, possibly because of this error. 
Might there be something wrong with my pdf source? Or can this be solved 
by setting some kind of config option when using the PDF driver?

Some additional info:
* I can't find information about setting the token stack size, nor can I 
find messages from others reporting this error.
* I found this error is coded in (sources gdal-3.8.3): 'pdfreadvectors.cpp'
* It's value is defined in gdal_pdf.h: #define TOKEN_STACK_SIZE 8
* this error also occurs when converting to other file format, like gml

Arjan.


-- 
Bureau voor Archeologie
Arjan de Boer
Koningsweg 244, Utrecht
030 245 1895



More information about the gdal-dev mailing list