counter in pdf names or a numeric equivalent for $id placeholder

Home › Forums › PDF24 Creator › counter in pdf names or a numeric equivalent for $id placeholder

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #60482
    andredai
    Participant

    Hi,

    I am using pdf24 creator desktop. Is there a way to have a simple counter in produced pdf names? Maybe use a "special" placeholder for "auto save" in pdf filename? What I am interested in, is to know exactly which is the order that the pdfs have been produced. If for example 10 prints sent at about the same time to my pdf24 virtual printer queue, then 10 pdfs will be produced with file names 1,2,3,4...10. The order these pdfs will be produced will be the exact order that the prints arrived to the pdf24 virtual printer queue.

    Please note that date and time placeholders are not sufficient, because in the same second two prints might arrive, so they are not really unique. $id is unique but it is not numeric and you cannot tell what pdf produced before another. So basically what I need is a numeric equivalent for the $id.

    Thanks a lot

    #65974
    PDF24 Support
    Moderator

    Hello,

    there is no counter placeholder for the file name of the automatic saving. The available placeholders are $fileName (name of the print job), $fileDir, $printerName, $owner, $id and date and time values such as %Y-%m-%d %H-%M-%S. As you noticed, $id is unique, but you cannot sort by it.

    A way to get numbered files today: in the settings of the PDF printer under Auto Save, enter a fixed Filename without date and time, e.g. Print, and switch off Overwrite existing file. If a file with this name already exists, PDF24 adds a number: Print.pdf, Print (1).pdf, Print (2).pdf and so on. Each new file gets the first free number, so the numbering only continues as long as the earlier files stay in the folder. With very many files of the same name, saving becomes slower, because PDF24 checks the numbers one after another.

    Thank you for the suggestion of a real counter placeholder, we will add it to our list.

    The PDF printers are described in the manual: https://creator.pdf24.org/manual/11/#6-pdf-printers

    #66814
    PDF24 Support
    Moderator

    Hello,

    a short advance note: the next version of PDF24 Creator adds the placeholder $counter for the file name of the automatic saving. It is a running number that counts up with every file this PDF printer saves, separately for each user, so the numbers show the order in which the PDFs were saved. ${counter:4} writes it with leading zeros (0001, 0002, ...), and it does not depend on which files are still in the folder.

    We will post here once it is released.

    #66942
    PDF24 Support
    Moderator

    Hello,

    the change announced above is now released in PDF24 Creator 11.34.0, available since 11 November 2026: https://tools.pdf24.org/en/creator

    The file name of the automatic saving now knows the placeholder $counter, a running number that counts up with every file this PDF printer saves, separately for each user. ${counter:4} writes it with leading zeros (0001, 0002, ...), independent of which files are still in the folder.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.