• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Data-driven grahics

Explorer ,
Dec 20, 2015 Dec 20, 2015

Copy link to clipboard

Copied

Hi friends,

I am in the process of creating multiple designs from a template. I want to automate the whole process as there are around 7000 designs I need to create from the main template. I checked the Creating data-driven graphics in Photoshop article but it creates without resizing (the variable here is text so the "Pixel Replacement" option is not there). And I dont want to open all the files for resizing them. Any workaround for this?

Thanks,

Rajesh

TOPICS
Actions and scripting

Views

3.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Dec 24, 2015 Dec 24, 2015

I have uploaded a .zip archive:

https://www.dropbox.com/s/bejqr2p2g3rdrk2/ps-variable-demo.zip

Contents:

* dataset.csv = simple test data source file

* demo-test.psd = Photoshop file for test export

* Resize layer to 2277px.jsx = Script to resize targeted layer content to 2277px wide

* Variable-Resize-Demo.atn = Action file that references the script with other steps

There are also two folders:

* Export to Datasets = Original export of data sets x2 .psd files

* Action Output = Batch action output resize

...

Votes

Translate

Translate
Adobe
Community Expert ,
Dec 20, 2015 Dec 20, 2015

Copy link to clipboard

Copied

If you image vary in size you would I believe you would first need to create a patch process to preprocess images for the layers they will be replacing. They most likely need to be the correct aspect ratio and size for the layers. The resized files need to be save into the correct location the ones in the CSV file.

Data driver Graphics has good text Text layers can had different fonts and text size.

If your only doing image placement you may be able to use a script that will populate the templates and resize the image to fill the locations the image will be positioned to. The script also had to know the order the area will be populated  and process the image in the correct order.  A control file could be used the list the images in the order the need to be populated in.

My  Photo Collage Toolkit just uses  the file system sort order for sequencing.  I prefix the file name with a sequence number using rename file.  For templates where the images are populated in a known order.   My scripts can not replace existing template text layers.  The only text support offered is stamping the image with their file names.  However image can be any size they will be sized to fill the area the will occupy and any excess will be masked off.  Image locations can be any shape.  However image will be place in square to the canvas no rotation will be performed.

However Populated image are layers and cak be tweaked via transform rotate.

Photo Collage Toolkit

Photoshop scripting is powerful and I believe this package demonstrates this A video showing a 5 image collage PSD template  being populates with images:

The package includes four simple rules to follow when making Photo Collage Template PSD files so they will be compatible with my Photoshop scripts.

  1. Size the photo collage templates for the print size you want - width, height and print DPI resolution.
  2. Photo collage templates must have a Photoshop background layer. The contents of this layer can be anything.
  3. Photo collage templates must have alpha channels named "Image 1", "Image 2", ... "Image n".
  4. Photo collage templates layers above the background layers must provide transparent areas to let the images that will be placed below them show through.

There are twelve scripts in this package they provide the following functions:

  1. TestCollageTemplate.jsx - Used to test a Photo Collage Template while you are making it with Photoshop.
  2. CollageTemplateBuilder.jsx - Can build Templates compatible with this toolkit's scripts.
  3. LayerToAlphaChan.jsx - Used to convert a Prototype Image Layer stack into a template document.
  4. InteractivePopulateCollage.jsx - Used to interactively populate Any Photo Collage template. Offers most user control inserting pictures and text.
  5. ReplaceCollageImage.jsx - use to replace a populated collage image Smart Object layer with an other image correctly resized and positioned.
  6. ChangeTextSize.jsx - This script can be used to change Image stamps text size when the size used by the populating did not work well.
  7. PopulateCollageTemplate.jsx - Used to Automatically populate a Photo Collage template and leave the populated copy open in Photoshop.
  8. BatchOneImageCollage.jsx - Used to Automatically Batch Populate Collage templates that only have one image inserted. The Collage or Image may be stamped with text.
  9. BatchMultiImageCollage.jsx - Used to Automatically Batch Populate Any Photo Collage template with images in a source image folder. Easier to use than the interactive script. Saved collages can be tweaked.
  10. BatchPicturePackage.jsx - Used to Automatically Batch Populate Any Photo Collage template with an image in a source image folder
  11. PasteImageRoll.jsx - Paste Images into a document to be print on roll paper.
  12. PCTpreferences.jsx - Edit This File to Customize Collage Populating scripts default setting and add your own Layer styles.

