[poppler] How to specify format of output numbering?

suzuki toshiya mpsuzuki at hiroshima-u.ac.jp
Thu Jan 10 00:49:26 UTC 2019

Dear Abigaile,

At present, 3-digit-numbering is hardwired, like, this


void ImageOutputDev::setFilename(const char *fileExt) {
  if (pageNames) {
    sprintf(fileName, "%s-%03d-%03d.%s", fileRoot, pageNum, imgNum, fileExt);
  } else {
    sprintf(fileName, "%s-%03d.%s", fileRoot, imgNum, fileExt);

I want to know whether good syntax to specify numbering
format, if possible, which is already used by poppler's
user interfaces.


Abigaile Johannesburg wrote:
> Hello,
> The default output numbering of pdfimages is 3 digit, e.g,  image-root-nnn.xxx. But if there are more than 1,000 ouput images, there will be files image-root-nnn.xxx (3 digit number sequence) and image-root-nnnn.xxx (4 digit number sequence). When processing book images in bash, the ordering needs a fix. At the moment I use rename
> rename 's/img-([0-9]{3}).pbm/img-0$1.pbm/' *.pbm
> Therefore I was wondering if there is a way to specify the format of output numbering directly in pdfimages.
> Thanks,
> Abi

More information about the poppler mailing list