Pdftoppm adds extra digits to page number string
When rasterizing a PDF file to images of its pages, pdftoppm will pad the page number (appended together with a '-' symbol to the original file name) depending on the total number of pages. For example, if a file only has pages in the single digits, an output like this will be produced.
However, if a file has more than 9 pages, we would see something like this:
my-pdf-01.png my-pdf-02.png ... my-pdf-10.png
I assume the same happens with more digits. The problem is that this behavior seems somewhat unexpected to me. For example, I'm currently building an annotation tool that assumes a file can be referenced by taking the original name and appending the page number to it. In my case I already have the page number saved in a DB so I can predict how the final name will look like, but I believe for most cases this is not the desired behavior, as it requires building in extra parsing logic into program.
While I'm not a C++ expert, I have a feeling this can be solved fairly quickly, just please confirm that this can indeed be seen as undesired behavior. I'll give it a go tomorrow in fact.
For reference, I'm using pdftoppm from the poppler-utils package v 21.02.0-1 on Ubuntu 21.04.