• Comunidad global
    • Idioma:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Comunidad dedicada para hablantes de japonés
  • 한국 커뮤니티
    Comunidad dedicada para hablantes de coreano
Salir

Variable Data Set Text Formatting

Principiante de comunidad ,
Mar 02, 2022 Mar 02, 2022

Copiar vínculo al Portapapeles

Copiado

I am using variables and data sets to create a mail merge in Photoshop. For this specific case I have an image on the bottom layer, with several text layers on top. One of the text layers contains ordinal numbers (example: "Superstar, 4th Grade"). Is there a way to make the "th" superscript (smaller and off the base line)? I could fairly easily make the "4" and the "th" in separate fields in my dataset. But the line needs to have the correct spacing throughout - the text before "4th" is also variable.

 

Thank you!

TEMAS
Acciones y scripts

Vistas

1.0K

Traducir

Traducir

Informe

Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Adobe
Community Expert ,
Mar 02, 2022 Mar 02, 2022

Copiar vínculo al Portapapeles

Copiado

Is that text always the same? Can you show a couple of examples, please? There isn't any hidden feature for data sets and you can not control too many things.

 

Perhaps some script can help after exporting data sets to find numberth and make it superscript.

 

Otherwise you can separate text and use paragraph text (I guess) instead of point text before 4th but that may not work for you.

Votos

Traducir

Traducir

Informe

Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Community Expert ,
Mar 03, 2022 Mar 03, 2022

Copiar vínculo al Portapapeles

Copiado

Some links that you can hopefully modify code to meet your requirements:

 

https://community.adobe.com/t5/photoshop-ecosystem-discussions/photoshop-script-make-text-character-...

 

https://community.adobe.com/t5/photoshop-ecosystem-discussions/photoshop-script-to-change-the-font-f...

 

https://community.adobe.com/t5/photoshop-ecosystem-discussions/superscript-text-font-change-using-sc...

 

The variables are output as layered PSD files, which would then need to be batch processed to change all occurrences of (\d+)(st|nd|rd|th) $2 into superscript. Otherwise, you would need to make a script that cna work on the merged data as it creates/saves each variable as a file, which may or may not even be possible. I have seen a script to save variable files directly into a different format than PSD, but not a script to edit the generated variables before saving.

Votos

Traducir

Traducir

Informe

Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
LEYENDA ,
Mar 03, 2022 Mar 03, 2022

Copiar vínculo al Portapapeles

Copiado

Second and fourth links take to the same thread.

Votos

Traducir

Traducir

Informe

Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Community Expert ,
Mar 03, 2022 Mar 03, 2022

Copiar vínculo al Portapapeles

Copiado

OK, thanks I'll delete the fourth link.

Votos

Traducir

Traducir

Informe

Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
LEYENDA ,
Mar 03, 2022 Mar 03, 2022

Copiar vínculo al Portapapeles

Copiado

I would do it, but I'm not moderator from some time. That was 'only' way 😉

Votos

Traducir

Traducir

Informe

Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Principiante de comunidad ,
Mar 07, 2022 Mar 07, 2022

Copiar vínculo al Portapapeles

Copiado

The text in front of the ordinal changes, so that is what makes it  more of a challenge. I might take the easy way and just spell out "first" or "fourth". A few examples if you think there is a way to do this.

Votos

Traducir

Traducir

Informe

Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Principiante de comunidad ,
Mar 07, 2022 Mar 07, 2022

Copiar vínculo al Portapapeles

Copiado

The text in front of the ordinal changes, so that is what makes it  more of a challenge. I might take the easy way and just spell out "first" or "fourth". A few examples if you think there is a way to do this.Shrek 01 sample.jpgShrek 02 sample.jpg

Votos

Traducir

Traducir

Informe

Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Community Expert ,
Mar 07, 2022 Mar 07, 2022

Copiar vínculo al Portapapeles

Copiado

@kathleen08 

How many images need to have the text changed?

 

How often does this need to be performed?

 

As my previous post explained, automating the selection of the ordinal text next to the digit is not the issue, a regular expression search and replace can easily handle that:

 

Find: (\d+)(st|nd|rd|th)

Replace: $2

 

regex.png

 

TH in THE and ST in STEP are not highlighted in orange.

 

The issue as I see it:

 

If using the standard Photoshop variables, you first have to save out the PSD files, with the text as is. Then you will need to either manually or automatically process the PSD files to change the text and save the PSD and other files such as JPG.

 

Alternatively, a full custom script may be able to process each data set and style the text and then output a JPG directly.

 

This brings me back to the links previously provided for superscript text.

 

Photoshop and Illustrator have variables, InDesign has Data Merge – all of which are similar. One program may be easier for this task than the others as InDesign and Illustrator may offer better options for handling text.

Votos

Traducir

Traducir

Informe

Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Principiante de comunidad ,
Mar 07, 2022 Mar 07, 2022

Copiar vínculo al Portapapeles

Copiado

Thank you for the replies!

 

@Stephen_A_Marsh 

I have to do this process with 120 images twice in the next month.

 

If I were doing this in Microsoft Word, it would be easy because I could format each fied/data point separately. In the Adobe ecosystem, I have only every used Photoshop to do this. You mention Illustrator also having variables, and InDesign having Data Merge - maybe I need to research that option if it is more robust/flexible?

 

I have used some scripting in the past, I probably just need a little uninteruppted time to figure it out.

Votos

Traducir

Traducir

Informe

Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Community Expert ,
Mar 07, 2022 Mar 07, 2022

Copiar vínculo al Portapapeles

Copiado

MÁS RECIENTES

@kathleen08 

 

Unless a custom script is required, you don't need to know how to program to use a script. Instructions here:

https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html

 

So one of the previously linked scripts might be able to be used to automate the change of text to ordinal/superscript.

 

This could possibly be recorded into an action for batch, Image Processor or Image Processor Pro or Picture Processor scripts to automate the action and saving from PSD to another file format.

 

Although not ideal, if you could use MS Word to generate the text and save it as a transparent or white background image, this could be layered/blended over the Photoshop file. If the Main image file alphabetically sorted in the same order as the text image files from MS Word, then an existing script could be used to combine both images from say two different folders into a single combined image.

Votos

Traducir

Traducir

Informe

Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines