
Stephen Marsh
Community Expert
Stephen Marsh
Community Expert
Activity
Jan 01, 2016
09:24 PM
It would be just as useful to provide me with a foreign language dictionary and grammar guide... Hmmm, you just did! :] Coding comes easy to some. I am not one of those, which is why I was looking for an existing script, there are many out there.
... View more
Jan 01, 2016
09:07 PM
Thanks JJMack, I can't script so I can't do anything with your snippet. I was hoping that somebody knew of a script for this, I presumed that this would be a common enough task.
... View more
Dec 31, 2015
06:18 AM
Also found this: Photoshop: How do I create a conditional if/else action?
... View more
Dec 30, 2015
08:19 PM
Later versions of Photoshop support conditional actions, however I am on CS6 so I don’t know if aspect ratio is a conditional variable or not. I am not sure if the following would help as it only has width or height, not ratio: Siva's Photoshop Conditional Action: Siva's Photoshop Conditional Action If you had metadata such as a keyword applied then the conditional script could use the metadata.
... View more
Dec 30, 2015
04:07 PM
Glad to be of help, do post back if you get stuck. Although actions are the simplest form of automation, they are not always easy.
... View more
Community Expert
in Photoshop ecosystem Discussions
Dec 28, 2015
03:46 PM
1 Upvote
Dec 28, 2015
03:46 PM
1 Upvote
For “industrial” quantities, I would suggest that you look into ImageMagick or GraphicsMagick. http://www.imagemagick.org/ http://www.graphicsmagick.org/ EDIT: If you are on a Mac, simply use a ColorSync AppleScript or Automator to process the images from one colour space to another and to remove the ICC tag.
... View more
Community Expert
in Photoshop ecosystem Discussions
Dec 24, 2015
02:40 PM
1 Upvote
Dec 24, 2015
02:40 PM
1 Upvote
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!
... View more
Dec 24, 2015
01:10 PM
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.
... View more
Dec 24, 2015
01:00 PM
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 script into the action 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.
After deleting the script step recorded on my machine, you need to then use the menu on the top right of the action palette and *insert menu item*, then go to the file menu, scripts, resize layer to 2277px and you should then have the script inserted into the action using your installed script path. Ensure that you drag the script to the appropriate position in the action steps.
... View more
Dec 24, 2015
06:11 AM
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…
... View more
Dec 24, 2015
05:59 AM
As an alternative solution, the operating system could monitor a watched folder and send an email when a specific trigger is tripped, such as the existence of a file named “filename_18000.jpg” etc.
... View more
Community Expert
in Photoshop ecosystem Discussions
Dec 24, 2015
03:44 AM
1 Upvote
Dec 24, 2015
03:44 AM
1 Upvote
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!
... View more
Dec 24, 2015
01:42 AM
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. On my computer, it took around 2 seconds to open/run action/save each file that was originally output by the data set export.
... View more
Dec 24, 2015
12:19 AM
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): 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.
... View more
Community Expert
in Photoshop ecosystem Discussions
Dec 23, 2015
07:41 PM
1 Upvote
Dec 23, 2015
07:41 PM
1 Upvote
Is this what you are looking for? I have batch automated the resizing of the text width and positioning of the text relative to the yellow bar graphic… I am getting the feeling that there are more unknowns/undisclosed issues than I originally expected! :] I am hoping that you don’t wish to distort the text of the 21 character version to fit the same height/space as the 7 character version…
... View more
Community Expert
in Photoshop ecosystem Discussions
Dec 23, 2015
06:53 PM
1 Upvote
Dec 23, 2015
06:53 PM
1 Upvote
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: 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: 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.
... View more
Dec 23, 2015
04:02 PM
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!
... View more
Community Expert
in Photoshop ecosystem Discussions
Dec 23, 2015
01:56 PM
1 Upvote
Dec 23, 2015
01:56 PM
1 Upvote
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.
... View more
Dec 23, 2015
02:34 AM
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.
... View more
Dec 23, 2015
01:25 AM
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…
... View more
Dec 23, 2015
01:04 AM
2 Upvotes
Glad to be of some small help Karthi, credit goes to the script/extension/plug-in authors. EDIT: Keep in mind that *all* compound paths will be selected, which could include other paths than what you would consider an outlined stroke (such as outlined text).
... View more
Dec 22, 2015
01:24 PM
1 Upvote
From selection menu we can't separate the other fills with compound path objects i hope. As I mentioned, one has to look outside of native Illustrator features to select by compound path. Links to some great selection add-ons can be found here: prepression.blogspot.com.au/2015/01/illustrator-selecting-similar-objects.html
... View more
Community Expert
in Photoshop ecosystem Discussions
Dec 21, 2015
07:36 PM
1 Upvote
Dec 21, 2015
07:36 PM
1 Upvote
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 | LinkedIn 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).
... View more
Dec 21, 2015
03:22 PM
One could also just use the “find” command in Adobe Bridge to filter all of the filenames that contain or starts with WD111, then select all and manually type in WD111 in the Keyword metadata field.
... View more
Dec 21, 2015
02:50 PM
An old thread, however still worthy of a reply: The following Adobe Bridge script will copy the filename without extension to the IPTC metadata Description field: Re: How to Batch copy filename to its metadata Title or Add filename to description So in theory, all you need to do is swap over the Description field to the Keywords field. It may not be “that easy”, however I am hoping that it is! (I can’t script, so I am just guessing) EDIT: Try this thread instead: Copy Filename to IPTC Keywords
... View more
Dec 21, 2015
02:14 PM
There are scripts to select objects such as compound paths – however all compound paths would be selected which is why the good folk here were asking if there is something unique about these particular compound paths that can be used as a “hook”. If there are no other compound paths in your files, then a simple script to select only compound paths may do the trick. That being said, do you wish to stroke the compound path, or do you wish to turn the “double” compound path back into a “single” path with a stroke that is the same thickness as the original compound item width?
... View more
Dec 20, 2015
11:27 PM
Now I just need to assign a shortcut to it. Do I need to change my jsx file to an atn one or is there another solution ? If you have the script installed and available in the File/Scripts menu, then all you need to do is go to the Edit/Keyboard Shortcuts menu and add a custom shortcut under Application Menus/File/Scripts against your installed script. There is no need to insert the script into an action and setup keyboard shortcuts against the action, however that is also an option.
... View more
Community Expert
in Photoshop ecosystem Discussions
Dec 20, 2015
11:21 PM
1 Upvote
Dec 20, 2015
11:21 PM
1 Upvote
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?
... View more
Dec 20, 2015
06:16 AM
JJMack was informing you how actions work, not how you wished they work – which are two different things. As fantastic as Photoshop actions are, they still have limitations. Scripts are more flexible, however not as accessible to non-coders as actions. For example, the previous script in post #4 errors for me. You can insert a script into an action, then invoke the playback of the action from a keyboard shortcut – or you can setup a direct keyboard shortcut on the script without referencing it in an action. A similar script to the one that you are looking for can be found here: https://forums.adobe.com/message/4453915#4453915
... View more
Dec 20, 2015
04:36 AM
Actions are not the same thing as Scripts. Scripts can be inserted into actions, however I doubt that is what you wish to do in this case. Listen to JJMack’s advice on actions.
... View more