[poppler] How to specify format of output numbering?

Abigaile Johannesburg abij at tuta.io
Fri Jan 11 16:50:38 UTC 2019

Dear mpsuzuki,

Thank you for quoting the source file regarding numbering scheme.  When you say

"good syntax to specify numbering format, if possible, which is already used by poppler'suser interfaces."

does that mean there is a way to specify numbering format already?


Jan 10, 2019, 12:49 AM by mpsuzuki at hiroshima-u.ac.jp:

> Dear Abigaile,
> At present, 3-digit-numbering is hardwired, like, this
> https://gitlab.freedesktop.org/poppler/poppler/blob/master/utils/ImageOutputDev.cc#L83 <https://gitlab.freedesktop.org/poppler/poppler/blob/master/utils/ImageOutputDev.cc#L83>
> 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.
> Regards,
> mpsuzuki
> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/poppler/attachments/20190111/a02415ca/attachment.html>

More information about the poppler mailing list