Custom name of merged PDFs

This Forum is for the use of End Users requiring help and assistance for Tracker Software's PDF-Tools.

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Stefan - PDF-XChange

JupiPupi
User
Posts: 3
Joined: Wed Feb 18, 2026 10:47 am

Custom name of merged PDFs

Post by JupiPupi »

Greetings, newbie hire.

Don't know if this is possible, I have searched for answer on help pages but couldn't find it.
I would like that exported file, that is merged from multiple PDFs have specific name.

Merged PDF file should be named like this:
word "Invoice" followed by a invoice numbers which are separated by comma.
those Invoice numbers are written on specific location, on first page of every PDF doc. that should be merged.

Example how should merged PDF file name look like: "Invoice 1,8,23,41,44,57,72,76,90,143,421"

What actions should I use? Where to start? :roll:
Screenshot 2026-02-18 115619.png
You do not have the required permissions to view the files attached to this post.
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 12491
Joined: Wed Jan 03, 2018 6:52 pm

Re: Custom name of merged PDFs

Post by Daniel - PDF-XChange »

Hello, JupiPupi

Unfortunately there is no way to pull text from a document based on location for automation actions at this time. In this scenario, you will need to use a different naming scheme (such as the "auto number" macro).

Kind regards,
Dan McIntyre - Support Technician
PDF-XChange Co. LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
JupiPupi
User
Posts: 3
Joined: Wed Feb 18, 2026 10:47 am

Re: Custom name of merged PDFs

Post by JupiPupi »

Thanks for fast reply,

Ok, if its not possible to extract text from document based on location, is it possible to extract invoice number from filename and have same result? Because in filename I also have invoice number.
Screenshot 2026-02-19 085514.png
You do not have the required permissions to view the files attached to this post.
User avatar
Sean - PDF-XChange
Site Admin
Posts: 720
Joined: Wed Sep 14, 2016 5:42 pm

Re: Custom name of merged PDFs

Post by Sean - PDF-XChange »

Hi JupiPupi,

Can you please clarify which feature you are using to merge documents?

Kind regards,
Sean Godley
Technical Writer
PDF-XChange Co LTD
Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623
JupiPupi
User
Posts: 3
Joined: Wed Feb 18, 2026 10:47 am

Re: Custom name of merged PDFs

Post by JupiPupi »

I'm using "Split/Merge PDFs" Tool.
User avatar
Sean - PDF-XChange
Site Admin
Posts: 720
Joined: Wed Sep 14, 2016 5:42 pm

Re: Custom name of merged PDFs

Post by Sean - PDF-XChange »

Hi JupiPupi,

Okay thanks - in that case I'm afraid your options for naming documents are resticted to those offered in the dialog box:

image.png

As mentioned above, you can use macros to assist you - but the exact operation you asked about is not possible.


https://help.pdf-xchange.com/pdfxt10/macros_t.html


Kind regards,
You do not have the required permissions to view the files attached to this post.
Sean Godley
Technical Writer
PDF-XChange Co LTD
Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623
zeromons
User
Posts: 1
Joined: Fri Oct 25, 2024 6:31 am

Re: Custom name of merged PDFs

Post by zeromons »

JupiPupi wrote: Wed Feb 18, 2026 11:33 am Greetings, newbie hire.

Don't know if this is possible, I have searched for answer on help pages but couldn't find it.
I would like that exported file, that is merged from multiple PDFs have specific name.

Merged PDF file should be named like this:
word "Invoice" followed by a invoice numbers which are separated by comma.
those Invoice numbers are written on specific location, on first page of every PDF doc. that should be merged.

Example how should merged PDF file name look like: "Invoice 1,8,23,41,44,57,72,76,90,143,421"

What actions should I use? Where to start? :roll:

Screenshot 2026-02-18 115619.png
JavaScript output name workflow - hope it helps!

Code: Select all

function Tools_DoWork()
{
    // this is a placeholder for your code
    // ...
    // 'this' object represents the doc
    // https://opensource.adobe.com/dc-acrobat-sdk-docs/library/jsapiref/doc.html#doc
    // ...
	var dummy = this.numPages;
    var ids = [];
    var re = /^Invoice_(\d+)_1_1$/;  //Change Regex for you filename (i used Claude)

    var root = this.bookmarkRoot;
    if (root && root.children) {
        for (var i = 0; i < root.children.length; i++) {
            var m = re.exec(root.children[i].name);
            if (m) ids.push(m[1]);
        }
    }
    ids.sort(function(a,b){ return a - b; });
    return "Invoice " + ids.join(",");
}
[img]https://i.postimg.cc/NMtg81n6/workflow.jpg[/img]