Documentation and Examples

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 21, 2015 Dec 21, 2015

Copy link to clipboard

Copied

JJMackThanks for the tuts... its alot of stuff will go through them and will hit back... thanks again.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 20, 2015 Dec 20, 2015

Copy link to clipboard

Copied

It is as yet unknown if you will need a script or not, actions may or may not suffice. At this point I have more questions than answers.

So to clarify…

* You will have a .CSV file containing around 7000 rows, with each row being text.

* Your Photoshop template will have a layer set to text replacement. Your template file will contain placeholder variable text, for example the text may be 72pt sized.

* Will the resulting text always be too large or too small or a mix of both?

* How will you need the text to be resized?

* You mention the pixel replacement option and that this is not an option. Do you require it to be?

Can you post screen captures to the forum of your file and layer setup?

Can you post a link to a file sharing site such as DropBox with a small sample data set (say 5 records) and your template?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 21, 2015 Dec 21, 2015

Copy link to clipboard

Copied

@Stephen_A_Marsh please check my response below:

* You will have a .CSV file containing around 7000 rows, with each row being text. yes

* Your Photoshop template will have a layer set to text replacement. Your template file will contain placeholder variable text, for example the text may be 72pt sized.yes

* Will the resulting text always be too large or too small or a mix of both? it will be mix of large/small

* How will you need the text to be resized? I want it be aligned in the same as template. So if its 8 alphabets I want it to be resized as the original 5 alphabet text. If its 12 alphabets I want it to resize to cover the same as original 5 alphabet placeholder.

* You mention the pixel replacement option and that this is not an option. Do you require it to be? I can use it but since the texts are of different aplhabets so I think it will not be possible

Can you post screen captures to the forum of your file and layer setup? sure will do, once I reach home.

Can you post a link to a file sharing site such as DropBox with a small sample data set (say 5 records) and your template?sure will do, once I reach home.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 21, 2015 Dec 21, 2015

Copy link to clipboard

Copied

Would it be possible to do this in InDesign or Illustrator, or is Photoshop the only tool you could use?

I know of one option for Illustrator that may help with sizing the text:

Prepression: Illustrator – Introducing the VariableImporter Script

Adobe Illustrator Variable Data: dealing with overset text. | Vasily Hall | LinkedIn

Illustrator Variable Data Exploratory Techniques: Using Actions to Style Overset Text | Vasily Hall ...

Perhaps JJMack could describe his script ChangeTextSize.jsx in more detail and how it could be used in this project?

No matter how you look at it, I would not throw 7000 records at InDesign, Illustrator or Photoshop’s variable data engines in one go! You may need to break these down into sets of 1000 or less.

You may also be better served by looking into robust third party commercial variable data software (that will be rather expensive).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 22, 2015 Dec 22, 2015

Copy link to clipboard

Copied

Stephen_A_Marsh‌ I have subscribed only with PS package and dont know anything abt other tools. Please find below the setup I have now for this template. I was thinking about creating the text as image files first and using the pixel option if thats possible? And yes 7000 is big number, I have to sort them out into smaller groups else my laptop will be dead Regarding using third party tools if there are any please let me know.

demo.PNG

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 23, 2015 Dec 23, 2015

Copy link to clipboard

Copied

I was hoping that you could use InDesign or Illustrator which are both better suited to working with text variables than Photoshop.

I would not advise rasterizing the text and then enlarging it, unless there was an automated method and the text was rasterized much larger and thus reduced in size (you would not wish to enlarge the pixels).

With 7000 variable text entries, this is going to be tough. I hope that JJMack can explain if his text size script will be of use or not.

