Need to export file with different layers selected automatically

I have a file with a background and various text layers.
I want to select each text layer individually and export them to a file, but I don't want to do this manually because it would take a lot of work.
My question is, how would i tell photoshop to export X numbers of files. Where X=number of text boxes.

I still don’t quite follow: Should the resulting files combine one of the text-layers with the lowermost layer or display only one of the layers?
Because I thought Export Layers to Files would do the second.
Anyway, the following might help, You would have to enter Your intended gif-settings in the Script manually though (see »Photoshop CS4 JavaScript Ref.pdf« or ExtendSctipt Toolkit’s Help > Object Model Viewer for the correct nomenclature for the various options).
And You should adjust the naming-procedure to Your liking, I didn’t use the actual layer-names to avoid possibly overly long names.
Paste the following text into a new file in ExtendScript Toolkit (part of Photoshop’s installation) and save it as a jsx-file into Photoshop’s Presets/Scripts-folder.
After restarting Photoshop theScript should be available under File > Scripts and can be assigned a Keyboard Shortcut directly, recorded into an Action or (in CS4) be used in a Configurator-Panel.
// saves gif-copies of the backgoud-layer with one of the other layers visible in the same location as the original file;
// existing files of the same names will be replaced without callback;
// use it at your own risk;
#target photoshop
if (app.documents.length > 0) {
var myDocument = app.activeDocument;
// get the name;
var docName = myDocument.name;
var basename = docName.match(/(.*)\.[^\.]+$/)[1];
//get the location;
var docPath = myDocument.path;
// get all non-layerset-layers;
var theLayers = collectLayers (myDocument);
// gif options;
var gifOpts = new GIFSaveOptions();
gifOpts.colors = 256;
gifOpts.dither = Dither.DIFFUSION;
gifOpts.ditherAmount = 75;
gifOpts.forced = ForcedColors.NONE;
gifOpts.interlaced = false;
gifOpts.matte = MatteType.WHITE;
gifOpts.palette = Palette.LOCALSELECTIVE;
gifOpts.preserveExactColors = true;
gifOpts.transparency = true
// hide all but the background layer;
for (var m = theLayers.length - 1; m > 0; m--) {
theLayers[m].visible = false
// save the copies with one additional layer visible each;
for (var n = theLayers.length - 1; n > 0; n--) {
theLayers[n].visible = true;
var layerName = theLayers[n].name;
// duplicate image before saving to avoid flattening-dialog;
var thecopy = myDocument.duplicate (thecopy, true);
thecopy.saveAs((new File(docPath+"/"+basename+"_"+n+".gif")),gifOpts,true);
thecopy.close(SaveOptions.DONOTSAVECHANGES);
theLayers[n].visible = false
////// function collect all artlayers //////
function collectLayers (theParent) {
if (!allLayers) {
var allLayers = new Array}
else {};
for (var m = theParent.layers.length - 1; m >= 0;m--) {
var theLayer = theParent.layers[m];
// apply the funtion to layersets;
if (theLayer.typename == "ArtLayer") {
allLayers = allLayers.concat(theLayer)
else {
allLayers = allLayers.concat(collectLayers(theLayer))
return allLayers

Similar Messages

  • How to generate a second csv file with different report columns selected?

    Hi. Everybody:
    How to generate a second csv file with different report columns selected?
    The first csv file is easy (report attributes -> report export -> enable CSV output Yes). However, our users demand 2 csv files with different report columns selected to meet their different needs.
    (The users don't want to have one csv file with all report columns included. They just want to get whatever they need directly, no extra columns)
    Thank you for any help!
    MZ

    Hello,
    I'm doing it usually. Typically example would be in the report only the column "FIRST_NAME" and "LAST_NAME" displayed whereas
    in the csv exported with the UTL_FILE the complete address (street, housenumber, additions, zip, town, state ... ) is written, these things are needed e.g. the form letters.
    You do not need another page, just an additional button named e.g. "export_to_csv" on your report page.
    The csv export itself is handled from a plsql procedure "stored procedure" ( I like to have business logic outside of apex) which is invoked by pressing the button "export_to_csv". Of course the stored procedure can handle also parameters
    An example code would be something like
    PROCEDURE srn_brief_mitglieder (
         p_start_mg_nr IN NUMBER,
         p_ende_mg_nr IN NUMBER
    AS
    export_file          UTL_FILE.FILE_TYPE;
    l_line               VARCHAR2(20000);
    l_lfd               NUMBER;
    l_dateiname          VARCHAR2(100);
    l_datum               VARCHAR2(20);
    l_hilfe               VARCHAR2(20);
    CURSOR c1 IS
    SELECT
    MG_NR
    ,TO_CHAR(MG_BEITRITT,'dd.mm.yyyy') AS MG_BEITRITT ,TO_CHAR(MG_AUFNAHME,'dd.mm.yyyy') AS MG_AUFNAHME
    ,MG_ANREDE ,MG_TITEL ,MG_NACHNAME ,MG_VORNAME
    ,MG_STRASSE ,MG_HNR ,MG_ZUSATZ ,MG_PLZ ,MG_ORT
    FROM MITGLIEDER
    WHERE MG_NR >= p_start_mg_nr
    AND MG_NR <= p_ende_mg_nr
    --WHERE ROWNUM < 10
    ORDER BY MG_NR;
    BEGIN
    SELECT TO_CHAR(SYSDATE, 'yyyy_mm_dd' ) INTO l_datum FROM DUAL;
    SELECT TO_CHAR(SYSDATE, 'hh24miss' ) INTO l_hilfe FROM DUAL;
    l_datum := l_datum||'_'||l_hilfe;
    --DBMS_OUTPUT.PUT_LINE ( l_datum);
    l_dateiname := 'SRNBRIEF_MITGLIEDER_'||l_datum||'.CSV';
    --DBMS_OUTPUT.PUT_LINE ( l_dateiname);
    export_file := UTL_FILE.FOPEN('EXPORTDIR', l_dateiname, 'W');
    l_line := '';
    --HEADER
    l_line := '"NR"|"BEITRITT"|"AUFNAHME"|"ANREDE"|"TITEL"|"NACHNAME"|"VORNAME"';
    l_line := l_line||'|"STRASSE"|"HNR"|"ZUSATZ"|"PLZ"|"ORT"';
         UTL_FILE.PUT_LINE(export_file, l_line);
    FOR rec IN c1
    LOOP
         l_line :=  '"'||rec.MG_NR||'"';     
         l_line := l_line||'|"'||rec.MG_BEITRITT||'"|"' ||rec.MG_AUFNAHME||'"';
         l_line := l_line||'|"'||rec.MG_ANREDE||'"|"'||rec.MG_TITEL||'"|"'||rec.MG_NACHNAME||'"|"'||rec.MG_VORNAME||'"';     
         l_line := l_line||'|"'||rec.MG_STRASSE||'"|"'||rec.MG_HNR||'"|"'||rec.MG_ZUSATZ||'"|"'||rec.MG_PLZ||'"|"'||rec.MG_ORT||'"';          
    --     DBMS_OUTPUT.PUT_LINE (l_line);
    -- in datei schreiben
         UTL_FILE.PUT_LINE(export_file, l_line);
    END LOOP;
    UTL_FILE.FCLOSE(export_file);
    END srn_brief_mitglieder;Edited by: wucis on Nov 6, 2011 9:09 AM

  • Printing different/selective files with different copies

    Hi everyone,
    I've been working on finding a solution, on how to print different pdf files with different copies, without opening the pdf-files.
    Task:
    I have a folder, with 25 pdf files
    I want to make a php overview, of the folder
    At the end of each line/file - i would like to add a number for the copies
    In the end, I would like to simply press print - and every document ive added a number/copies to - are being printet...
    I guess I need to use PrintPDF - but does anyone know any pre-made program/function - that could handle the "copies" part...?
    I hope someone can help me out,
    Thanks
    Jan

    Well, i had hoped that the acrobat could open silent - eventhough they've removed that feature in the newer versions.
    Even though the program would open - if the amount of copies was added - and i just hat to press print - it would ease the job alot.

  • How to export file with original filename number suffix, but with more digits

    Is there a way to keep the original filename number suffix, but change the formatting of the number, adding leading zeros for instance?
    When I import photos from my camera I like to rename them, and give them sequential numbers, e.g. "2015-01 Hamburg 1.cr2", "2015-01 Hamburg 2.cr2", "2015-01 Hamburg 10.cr2", .. "2015-01 Hamburg 134.cr2", and so on.
    Normally when I export photos I like to keep the file names exacly as I imported them (except the extension) e.g. 2015-01 Hamburg 1.jpg, "2015-01 Hamburg 2.jpg", .. "2015-01 Hamburg 10.jpg", .. "2015-01 Hamburg 134.jpg".
    But sometimes I would like to export them with leading zeros, typically when adding photos to a web site or blog where there are sort mechanisms that only support simple sort algorithms based on file names, meaning the sort order of my photos with their original file names would become "2015-01 Hamburg 1.jpg, "2015-01 Hamburg 10.jpg", .. "2015-01 Hamburg 134.jpg", "2015-01 Hamburg 2.jpg".
    So I would like the file names to be "2015-01 Hamburg 001.jpg", "2015-01 Hamburg 002.jpg", "2015-01 Hamburg 010.jpg", "2015-01 Hamburg 134.jpg".
    By keeping the original file number suffix I can easily go back to the original file whenever I need to, and the sort order would work even with simple sorting.
    The export Filename Template Editor gives quite advanced support for numbering files when exporting, see attached screenshot. There's support for exporting files with custom file names, and adding sequence, total and image number with padding (up to 9999/####). But those add new numbers, they do not consider the original filename number suffix. If I use the "Image # (001)" for instance, my example above would export as "2015-01 Hamburg 001.jpg", "2015-01 Hamburg 002.jpg", "2015-01 Hamburg 003.jpg", "2015-01 Hamburg 004.jpg", if those were the four photos I wanted to export, making it hard for me to trace them back to the original photo.
    I have found no way of adding such padding on the original file number.
    Does anyone know if this is possible or have suggestions for a workaround?
    It shouldn't be too hard for Adobe to support this I'd imagine.
    export pattern rename files  file_number filename_template_editor

    I do not know if you can do what you explained above, but there is a workaround to this (and a way to avoid having to do it in the future):
    In the Library module, make sure your images are sorted by Capture Date (this will put them in the right order, even with suffixes like 1, 13, etc.)
    Select all images, and then Rename them, using a Custom text followed by a Sequence number. The Custom text in this case should be the original name (such as, 2015-01 Hamburg, as in your example). Make sure the Sequence number is formatted with enough zeroes to include all the numbers in your images.
    In the future, when you rename images during Import, make sure you select the Sequence number format that will include all the needed zeroes, so you don't have to go through this again.

  • SSIS - Import Multiple flat files with different metadata

    Hi ,
    I have set of flat files with different metadata structure, I would like to load them into staging tables. 
    1. ) Can we load the flatfiles into the staging tables with out having multiple data flow task.
    2.) If possible , can we programmatically select the staging table based on the metadata of the flatfile and load them.
    Please advise.
    Thanks
    Thiya

    Nope in SSIS a data flow task needs to have a fixed metadata. So if your file metadata varies then best option would be use OPENROWSET syntax to pull the data and populate into your staging table. You may also use 
    SELECT .. INTO StagingTable ... FROM OPENROWSET (...)
    syntax to create staging table at runtime based on the file metadata
    http://sqlmate.wordpress.com/2012/08/09/use-your-text-csv-files-in-your-queries-via-openrowset/
    If you want to do this in SSIS you need to create data flow dynamically using script task and build the metadata
    see
    http://www.selectsifiso.net/?p=288
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How can i compare two excel files with different no. of records.

    Hi
    I am on to a small project that involves us to compare two excel files. i am able to do it but am struck up at a point. When i compare 2 different .csv files with different no. of lines i am only able to compare upto a point till when the number of lines is same in both the files.
    Eg. if source file has 8 lines and target file has 12 lines. The difference is displayed only till 8 lines and the remaining 4 lines in source lines are not shown.
    Can you help me in displaying those extra 4 lines in source file. I am attaching my code snippet below..
    while (((strLine = br.readLine()) != null) && ((strLine1 = br1.readLine())) != null)
                     String delims = "[;,\t,,,|]";
                    String[] tokens = strLine.split(delims);
                    String[] tokens1 = strLine1.split(delims);
                   if (tokens.length > tokens1.length)
                    for (int i = 0; i < tokens.length; i++) {
                        try {
                            if (!tokens.equals(tokens1[i])) {
    System.out.println(tokens[i] + "<----->" + tokens1[i]);
    out.write(sno + " \t" + lineNo1 + " \t\t" + tokens[i] + "\t\t\t\t" + tokens1[i]);
    out.println();
    sno++;
    } catch (Exception exception)
    out.write(sno + " \t" + lineNo1 + " \t\t" + tokens[i] + "\t\t\t\t" + "");
    out.println();
    Thanks & Regards                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    A CSV file is not an Excel file.
    But apart from that your logic makes no sense.
    If the 2 files are of different sizes the files are different by definition, so further comparison isn't needed, you're done.
    If you want to compare individual records, you need to compare all records from one file with all records from the other, unless the order of records is important in which case your current system might work.
    That system however is overly complicated for comparing CSV files.
    As you assume a single record per line, and if one can assume those records to have identical layout (so no leading or trailing whitespace in or between columns in one file that's not in the other) comparing records is simply a matter of comparing the entire lines.

  • From sap to excel file with different sheets?

    can  i upload   an internal table  from  SAP to single Excel file with different sheets for example like : sheet1, sheet2, sheet3.......sheet10. , but need to upload data from sap to excel worksheets ie. from multiple named tabs in Excel. Is this possible, and if so, please can you help and advise me how?
    thanks
    venkat.
    Edited by: Matt on Feb 16, 2009 2:15 PM  Removed excessive question marks...!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    Hi venkat,
    Yes indeed it is possible to write data from internal table to different excel sheets. Check out SAP's Microsoft OLE functionality.Search on SDN for OLE . Following are some links
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/sample%252bprogram%252bto%252bopen%252bexcel%252bsheet%252busing%252bole
    You can also check out FM ALSM_EXCEL_TO_INTERNAL_TABLE to check how to read different worksheets.
    Using the above two resources you can create a program that can upload data to multiple worksheets in the same workbook.
    Also see this link
    Creating Excel with More than one page
    Edited by: aditya aghor on Feb 16, 2009 1:57 PM
    Edited by: aditya aghor on Feb 16, 2009 2:02 PM

  • Reading fixed length file with different record types

    Hi,
    I need to read a fixed-length file with different record types, but the record identifier is in 31st position and not in 1st position.
    But if I give 31 as position in File adpater wizard, BPEL takes whole 1-31 as identifier.
    How we need to read such files.
    Thanks
    Ravdeep

    hi ,
    u cannot use the default wzard for this
    use some thing like this nxsd:lookAhead="30" nxsd:lookFor="S"have a look at the below link it has some examples
    http://download.oracle.com/docs/cd/B31017_01/integrate.1013/b28994/nfb.htm

  • Creating pdf-file from multiple files with different orientation

    How do I put together two files with different orientation in the page set up so that the lying A4-format is standing up in the new pdf-file?

    lophelia wrote:
    How do I put together two files with different orientation in the page set up so that the lying A4-format is standing up in the new pdf-file?
    First I've underline a Phrase in your Question did you mean underlying A4-format?
    Are both PDF Files created with A4-Format? If yes then:
    Did you shift orientation to Portriat Format for the item(s) that you need, such as a Chart or an excel Document? If so:
    Then when the documents are meged  They should print correctly.

  • SSIS project - read multiple flat files with different formats

    hi all,
    i need to import multiple flat files with different formats into different tables of the sql server database and not able to figure out the best way out in ssis to do so...
    please advise the possible methods in ssis to do so and if possible the process which can be dynamic as file names or columns might change in future.

    Hi AK1987,
    To import flat files with dynamic columns, we can use Script Task inside a Foreach Loop Container to parse the first row of the flat file to get the columns names and save them into a .NET variable, then, we can create “Create Table” script based on this
    variable, and then store the script into a SSIS package variable. After that, we create a staging table based on the package variable, load the flat file data to the staging table. Eventually, we load data from the staging table to the destination table. For
    the detail steps, please walk through the following blog:
    http://www.citagus.com/citagus/blog/importing-from-flat-file-with-dynamic-columns/ 
    Regards,
    Mike Yin
    TechNet Community Support

  • IDoc to File with different file name and data based on the IDoc header dat

    Hi,
    I got a requirement to implement IDOC to file senario.  In this the Converted file should have the file name and file content based on IDoc Header data.  Means If one of the IDoc header field value is
    'A'  - then the file name recieved by reciever system should be 'A.txt' and with the columns A  B  C  D  F.
    'B'  - then the file name recieved by reciever system should be 'B.txt' and with the columns C  D  F.
    In both the case IDoc message type is same.
    Please suggest me what i need to do to achieve this.
    Thanks in Advance. ...
    Regards
    Sri

    Hi,
    As per my requirement, we need to create one file for each IDoc based on IDoc header data. SAP program generates 10 IDocs for each run. All 10 IDoc's message type is same.  Each IDoc has one header record with the file name. Base on the  name in the IDoc header record, file needs to be created with different columns and file name. Means..
    IDoc 01- Header Description contains 'A' - than file will be generated should have name as 'A.txt' and columns 'parent'  'child' 'descripion'.
    IDoc 02- Header Description contains 'B' - than file will be generated should have name as 'B.txt' and columns 'Name' 'Department' 'Description'.
    IDoc 10- Header Description contains 'J' - than file will be generated should have name as 'J.txt' and columns 'Order No'  'Materail' 'Description'.
    Hope this will give more clarity on my requirement. Please let me if you are still not clear on requirement.
    Thanks for your all help..
    Thanks & Regards
    Sreeni

  • Pdf file is too big (7MB). Need a pdf file with max size 4MB. How to minimize the size of a pdf file?

    pdf file is too big (7MB). Need a pdf file with max size 4MB. How to minimize the size of a pdf file?

    The other alternative is the Save As Other>Reduce File Size. The PDF Optimizer gives you more control. You might also use the audit feature in the PDF Optimizer to see where the size problem is coming from. You might find that in the WORD file you can select and image and then go to the FORMAT (pictures) menu and select compress for all of the bitmaps in the file. That will typically use 150 dpi by default that is adequate for most needs.

  • Export file with member alias

    Hi,
    I am exporting the data via DataExport command. I need the export file to contain the alias
    of the members from all dimensions along with the exported data.
    Currently the file contains the members names.
    Is it possible what I need?
    Thanks,
    CM

    CM,
    I don't think you can export aliases using a Dataexport command. You can consider following as an alternative:
    1. Export the Alias table using the following:
    query database 'Sample'.'Basic' list alias_names in alias_table 'default';
    2. Write a report script that outputs all the members (either all or level zero). With a report script you can use OUTALTNAMES to output alias names and OUTALTSELECT to specify which alias table you want to use.
    Hope it helps...
    KosuruS

  • Parsing XML file with different languages (Xerces)

    How do we code or program to an XML file with different
    languages , say english and spanish. WHen we parse such a document with the default locale , the presence of special characters throws errors .For eg when I use xerces and use
    DOMParser parser = new DOMParser();
    try
    // Parse the XML Document
    parser.parse(xmlFile);
    catch (SAXException se)
    se.printStackTrace();
    org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0xfc) was found in the element content of the document.
    System Error:          void org.apache.xerces.framework.XMLParser.parse(org.xml.sax.InputSource)
    So what locale do we set before we parse ?How to handle this problem

    You need an encoding attribute in the xml declaration. If you don't, the parser assumes UTF-8, which are ASCII characters up to 127 - useful (only) for English.
    So, something like this would allow you to use characters above 127, ISO-8859-1 is the encoding used by standard PCs.
    <?xml version="1.0" encoding="ISO-8859-1"?>
    You can find a (offical) list of encodings at:
    http://www.iana.org/assignments/character-sets
    I'm not sure about mixing various encodings. I think you have to resort external parsed entities, which can have their own encoding, but I think you cannot mix encodings in one XML file.
    Good luck.

  • XML file with different format

    Hello
       I have a requirement where the customer needs XML file with different format.  How do I achieve the second format mentioned below instead of first format.
    Normally we create the XML file in the following format:
    - <Entries>
        - <Organization>
            <MemberName>0000000002</MemberName>
            <FullName>BAY GYNECOLOGICAL ASSOCIATES</FullName>
            <OrgId>0000000002</OrgId>
            <OrgType>CUST</OrgType>
       - <AssociatedToOrg>
            <Name>0002</Name>
       - </AssociatedToOrg>
      </Organization>
    Now the customer wants like the following format:
    <Organization MemberName="522_Community_Customer" FullName="522 Community Customer" OrgId="DEA123456" OrgIdType="DEA" >
          <AssociatedToOrg Name="MN"/>
        </Organization>
    Thanks
    Naga

    you can solve it with a XSL mapping. refer to the SDN to know how develop it
    /people/aleksey.popov2/blog/2010/01/26/consuming-webservices-with-tag-in-wsdl-using-xslt
    XSLT Editor for creating xlst mappings
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/190eb190-0201-0010-0ab3-e69f70b6c257
    http://wiki.sdn.sap.com/wiki/display/XI/XSLTMappingSteps
    http://wiki.sdn.sap.com/wiki/display/XI/FileTOFile-UsingXSLTmapping%28forBeginners%29
    http://wiki.sdn.sap.com/wiki/display/Snippets/ConvertflatXMLfiletonestedusing+XSLT
    http://wiki.sdn.sap.com/wiki/display/Java/MultiMappingwithJavaandXSLTmappings
    Edited by: Rodrigo Alejandro Pertierra on Oct 1, 2010 5:26 PM

Maybe you are looking for

  • IPhoto - crash on startup on brand new mac mini

    Hi Just bought a new Mac Mini, ran migration assistant to move all my files over to the new machine.  My iPhoto library is stored on an external hard drive. Every time I launch iPhoto on the new Mac, it immediately crashes.   The first 30-40 lines of

  • Printer prints one page

    When i print a document, it prints only the first page, then i try to print something else and it takes the paper in but doesn't print it. i have to cancel printing, printer returns the blank paper it took in for printing, i turn off my printer then

  • Invalid Public Movie Atom????? HELP!

    I get this message for a home movie from my video camera. "An invalid public movie atom was found in the movie" .... It was my absolute favorite movie and now it just doesn't work! Can anyone help?!?!

  • What's New Live Q&A session

    What's New Live Q&A On the 9th of April you will all be able to participate in a live questions and answers session with the What's New team from Sony. Meaning that you will be able to post questions and get answers just like in a chat session. Feel

  • Hierarchial Queries

    Consider the follwoing data set: Parent Child_Low Child_High 10 200 300 250 400 600 500 700 800 I want the following result set: 10 250 500. I used the folowing query: 'select rownum, level, parent, child_low, child_high from 'TABLE_NAME' connect by