<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
<div style="16px" text-align="left">Dear mpsuzuki,<br /></div><div style="16px" text-align="left"><br /></div><div style="16px" text-align="left">Thanks for your clarification. I am using pdfimages mainly for processing scanned books. I don't think I will have to process books with more than 3,333 pages (that will render more than 10,000 files in the worst case). Therefore %04d is enough for my current use, however do I have to modify the code and recompile pdfimages myself? <br /></div><div style="16px" text-align="left"><br /></div><div style="16px" text-align="left">But in the long run, I think it is better to have an option for a user to specify the numbering format in the output sequence.<br /></div><div style="16px" text-align="left"><br /></div><div style="16px" text-align="left">Thanks,<br /></div><div style="16px" text-align="left">Abi<br /></div><div style="16px" text-align="left"><br /></div><div style="16px" text-align="left">Jan 11, 2019, 12:52 PM by mpsuzuki@hiroshima-u.ac.jp:<br /></div><blockquote class="tutanota_quote" style="border-left: 1px solid #93A3B8; padding-left: 10px; margin-left: 5px;"><div style="16px" text-align="left">Dear Abigaile,<br /></div><blockquote>does that mean there is a way to specify numbering format already?<br /></blockquote><div style="16px" text-align="left"><br /></div><div style="16px" text-align="left">No. What I meant was...<br /></div><div style="16px" text-align="left"><br /></div><div style="16px" text-align="left">* If there is any existing parser for the user-defined numbering format (out of<br /></div><div style="16px" text-align="left">pdfimages, but in poppler), it would be possible for somebody to write a patch.<br /></div><div style="16px" text-align="left">* But if there is no, the discussion about the syntax would be needed for first.<br /></div><div style="16px" text-align="left"><br /></div><div style="16px" text-align="left">Or, "if the total number of the images exceed 1000, the numbering should be<br /></div><div style="16px" text-align="left">%04d, we do not need the interface to specify the numbering format" would be<br /></div><div style="16px" text-align="left">another solution. how do you think about?<br /></div><div style="16px" text-align="left"><br /></div><div style="16px" text-align="left">Regards,<br /></div><div style="16px" text-align="left">mpsuzuki<br /></div><div style="16px" text-align="left"><br /></div><div style="16px" text-align="left">Abigaile Johannesburg wrote:<br /></div><blockquote><div style="16px" text-align="left">Dear mpsuzuki,<br /></div><div style="16px" text-align="left"><br /></div><div style="16px" text-align="left">Thank you for quoting the source file regarding numbering scheme.  When you say<br /></div><div style="16px" text-align="left"><br /></div><div style="16px" text-align="left">"good syntax to specify numbering format, if possible, which is already used by poppler'suser interfaces."<br /></div><div style="16px" text-align="left"><br /></div><div style="16px" text-align="left">does that mean there is a way to specify numbering format already?<br /></div><div style="16px" text-align="left"><br /></div><div style="16px" text-align="left">Thanks,<br /></div><div style="16px" text-align="left">Abi<br /></div><div style="16px" text-align="left"><br /></div><div style="16px" text-align="left">Jan 10, 2019, 12:49 AM by <a rel="noopener noreferrer" target="_blank" href="mailto:mpsuzuki@hiroshima-u.ac.jp">mpsuzuki@hiroshima-u.ac.jp</a>:<br /></div><div style="16px" text-align="left">Dear Abigaile,<br /></div><div style="16px" text-align="left"><br /></div><div style="16px" text-align="left">At present, 3-digit-numbering is hardwired, like, this<br /></div><div style="16px" text-align="left"><br /></div><div style="16px" text-align="left"><a rel="noopener noreferrer" target="_blank" href="https://gitlab.freedesktop.org/poppler/poppler/blob/master/utils/ImageOutputDev.cc#L83">https://gitlab.freedesktop.org/poppler/poppler/blob/master/utils/ImageOutputDev.cc#L83</a><<a rel="noopener noreferrer" target="_blank" href="https://apac01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fpoppler%2Fpoppler%2Fblob%2Fmaster%2Futils%2FImageOutputDev.cc%23L83&data=02%7C01%7Cmpsuzuki%40hiroshima-u.ac.jp%7Cb9caafd0af1d488d21bb08d677e4edd8%7Cc40454ddb2634926868d8e12640d3750%7C1%7C0%7C636828222476265275&sdata=0%2FkYtZimHm%2BjmzXnamD%2FnyplO83WOZr4e5BqoHyn4f0%3D&reserved=0">https://apac01.safelinks.protection.outlook.com/?url=https://gitlab.freedesktop.org/poppler/poppler/blob/master/utils/ImageOutputDev.cc#L83&data=02|01|mpsuzuki@hiroshima-u.ac.jp|b9caafd0af1d488d21bb08d677e4edd8|c40454ddb2634926868d8e12640d3750|1|0|636828222476265275&sdata=0/kYtZimHm+jmzXnamD/nyplO83WOZr4e5BqoHyn4f0=&reserved=0</a>><br /></div><div style="16px" text-align="left"><br /></div><div style="16px" text-align="left">void ImageOutputDev::setFilename(const char *fileExt) {<br /></div><div style="16px" text-align="left">if (pageNames) {<br /></div><div style="16px" text-align="left">sprintf(fileName, "%s-%03d-%03d.%s", fileRoot, pageNum, imgNum, fileExt);<br /></div><div style="16px" text-align="left">} else {<br /></div><div style="16px" text-align="left">sprintf(fileName, "%s-%03d.%s", fileRoot, imgNum, fileExt);<br /></div><div style="16px" text-align="left">}<br /></div><div style="16px" text-align="left">}<br /></div><div style="16px" text-align="left"><br /></div><div style="16px" text-align="left">I want to know whether good syntax to specify numbering<br /></div><div style="16px" text-align="left">format, if possible, which is already used by poppler's<br /></div><div style="16px" text-align="left">user interfaces.<br /></div><div style="16px" text-align="left"><br /></div><div style="16px" text-align="left">Regards,<br /></div><div style="16px" text-align="left">mpsuzuki<br /></div><div style="16px" text-align="left"><br /></div><div style="16px" text-align="left">Abigaile Johannesburg wrote:<br /></div><div style="16px" text-align="left">Hello,<br /></div><div style="16px" text-align="left"><br /></div><div style="16px" text-align="left">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<br /></div><div style="16px" text-align="left"><br /></div><div style="16px" text-align="left">rename 's/img-([0-9]{3}).pbm/img-0$1.pbm/' *.pbm<br /></div><div style="16px" text-align="left"><br /></div><div style="16px" text-align="left">Therefore I was wondering if there is a way to specify the format of output numbering directly in pdfimages.<br /></div><div style="16px" text-align="left"><br /></div><div style="16px" text-align="left">Thanks,<br /></div><div style="16px" text-align="left">Abi<br /></div></blockquote></blockquote><div style="16px" text-align="left"><br /></div>  </body>
</html>