You could set the font in the spreadsheet to a monospace font such as courier, that way you will at least know the true length of characters in each variable. Once you know the longest entry, you can then setup the template variable font size to the largest font size that will fit the longest line of text. Then all of the other text will at least be smaller and will not be broken into two lines.

I’ll have a think and see what I can come up with. I hope that somebody has an answer for you as I can’t think of an easy way to do this…

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 23, 2015 Dec 23, 2015

Copy link to clipboard

Copied

OK, I think that I have a solution.

It will require that you generate your merged .psd files “as is” with some text layers being less than the full required width.

An automated batch action will then be run on each separate saved file, which will then resize the text layer to the appropriate pixel width using a script and possibly to the required vertical position if required.

I am guessing that a custom script could be created to do this in one step, however that is beyond my abilities.

If you can provide a copy of your template and at least 2 variable text descriptions, from the smallest amount of characters to the largest amount of characters (smallest line width to longest line width), I will test that this works as required.

EDIT: Contact me offlist via a private message if you don’t wish to share the template download link with the public.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 23, 2015 Dec 23, 2015

Copy link to clipboard

Copied

Size is a hard problem for both IMAGE and TEXT when it comes to populating templates.  Template have areas you want to populate with Text and with Images and these areas may overlap so layer stacking order comes into play.

Templates have a fixed Document size mean they have a Fixed Aspect Ratio and Fixed Resolution.  For example 16" x 20" 300DPI document. A 4:5 document with a 300DPI resolution. The Document size is  4800px x 9000px.   Element are populate using  Layers.  The area bounds of all the different areas in a template PSD document have a fixed aspect ratio and the document resolution. Their sizes are fixed they have some number of pixels a width number of pixels and a height number of pixels.  All  pixels in a layers bounds do not have to have content and a layer bound may exceed an areas bounds where excess pixels are masked off to constrain the layer visible area to the shape of the area in the template.

Image files also have a canvas size the is a fixed number pixels wide and fixed number of pixel high. However some Image file format support transparency like png, and psd for example. Transparency in the perimeter area can effect how image will align to a area. It is best to avoid this. It easy to do by add a 1% opacity pixel to the top left and bottom right pixel in an image file the has full transparency in the image's perimeter.

Image Populating

All images can be resized using interpolation to fill an image area and be masked to constrain the resize to the image area.  If the image's Aspect Ratio and the image area's aspect ratio are the same and the areas shape is this rectangle the resize will be perfect and no image content will me masked off.  When they are not the same some image content will be masked off. What one would see is a virtual center crop to constrain the images aspect ratio to the areas aspect ratio.   If the Aspect Ratios are not vastly different the result will most likely be acceptable.  However if the are vastly different the result may not be acceptable.  Landscape to Portrait and Portrait to Landscape will not work well.

Image Area's may also have other attributes that are not easy to automate while populating the area.  The areas may not be squared to the template canvas and it may also have a perspective of some sort. While its easy to mask the image to the areas shape it not easy to support rotation and perspective.  So I do not even attempt to support rotation or perspective.   The results of populating a template PSD is a Populated PSD any layer can be tweaked. Virtual crop composition can be adjusted and image can be transformed to add rotation and perspective adjustments.

Text Population

Text is very very complex IMO to complex to be fully support via scripting.   My scripts have a very limited text feature.   The Op stated they were thinking about supporting text via Image rather the Text.  That will only work if the Images are created  with the correct number of pixel for the area being populated.   Text does not resize well using interpolation and cropping text is not acceptable.

Text is very complex all you need to do to see how is record some action steps  where you add text layers using different options multi line paragraphs to a text area. A simple text layer.  Text layer where you change some character color, font, size spacing, justification etc.  Once you record the action fully expand the actions steps so you can all Photoshop recorded  for these text layers.

Text is very complex most fonts have proportional width characters so text content effect text with,  Font Size is also a strange beast Fonts have to fit some height however character vary in height some extend below line and there are other special notations marks inter character and line spacing.  When you have no idea of what the replacement text may be I feel its an impossible task.  You can see this using the text tool just keep entering text soon the text layer will exceed the canvas size.  The documents canvas size will act like a clipping mask for the text layer. Some text will be outside the documents bounds.

