Changing document properties - %[FileName] macro  SOLVED

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

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Markus Stamm
User
Posts: 10
Joined: Mon Apr 20, 2020 8:38 pm

Changing document properties - %[FileName] macro

Post by Markus Stamm »

I regularly need to batch-change PDF document properties and would like to set the document title to the file name without the extension .pdf. Using the macro %[FileName] in PDF Tools, I can change the the document title to the file name including the extension .pdf, but I have not found a way to eliminate the .pdf file extension when setting the document title. Is there a way to do this? It may be so obvious that I'm simply overlooking this, but I have not found a possibility yet.

Thank you in advance for any helpful advice.

Best regards,
Markus
User avatar
DenisO
Site Admin
Posts: 104
Joined: Fri Jun 09, 2017 5:40 pm

Re: Changing document properties - %[FileName] macro  SOLVED

Post by DenisO »

Hi Markus,
[%Filename] macro should set only file name without extension. The issue will be fixed in next release. Thank you for report.
Meanwhile you can use
SetDocTitleToFilenameWithoutExtension.zip
tool as workaround. The tool has two Change doc properties actions. First action sets initial view Doc title to file name
imageFirst.png
.
Second action uses %DocTitle macros to set title in document info
imageSecond.png
Kind regards,
You do not have the required permissions to view the files attached to this post.
Denis Oleksenko
Software Developer
Tracker Software Products (Canada) LTD
Markus Stamm
User
Posts: 10
Joined: Mon Apr 20, 2020 8:38 pm

Re: Changing document properties - %[FileName] macro

Post by Markus Stamm »

Hi Denis,

thank you very much for your quick help. I'm happy to confirm that the workaround works. This is especially helpful for me as I am in the process of phasing out Adobe Acrobat and replacing it by PDFXChange Pro for all my PDF-related tasks, and this one was pretty much the last task that I needed to cover.

When looking into the %[FileName] macro issue, may I suggest to add a parameter to the macro so the user can select whether the macro captures the entire file name or strips the extension or even a number of characters from it? This way, the user could select whether they want to capture the full file name (for which there could be valid reasons also) or not.

Thank you for your great support. If you would like me to test anything, please let me know.

Best regards,
Markus
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17948
Joined: Mon Jan 12, 2009 8:07 am
Location: London

Changing document properties - %[FileName] macro

Post by Tracker Supp-Stefan »

:)
l.s
User
Posts: 1
Joined: Thu Mar 12, 2009 12:10 pm

Re: Changing document properties - %[FileName] macro

Post by l.s »

Hello,

I have a sligtly related problem.

I produce pdf files, that can contain a sidekar of the original document, the they can still be edited.
To visualy mark those files that the original program uses a double file extension (.pap.pdf)
Before I send thes files to my customers, I intend to strip the original parts and do other modifikations to the pdf. That content modification part works fine with pdftools.

Where I struggel ist, to shorten the original file name to not contain the second file extension (in this case .pap) in the target pdfs filename?

Is there way to do this that I missed?


Regards, Lars
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17948
Joined: Mon Jan 12, 2009 8:07 am
Location: London

Re: Changing document properties - %[FileName] macro

Post by Tracker Supp-Stefan »

Hello Lars,

I am afraid that there aren't the necessary tools that would allow you to truncate parts of the file name that are not considered the actual file name extension (.pdf in our case) using the PDF Tools. However there should be many tools that would allow you to manage files, so you can e.g. make the PDF Tools output to go all to a specific folder, and have that third party tool monitor this folder and take any files with .pap.pdf extension, and remove the ".pap" part, then move those files to a different folder if necessary.

Kind regards,
Stefan