Copy link to clipboard
Copied
Hi,
I have a catalogue with >5000 item numbers. Each item number has between 6 and 14 characters (mostly numbers but sometimes also letters).
For better reading, the item numbers are written in blocks of 2 with a space in between.
Problem: If you copy the item number from a PDF, for example, the spaces will of course also be copied.
So it would be a much better way to change the tracking (is this the correct term? in German it is called "Laufweite") of every 2nd character by using GREP Styles instead of using the spaces.
But there are 2 problems:
1) I want to get every 2nd character from the left to the right (character 2, 4, 6, and so on) no matter how many characters the item number has.
With this I get every 2nd character from right to left (I found it in the internet, I'm not good at regex):
\w(?=\w{2}\b)|\w(?=(\w{2}){2,}\b)
e.g.:
12 34 56
1 23 45 67
But i want to have:
12 34 56
12 34 56 7
2) The GREP Style only works in text frames but not in tables/cells.
Every item number is written in a seperate cell. It kinda looks like this:
The cells with the item number have the same paragraph style like the text frame.
Can anyone help me solve the problems, please? Whereby the second problem is the bigger problem.
The catalouge will be created every year with a PIM. The PIM creates everything by using templates and fills it with content. It also optimizes the column width. So it should work with GREP Styles, I think. Find and replace would be not an option beacuse the optimisation of the columns width won't work anymore.
Many thanks in advance!
Instead of GREP style use a Nested style
You have to insert a Space where highlighted
Before
After
Then you already need to have Paragraph and Character Styles setup
Apply the Paragraph Style
Then the Character style is triggered by the Nested Style
Targeting the spaces between words
You Change the Paragraph Style to alter it
Test file attached
You can do much the same thing with nested styles if you want to target 2 numbers together
Adjust the nested style sequence
...
Hi @mr21282609 ,
do you or your customers still intend to copy item numbers from the PDF you exported from InDesign?
I think it makes no difference if there is a blank character or a white space done with tracking regarding the PDF. When the text is copied over from the PDF a blank character will be in the pasted result. This behavior could also differ from PDF reading application to PDF reading application; eg. like Acrobat Reader or Acrobat Pro DC handles this vs. a PDF reader from a browser…
...Copy link to clipboard
Copied
Instead of GREP style use a Nested style
You have to insert a Space where highlighted
Before
After
Then you already need to have Paragraph and Character Styles setup
Apply the Paragraph Style
Then the Character style is triggered by the Nested Style
Targeting the spaces between words
You Change the Paragraph Style to alter it
Test file attached
You can do much the same thing with nested styles if you want to target 2 numbers together
Adjust the nested style sequence
It would be something like this
Copy link to clipboard
Copied
Hi @Eugene Tyson ,
thank you very much. That's much easier then GREP (also esier to understand for my colleagues) and it works!
I never paid any attention to the function before.
Thank you very much!
Copy link to clipboard
Copied
Hi @mr21282609 ,
do you or your customers still intend to copy item numbers from the PDF you exported from InDesign?
I think it makes no difference if there is a blank character or a white space done with tracking regarding the PDF. When the text is copied over from the PDF a blank character will be in the pasted result. This behavior could also differ from PDF reading application to PDF reading application; eg. like Acrobat Reader or Acrobat Pro DC handles this vs. a PDF reader from a browser…
I would test the copy/paste process from the exported PDF with different PDF reading apps. Preferable with the ones your customers are using. Hm. I think we already had discussed the problem in this forum. One crucial difference could be if the option PDF Tags is checked in the export dialog of InDesign.
See into this discussion:
InDesign kerning and tracking converted to white space when exporting to PDF
Javier Gómez LaÃnez, May 17, 2022
https://community.adobe.com/t5/indesign-discussions/indesign-kerning-and-tracking-converted-to-white...
And my reply in the same thread:
Regards,
Uwe Laubender
( Adobe Community Expert )
Copy link to clipboard
Copied
Hi @Laubender ,
Thank you very much for your tip. These are problems that I would never have thought they existed...
Fortunately, my colleagues use Adobe Reader to view the PDFs and copy the product codes.
But it's very good to know that it (very probably) won't work properly with any other application.
Copy link to clipboard
Copied
[...] For better reading, the item numbers are written in blocks of 2 with a space in between. [...]
By @mr21282609
When / where / how this space is added?
Before importing to InDesign or after - in the InDesign?
Can you avoid it and then just use Nested Styles?
With such long codes - I think 3 or even 4 digits would be better?
Like with phone numbers - split into (+44) 9999 999 999.
Copy link to clipboard
Copied
Hi Robert,
when using tracking the space is added when you copy/paste from an exported PDF to another application.
Customers will do this. It is not added, as my tests are showing, when "Tagged PDF" in the export dialog for PDFs is enabled. That goes for PDF reading apps like Adobe Reader or Acrobat Pro. Also for the PDF reading app that comes with Firefox. But one cannot predict the behavior of other PDF readers.
Regards,
Uwe Laubender
( Adobe Community Expert )
Copy link to clipboard
Copied
Hi @Robert at ID-Tasker ,
you are right. Such long codes would be easier to read in blocks with 3 oder 4 digits.
But what can I say? It is "historisch gewachsen". That means: It has been like this for decades and (most of) my colleagues don't want to get used to something new... Lazy as fu**...
Sometimes it doesn't help, they have to get used to something new. But if they think it's easier to read in blocks of 2, then let them have it that way.
Copy link to clipboard
Copied
I'm not arguing about how it is displayed - too much - I'm just asking when / how those extra spaces are added?
If they can be avoided - you could just space digits with formatting - instead of having physical spaces in between of digits...