To support text requires a design team and an army of programmers better then me. Fitting text to an area most likely would requite using different font sizes for different content  Template would need to be populated with different size fonts which may not be acceptable.   Text Alignment also need to be considered.  IMO TEXT must be spelled out with well defined rules for each template.  I do not think a general solution is possible.

Templates with fixed non populated text layers are not a problem nothing changes these fixed layers.

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 23, 2015 Dec 23, 2015

Copy link to clipboard

Copied

‌Thank you for the detailed reply JJMack! I was hoping  some specific comments on your text script, however I believe that I have a workable  automated solution that does not require operator intervention. I just need the .psd template and the shortest and longest variable samples to verify.

EDIT: Is it the bottom line only, or the top line as well that will be variable in length? It should not matter to my solution, just need to clarify the scope of the project.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 23, 2015 Dec 23, 2015

Copy link to clipboard

Copied

Thanks JJMack for the detailed explanation.

Stephen_A_Marsh‌ Only the bottom one is variable, min is 7 characters (FACTORY) and maximum is 21(ASSISTANT CONSULTANT) characters. The sample template is Dropbox - demo.psd

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 23, 2015 Dec 23, 2015

Copy link to clipboard

Copied

I’ll look into it later today rajeshu6497424, I am downloading the template now…

EDIT: To confirm, with 7000 variables, there is only a range between 7 and 21 characters for the variable text? I would have expected more variation?

P.S. If you save your template with a black vector fill layer instead of pixels and save the psd without maximize compatibility, the file size is only 1.1mb instead of 46.4mb!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 23, 2015 Dec 23, 2015

Copy link to clipboard

Copied

Thanks Stephen_A_Marsh‌ as I am new to PS I dont know much abt it. I dont know the options to choose while saving them for min size.

Regarding the 7000 count, I am still looking at them. As you see there are layers like Line1, Line2 so I may add another one also Line3. Basically each line will have these variations.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 23, 2015 Dec 23, 2015

Copy link to clipboard

Copied

Pixel/raster data will generally create a larger file than vector data, however in this case it is not a great contributor to the file size due to the lossless compression used in PSD format files. So rather than a layer filled with black pixels, I used a solid fill layer set to black:

solid-colour-adjustment-layer.png

When saving a PSD, one can elect to embedd a flattened copy of the layered file, which bloats the file size. In this case for a working layered file used for a variable data project, I see no great need to maximize compatibility which means that the working file would only be 1.1mb instead of 46.4mb:

maximize.png

I thought/hoped that the template provided was final, so I was hoping to provide you with a fully functional action and script to complete your task. As you may have more than one variable layer I will have to just work with what is currently available and show you the concept, you will then need to modify the action provided to work with your other layers (which I was hoping to avoid as you are new to Photoshop).

EDIT: I am not sure if you really need 16 Bits/Channel data for this project (considering benefits vs. disadvantages), dropping down to 8 Bits/Channel would make for smaller file sizes again.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 23, 2015 Dec 23, 2015

Copy link to clipboard

Copied

Stephen_A_Marsh‌ I changed the solid color as mentioned but was not able to find the compatibility dialog box while saving the file so still struggling there.

Regarding the number of variables it will be at most 3 but will learn from the first one. Since these are for tshirt print thats why I choose 16bit.

The 2 files are exactly what I am looking for

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 24, 2015 Dec 24, 2015

Copy link to clipboard

Copied

You would probably need to perform a “save as” to see that maximum compatibility message again as once it is “on” it is remembered by future saves. This can also be changed via Prefernces/File Handling/File Compatibility/Maximize….(Ask/Always/Never).

I have changed your text layers to use “centred” aligned text, not left and then aligned the text objects to the centre of the canvas. This is because the script that resizes to a preset pixel dimension will resize from the centre of the targeted layer. You will hopefully see what I mean when you compare the template that I will shortly upload to your original template.

