
Stephen Marsh
Community Expert
Stephen Marsh
Community Expert
Activity
Jan 18, 2016
07:31 PM
How robust and or how long would one expect a Flash based solution to be viable for? I would be concerned that a lot of work could go into this, only to find that Adobe drop support for it tomorrow in favour of another technology.
... View more
Jan 12, 2016
03:10 AM
More info is ideally required, or better yet, a link to sample of the PDF.
... View more
Jan 12, 2016
03:07 AM
What was the source file/program that created the document? It is generally best to re-create the PDF from the source file/s. There are Acrobat Pro Preflight Profiles or Single Checks for image resolution that can be run before saving as PDF/X and then again afterwards.
... View more
Jan 11, 2016
08:06 PM
Another option could be to use a dedicated tool/service, which has better time capturing that is not as rich in other areas: https://www.openhour.com/features/#profeatures
... View more
Jan 03, 2016
04:46 AM
Great Stuff, thanks! I never had any feedback on whether my find solution excluding the keyword “Adobe Photoshop Camera Raw” worked outside of CS6, so it is good to have another method.
... View more
Jan 03, 2016
02:09 AM
An old thread, but hey… I would simply do this via an action (because I can’t script, however does one really need a script?), then batch the action on all afflicted files. The colour swap could be done by recording a mode change to multichannel mode, moving the channel order around, then changing back to RGB mode and assigning sRGB… However I would probably just use a channel mixer move, B=R and R=B, then assign sRGB. Channel Mixer Preset Kind: Custom Output Red: is a mixture of Blue: 100% Output Green: is a mixture of Green: 100% Output Blue: is a mixture of Red: 100% I guess another option would be to create a custom sRGB profile and swap the channel order around so that it is BGR, then convert to sRGB – however this would mess with the files numbers/values when the previous two methods would not. EDIT: If this is needed to fit into a larger scripting workflow, you could just insert the moves for the channel mixer and or assign profile steps. If one is not after elegant code, the ScriptListener plug-in would do the job of recording the moves.
... View more
Jan 03, 2016
01:51 AM
Thanks again SuperMerlin, this is exactly what I was looking for and it is within my scripting “skills” to enable/disable existing code if I would like TIFF instead of PSD.
... View more
Jan 02, 2016
11:15 PM
OK, so my Frankenstein’s monster code is below, I have commented out the JPEG options and transplanted some code for saving PSD, however I think that I am going wrong somewhere on line 23? I have tried different combinations of code from the commented lines 02 and 03. I have commented out the original JPEG options for reference (lines 24, 38-46). I am like a bull in a china shop when it comes to code!
// https://forums.adobe.com/thread/2034807
// http://stackoverflow.com/questions/5796764/from-photoshop-actions-to-photoshop-scripting
// https://github.com/joonaspaakko/Photoshop-Auto-Save-PSD-script/blob/master/Auto%20Save%20PSD.jsx
#target photoshop;
app.bringToFront();
main();
function main(){
if(!documents.length) return;
try{
var Path = activeDocument.path;
}catch(err){
alert("You save your document before running this script!");
return;
}
var doc = app.activeDocument;
var now = doc.activeHistoryState;
var Snaps = snapShotList();
var outputFolder = Folder(Path + "/History Snapshots as PSD");
if(!outputFolder.exists) outputFolder.create();
for (var z in Snaps){
revertNamedSnapshot(Snaps );
var saveFile = File(outputFolder + "/" + Snaps .toString().replace(/\./g,'_') + ".psd");
PhotoshopSaveOptions(psdOptions, true);
// SaveForWeb(saveFile,80);
}
doc.activeHistoryState = now;
};
//Save as PSD
var psdOptions = new PhotoshopSaveOptions();
psdOptions.alphaChannels = true;
psdOptions.annotations = true;
psdOptions.embedColorProfile = true;
psdOptions.layers = true;
psdOptions.spotColors = true;
// function SaveForWeb(saveFile,jpegQuality) {
// var sfwOptions = new ExportOptionsSaveForWeb();
// sfwOptions.format = SaveDocumentType.JPEG;
// sfwOptions.includeProfile = false;
// sfwOptions.interlaced = 0;
// sfwOptions.optimized = true;
// sfwOptions.quality = jpegQuality;
// activeDocument.exportDocument(saveFile, ExportType.SAVEFORWEB, sfwOptions);
// };
function snapShotList(){
var doc = app.activeDocument;
var hs = doc.historyStates;
var now = doc.activeHistoryState;
var Name = new Array();
for(var a =0;a <hs.length;a++){
if(hs.snapshot) {
doc.activeHistoryState = hs;
Name.push(hs.name);
}
}
doc.activeHistoryState = now;
return Name;
};
function revertNamedSnapshot(name) {
var desc = new ActionDescriptor();
var ref = new ActionReference();
ref.putName( charIDToTypeID('SnpS'), name );
desc.putReference( charIDToTypeID('null'), ref );
executeAction( charIDToTypeID('slct'), desc, DialogModes.NO );
};
... View more
Jan 02, 2016
04:10 PM
Thank you SuperMerlin, that is fantastic – greatly appreciated! I should be able to edit this script to use a lossless format like TIFF or PSD. I’ll post back if I run into problems. JJMack, I hear what you are saying and as I have been using Photoshop since v2.0 I do take a lot of past learning for granted. That being said, I am pretty much a GUI user, that is how I think. Learning text based languages are simply just not as easy for me. I have tried, I struggle with GREP/RegEx!
... View more
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