/ Id-Extras Forum / Pound sign not displayed in the file name
February 3, 2021 at 5:07 pm #6163waitesnParticipant
I have just purchased Extract pages and have just been testing it. I am using it to split an InDesign document into individual PDFs, it is pricing Point of Sale that I am using it for and I need the promotion saving price in the filename, however when I make the PDFs (created using character and Paragraph styles) the pound sign (£) is not coming out in the file name:
10011477 Giant Garden Bag Save 2 A4 A5.pdf
I need it to be:
10011477 Giant Garden Bag Save £2 A4 A5.pdf
Am I doing something wrong or is this not possible?
It is a brilliant script by the way!February 3, 2021 at 5:22 pm #6293~~Ariel~~Participant
Glad you’re finding the script useful!
I don’t think you’re doing anything wrong.
Extract Pages plays it safe with file names, and removes any characters that could potentially cause problems. The £ is in the list, so it’s being removed.
I found a list of legal filename characters somewhere on the Internet, and used that to filter out any illegal ones.
Not much that can be done at this point without modifying the script, I’m afraid. I could do that if it’s very important for you to have the pound sign there, but if anything goes wrong, you’re on your own!
ArielFebruary 3, 2021 at 5:34 pm #6294waitesnParticipant
I would be really grateful if you could modify it for me to try, then if it doesn’t work I assume I can I revert back to the original script.
Thanks for your speedy response.
NicolaFebruary 3, 2021 at 8:57 pm #6295~~Ariel~~Participant
I just sent you a modified version.
ArielFebruary 4, 2021 at 9:17 am #6296waitesnParticipant
Thank you so much Ariel, I have just tried it and it works a treat! this script is going to save me a lot of time and effort, wish I’d found it earlier.
NicolaFebruary 4, 2021 at 9:39 am #6297~~Ariel~~Participant
Great, glad it was a simple fix.
Again, I’m supposing there must be some reason it was on the list of not-recommended filename characters, so keep an eye out for potential issues…
ArielFebruary 4, 2021 at 5:10 pm #6298waitesnParticipant
Sorry I have another question:
We also use fractions in our pricing point of sale: 1/3 off and 1/2 price. I know that you definitely can’t use backslashes in filenames so my thought was to use a GREP style in InDesign to change 1/3 to the word Third and 1/2 to the word Half. I am new to GREP but I did this and saved it as the name Half, see attached.
Then I used
In my custom code in extract pages but the filename still comes out as 12 off, this is the full code I’m using to create the filename, using paragraph and character styles:
This is the result:
10090468 00347366 10090465 Made In England diffuser 12 price A4 A5
I was hoping it was going to say:
10090468 00347366 10090465 Made In England diffuser Half price A4 A5
Have I misunderstood how this works? or what am I doing wrong?February 4, 2021 at 5:27 pm #6299~~Ariel~~Participant
No problem. This is the place to ask the questions…
I see what you were trying to do, but nope, the GREP query shortcode refers only to what’s in the Find part of the query. It finds what’s in the query, and then sticks that into the file name, omitting, as usual, all illegal characters, so the slashes disappear.
I can’t think of a simple workaround here, I’m afraid. If you included some hidden text on your pages with the word “half” or “third”, you could pick that up in the file name, I suppose.
ArielFebruary 10, 2021 at 11:45 am #6300waitesnParticipant
Thanks for clarifying about the GREP. I have got round it by adding this as hidden text as you suggested, which is working a treat.
ThanksMay 11, 2021 at 1:49 pm #6301waitesnParticipant
Hi, I have sent a couple of emails to you regarding getting the script customised for us so that it includes a percentage sign % and an ampersand &. But I have not had a response. We are happy to pay for this.