At the moment, all of your artwork could potentially benefit from being produced via text/vectors, so I would also recommend creating the yellow bar out of a vector shape layer using the vector rectangle tool (U):

vector-shape-layer.png

I am 100% certain that the advantages of working in 8 bit/channel for this project would far outweigh any perceived “losses”. In other words, I personally can’t see any benefit to using 16 bpc data for such a variable data project that is basically text/vector based. The benefit would be that the 8 bpc file held in RAM would be half the size of the 16 bpc version. This may or may not make a difference when batch producing your 7000 exports to PSD. My opinion is that you may potentially be better served at final output by having a document set to 600 ppi + 8 bpc rather than 300 ppi + 16 bpc (however this would create an 88Mb file, as opposed to the 44Mb or 22Mb versions being discussed). Anyway, my action and script has been created around the file’s current pixel dimensions based on the 300 ppi.

I will shortly upload a script and action set to my DropBox, as well as a revised PSD template etc.

actions.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 24, 2015 Dec 24, 2015

Copy link to clipboard

Copied

Here is how I setup the File/Automate/Batch (action):

I used a source folder and an output folder, however one could just choose to overwrite the files produced by the dataset rather than duplicating them.

batch-action-setup.png

On my computer, it took around 2 seconds to open/run action/save each file that was originally output by the data set export.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 24, 2015 Dec 24, 2015

Copy link to clipboard

Copied

I have uploaded a .zip archive:

https://www.dropbox.com/s/bejqr2p2g3rdrk2/ps-variable-demo.zip

Contents:

* dataset.csv = simple test data source file

* demo-test.psd = Photoshop file for test export

* Resize layer to 2277px.jsx = Script to resize targeted layer content to 2277px wide

* Variable-Resize-Demo.atn = Action file that references the script with other steps

There are also two folders:

* Export to Datasets = Original export of data sets x2 .psd files

* Action Output = Batch action output resize results x2 .psd files

STEP 1 - INSTALLATION:

1) Install the script in the Photoshop scripts folder (CS6 used as example):

Mac - /Applications/Adobe Photoshop CS6/Presets/Scripts

Win - C:\Program Files\Adobe\Adobe Photoshop CS6\Presets\Scripts

(Exit and restart Photoshop)

Double check that you can see the “Resize layer to 2277px.jsx” script when you go to File/Scripts/

2) Install the action in Photoshop:

Window/Actions/Load Actions… (from the upper right options menu in the action window)

The “Variable-Resize-Demo.atn” file can be loaded from any location, unlike scripts they do not need to be in a specific folder

STEP 2 - EDIT THE ACTION:

1) As the action has the install location of the script on my system, you will need to delete the action step “Scripts” and insert the action into the script using your scripts installed location.

After dragging the ”scripts” action step to the trash icon in the actions window, use the actions window’s options menu to “insert menu item”, then select the file menu/scripts/Resize layer to 2277px

Ensure that the script steps appear in the same order as the image in my previous post.

STEP 3 - TEST THE VARIABLES:

Open the file “demo-test.psd” and go to image/variables/data sets and make sure that it is still linked to the demo “dataset.csv” file and that you can cycle through the two data sets using the data set navigation arrows.

IMPORTANT: Note that I made the text font size smaller in the “Line1” layer, this is critical as the longest variable character line should be smaller in width than the yellow bar “Shape 1”, so that the action can resize the text to the correct width. Also note that the variable text layer is set using “centre” alignment and is centred on the canvas.

STEP 4 - EXPORT DATA SETS:

1) Use File/Export/Data Sets as Files… to export out the data sets to PSD files.

STEP 5 - BATCH ACTION TEST ON THE EXPORTED DATA SET FILES:

1) Setup a File/Automate/Batch similar to the image in my previous post.

If everything is setup correctly, then you should find that the results of the data set export have been resized to match the width of the yellow graphic.

You will need to edit or create separate actions to handle different variable text layers, this sample only targets the specific text layer “Line1”.

Good luck and please post back for advice if you get stuck, you have a lot to learn for a new user of Photoshop, variables and automation via actions/scripts is a bit more advanced than many would first attempt!

expanded-action.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 24, 2015 Dec 24, 2015

Copy link to clipboard

Copied

You could most likely use data driver graphics then run a script to process all layer ant all the are text layers resize the text layers to the documents width and center the text layer over the horizontal center.  Text would fill the width the text size will vary by content. If what you want is text to fill the width and you are not concerned about character size.   Your content number of characters are constrain to your range in the CSV file column.

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 24, 2015 Dec 24, 2015

Copy link to clipboard

Copied

That sounds great JJMack, now, can you please repeat that in English? Just kidding, seriously though – I don’t know what you are talking about! What is “data driver graphics”? What script? My hack gets the job done, however I am interested if there is a more elegant way of doing this…

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 24, 2015 Dec 24, 2015

Copy link to clipboard

Copied

Stephen_A_Marsh wrote:

I don’t know what you are talking about! What is “data driver graphics”? What script?

Data driven graphics is a Photoshop feature.  You make template PSD layers variables and create CSV file to replace the variable layers using Photoshop Data Driven Graphics feature.

Data Driven Graphics is what the thread started our with????

Creating data-driven graphics in Photoshop

Photoshop Scripting is programming Photoshop Automation.  Much more powerful then actions. Scripts can use logic and use document information it its calculations.  Scripts can easily handle varying sizes using layer attributes to know type and size.  Actions can not use logic except for a short list of conditions. Actions can use Plug-in and Photoshop scripts  for additional function that need logic.  Its hard to deal with varying sizes in an action. Actions also need to know what they are processing and the document they are processing must have the format the action was created for. If you  use the wrong template and action will most likely fail for the document will not be like the action was designed to process.

Scripting is the main subject in this forum.

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 24, 2015 Dec 24, 2015

Copy link to clipboard

Copied

JJMack I feel that I am lost in translation… :]

When you mentioned “data drive graphics” I did not think that you were talking about the Adobe Marketing Department slogan “Data Driven Graphics”, I thought that you had some special solution to offer. I would have hoped that my last 10+ posts would have shown that I understand what variables, actions and scripts are. I was hoping that you had a specific solution to offer that would help in the automated “hands free” production of 7000 variables.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 24, 2015 Dec 24, 2015

Copy link to clipboard

Copied

Slogan now you lost me??  I see nothing in your appends that seem to be addressing variable data that chang text layers inserting his data. So yes you lost me in translation. I see you write about illustrator and third party software not about Photoshop Data driver graphic.

His template looks like a Poster that has some  number of text lines a list. Each list item being a single line text layer. While Data driven graphics may be able to change the text in the variable text layer with his 7000 variable items it may not have a feature to make each text layer canvas width.  In that case one could populate the 7000 text layer  using data driven graphic then batch the populated PSD files with a relatively simple script one could write to process all layers in the PSD files and resize all text layers to be canvas width.

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 24, 2015 Dec 24, 2015

Copy link to clipboard

Copied

Hi JJMack, it is all explained in my posts and instructions, in my screen captures, in the downloadable archive containing action, script and before/after sample files.


I don’t know how much clearer I can make this?

The data sets are exported with “short” lines. A batch action that references a script is then run on the exported data sets to resize the “short” text lines into the required line length (in pixels, not fixed % which is why a script is required). This is double handling, however it is beyond my abilities to do all of this in a “single step” (I am not sure if this can be done in a single step, as variables are “latent” until exported).

The end product is T-Shirts if you read further into the thread.

The topic thread has long past the generic answer of “you need a script”. We have a script and a workflow that works. The question is, is there a better way to do this and can somebody supply a workable solution to help Rajesh (not just theory)?

If you are interested in helping Rajesh, I would sincerely ask you to read the topic thread in full and to take a look at the fully functional automated solution that I posted.

P.S. Merry Christmas from Australia!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines