Script - Export Layers to Individual PDF's?

Is there a script to export each InDesign layer to its own PDF? I posted about this in the general InDesign forum, and was referred here. Someone found a Mac version, but I need something for Windows XP, CS3. Thank you!

Hi,
telling a story:
hide all layers, start loop in all of them, show one by one, export doc
writing a script:
myDoc = app.documents[0];
myFolder = myDoc.filePath + "/";                              // assuming doc isn't untitled
myDoc.layers.everyItem().visible = false;
for (k=0; k<myDoc.layers.length; k++) {
     file = new File(myFolder + myDoc.name + "_" + myDoc.layers[k].name + ",pdf");
     myDoc.layers[k].visible = true;
     doc.exportFile(ExportFormat.pdfType, file, false, app.pdfExportPresets[0]);         // choose preset id
     myDoc.layers[k].visible = false;
myDoc.layers.everyItem().visible = true;
pdfs should be in doc folder,
hope...

Similar Messages

  • How do I export Layers to individual Files?

    In Photoshop CS, there is a script that exports Layers to individual Files.
    Go to File>Scripts>Export Layers to Files.

    Hi Arien,
    If your animation program supports paste open it and select each layer,
    Select>All, Edit>Copy and paste that layer into that program.
    If your animation program doesn't support paste you can paste each layer
    into a New file and save it as a *.png image.
    Alex .,

  • Scripts / Export Layers to Files / Include Background Layer

    Running the script Export Layers to files.
    Need to keep one layer on that is applied to all the layers (I have a stroke on the top layer I would like applied to all the images that are saved out.)
    How do I modify the script for this?
    Thanks!
    Ken

    Adapting that Script might be somewhat difficult as it is pretty bulky.
    But if its always the topmost layer thats supposed to stay visible and You know which format You want to save the resulting files to beforehand something much smaller may suffice.
    You might try this, but I havent tested it extensively:
    #target photoshop;
    var myDocument = app.activeDocument;
    // get the name and location;
    var docName = myDocument.name;
    var basename = docName.match(/(.*)\.[^\.]+$/)[1];
    var docPath = myDocument.path;
    // get the artlayers and remove the topmost;
    var allArtLayers = collectLayers(myDocument);
    var theTopmost = allArtLayers.pop();
    // hide all but the topmost layer;
    for (var n = 0; n < allArtLayers.length; n++ ) {
       allArtLayers[n].visible = false
    for (var m = 0; m < allArtLayers.length; m++ ) {
    // show the layer;
       allArtLayers[m].visible = true;
    // tiff options;
       tifOpts = new TiffSaveOptions();
       tifOpts.embedColorProfile = true;
       tifOpts.imageCompression = TIFFEncoding.TIFFLZW;
       tifOpts.alphaChannels = false;
       tifOpts.byteOrder = ByteOrder.MACOS ;
       tifOpts.layers = true;
    // duplicate the image;
       var thecopy = myDocument.duplicate (thecopy, true);
    // save copy;
       thecopy.saveAs((new File(docPath+"/"+basename+" "+allArtLayers[m].name+".tif")),tifOpts,true);
       thecopy.close(SaveOptions.DONOTSAVECHANGES);
    // hide the layer again;
       allArtLayers[m].visible = false
    //thats it; thanks to xbytor;
    ////// collect all artlayers //////
    function collectLayers (theParent) {
       if (!allArtLayers) {
          var allArtLayers = 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.constructor == ArtLayer) {
             allArtLayers = allArtLayers.concat(theLayer)
          else {
             allArtLayers = allArtLayers.concat(collectLayers(theLayer))
       return allArtLayers

  • How can I get the script Export Layers to Files to export compressed pngs?

    I would love to be able to take advantage of Photoshop's compressed png when using the script Export Layers to Files. I there a way I could modify the script to do this?
    TIA!!!
    ========================
    I found it ... I needed to add a line to the pngSaveOptions (around line #886) ...
                var saveFile = new File(exportInfo.destination + "/" + fileNameBody + ".png");
                pngSaveOptions = new PNGSaveOptions();
                pngSaveOptions.interlaced = false;
                // trying to compress png files
                pngSaveOptions.compression = 9;
                docRef.saveAs(saveFile, pngSaveOptions, true, Extension.LOWERCASE);
                break;
    =========================

    It does. The standalone XML Export was only offered by itself
    in the
    registration incentives. Sorry.
    Nancy Gill
    Adobe Community Expert
    Author: Dreamweaver 8 e-book for the DMX Zone
    Co-Author: Dreamweaver MX: Instant Troubleshooter (August,
    2003)
    Technical Editor: DMX 2004: The Complete Reference, DMX 2004:
    A Beginner''s
    Guide, Mastering Macromedia Contribute
    Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP
    Web Development
    "neilcreagh" <[email protected]> wrote in
    message
    news:f4rsrt$ptf$[email protected]..
    > I've just purchased Dreamweaver CS3 and, after
    registering, the email sent
    > offered me a free gift. I chose the free font. Another
    option is the
    > Dreamweaver XML Export Extension for Spry and I would
    like to purchase
    > this (it
    > stated the value at ?15) but I can't find it anywhere?
    >
    > The interaktonline website says that its functionality
    has been included
    > in
    > the Dreamweaver Developer Toolbox - but does this mean
    that I have to
    > purchase
    > the entire toolbox?
    >

  • Exporting Layers to individual files

    Simple question. Is it possiple to export layers to indivual files in Photoshop elements 8?
    This issue is driving up the wall. So far I have been unable to locate a singl, am I ,issing something?
    discussion or tutorial on the subject.
    Any input will be most appreciated

    If you have pse 6 through pse 10, then this export layers to files script should work:
    https://acrobat.com/#d=blJVJ4ZFfR7dRg24q-mBbQ
    To install:
    1. download and unzip
    2. right click on the script and choose copy
    3. navigate to the elements scripts folder
    example path: (windows and sustitute your version for 8.0)
    C:\Program Files (x86)\Adobe\Photoshop Elements 8.0\Presets\Scripts
    4. right click in a blank area and choose paste
    5. start or restart elements and export layers to files should be listed under Files>Automation Tools

  • How do I export layers as individual files?

    I have an animation with 24 bit colors and alpha transparency. Each frame is a layer in my project and I wish to export each individual layer as a PNG so I can create an animation in a different tool. Is there a way to do this?

    Hi Arien,
    If your animation program supports paste open it and select each layer,
    Select>All, Edit>Copy and paste that layer into that program.
    If your animation program doesn't support paste you can paste each layer
    into a New file and save it as a *.png image.
    Alex .,

  • Export layers to file script error in Photoshop CC

    I need help with an issue.  I also asked this in the general forum but was refered here to ask all of you amazingly talented scripting geniuses.
    My issue is with the Export Layers script that comes installed with Photoshop.  I am running Windows 7 64bit - using photoshop version: creative cloud 64bit.
    When i try to run File>Scripts> Export Layers to files I get this error
    Error 22: Windows does not have a constructor. Line: 239 -> dlgMain = new Window ("dialog", strTitle); 
    When i load Photoshop Creative Cloud 32 bit i get a different error message when trying to run the script. 
    Error - 33: Internal error . line:395 ->  dligMain.pnlFileType.pnlOptions.grpJPGOptions = ...
    I can't run the image processor script I also get an error with that. 
    This  is an issue for me as i use this script on a daily basis.  It worked in PSCS6  
    I upgraded, i dont' want to have to load an older  version of photoshop to do this task  
    Thanks
    Carrie 

    I'm afraid no ideas...
    These kind of errors appeared to me too (Mac, CS5/CS6). If memory doesn't fail me - and there were tricks to be applied in your own scripts to workaround the problem - the issue was due to a stack of commands involving Document change (say: switch from document A to document B and then activate the layer X): what happened was that the script's call "activate the layer X" was too quick - i.e. it happened before Photoshop could actually perform the switch. As a result the "activate the Layer X" was executed on the A document instead of the B document and the whole thing broke.
    Mind you, it's just an example I've made up.
    Tab view for some reason worked as expected.
    I would suggest to try with no other documents open, resetting the preferences (launch PS pressing CRTL+ALT+SHIFT) - but this is quite generic, as a recommendation.
    Davide

  • CS5 Photoshop Scripts Error: Export Layers to Files...

    Hey Folks,
    I'm banging my head against the wall trying to figure out why I can't use the script: Export Layers to Files...
    I am recieving this error messages in my attempt:
    I have ran the Adobe updater and made sure everything is current.
    I restarted my magic toster twice after the update.
    I even tried a basic psd with 2 layers in an effort to determine if it was the working psd file itself... No luck.
    So I am convinced now that there may be a bug.
    Does anyone have any insight or workarounds for this solution?
    Thank you all in advance.
    John

    Jeffrey,
    Thanks for your response.
    It's the original script that shipped stock with CS5.
    Get this...
    I switched from 32 bit mode back into 64 and restarted the program.
    Opened my psd and tried again...
    No error this time, but this is what I get:
    Nothing!
    So racked on this one dude...

  • Export Layers To Files - Renaming Script PS CC

    On all previous versions of Photoshop, including CS6 (before the recent update to PS CC), I was able to use the ExtendScript Toolkit to edit the PS preset script that adds naming/numbering sequences to files when running the "Export Layers to Files" script. For PS CS 6, I edited the script to remove the automatic naming/numbering of exported layers by editing the following in ExtendScript Toolkit:
    In ExtendScript Toolkit CS6 open the Export Layers to Files.jsx (applications/adobe photoshop cs6/presets/scripts/export layers to files.jsx)
    on line 1030:
    change:
    fileNameBody += "_" + zeroSuppress(i, 4);
    to:
    //fileNameBody += "_" + zeroSuppress(i, 4);
    on line 1031:
    change:
    fileNameBody += "_" + layerName;
    to:
    fileNameBody += "" + layerName;
    This solved my problem and allowed PS to export my layers to files, keeping the layer name as the filename without adding any naming or numbering sequences to the filename. However with the recent release of Photoshop CC, the script change above does not work. It looks as though there are some new lines of scripting with Photoshop CC and I would love to know what else I need to change to prevent PS CC from renaming files when using the Export Layers to File script. Without the ability to change this, I will have to go through numerous steps in bath rename in Bridge, which when working with 100's of files with different naming structures would totally slow down my workflow. Any ideas on what to update in the Photoshop CC Script to fix this? Thanks so very much!

    Welcome to the forum.
    You would maybe be better served asking in the PhotoShop Scripting Forum
    http://forums.adobe.com/community/photoshop/photoshop_scripting
    Or even here:
    http://www.ps-scripts.com/bb/index.php
    In general, I think there were changes across the board with the scripting in CC that broke things in PS, IL, ID, etc. I have seen it in both the Illustrator and InDesign scripting forums, previous scripts no longer work as before or are broken, features removed, etc. Sad but true.

  • Weird numbers when Exporting Layers to Files / Layer Comps to Files

    Hi there,
    File > Scripts > Export Layers to Files ...
    File > Scripts >  Layer Comps to Files ...
    File > Scripts >  Layer Comps to PDF ...
    File > Scripts >  Layer Comps to WPG ...
    After I use each of these Scripts , even if I specify "File Name Prefix:", in the name of the exported files I see strange nomeration. This is pretty confusing , because each time I have to rename the files to remove these numbers.
    Adobe please remove the numbers prefix that these Scipts adds..
    Thanks!
    Regards,
    SK

    Hi. You’ve posted your question in a forum that is for beginners trying to learn the basics of Photoshop.  I'm moving your question to the Photoshop General Discussion forum for specialized attention to your situation.

  • Error in Export Layers to Files (PSCS 5)

    When I try Scripts-export layers to files in PS CS5, I get the message "Error 519: Server Interface error (No component returned from CreateWidget- line 250)".
    This script used to work well. Anybody any idea what to do, cause I ain't got a clue (-:).
    Thanks in advance!
    Rob

    Hi Rob
    Any chance you have a Windows computer/folder mounted on your computer. There's an odd behavior that happens with a couple scripts; Export to layers, Image Processor and Dr Browns 1-2-3 scripts, when a particular Windows environment is logged into your computer. Also, Bridge AOM is effected.
    see below if you do have a Windows computer mounted:
    http://forums.adobe.com/thread/707155?tstart=0
    http://forums.adobe.com/thread/708719?tstart=0
    no workaround but to unmount the Windows computer when running the script. ( you will also need to restart PS)
    good luck

  • Automator Workflow to export Numbers documents in PDF format

    Does anyone know of any automator workflow to export Numbers documents in PDF format? I tried this program: Convert to PDF 1.2
    http://www.apple.com/downloads/macosx/automator/converttopdf_mauriziominelli.htm l
    But it gives an error.

    Reading carefully is often useful.
    The description of the tool which you tried clearly states :
    *About Convert to PDF*
    *_Convert all of your text files to PDF_. This action uses the underlying cups printing system ability to convert files, it’s a simple front end to the command line tool cupsfilter.*
    As far as I know, but maybe you don't, *_a Numbers document isn't a text file._*
    I already posted a script exporting Numbers documents as PDF.
    Here is an enhanced version which apply only to Numbers '09 (or maybe higher) :
    --[SCRIPT save2Numbers&PDF.app]
    Enregistrer le script en tant que Script : save2Numbers&PDF.scpt
    déplacer le fichier créé dans le dossier
    <VolumeDeDémarrage>:Users:<votreCompte>:Library:Scripts:Applications:Numbers:
    Il vous faudra peut-être créer le dossier Numbers et peut-être même le dossier Applications.
    aller au menu Scripts , choisir Numbers puis choisir save2Numbers&PDF
    Le script enregistre le document au format natif de Numbers
    et l'enregistre dans un fichier PDF.
    S'il existe déjà un PDF homonyme, il est renommé en lui ajoutant une chaîne
    construite sur sa date de modification.
    --=====
    L'aide du Finder explique:
    L'Utilitaire AppleScript permet d'activer le Menu des scripts :
    Ouvrez l'Utilitaire AppleScript situé dans le dossier Applications/AppleScript.
    Cochez la case "Afficher le menu des scripts dans la barre de menus".
    +++++++
    Save the script
    as a Script: save2Numbers&PDF.scpt
    Move the newly created file into the folder:
    <startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Numbers:
    Maybe you would have to create the folder Numbers and even the folder Applications by yourself.
    go to the Scripts Menu, choose Numbers, then choose save2Numbers&PDF
    The script saves the document in the native Numbers format and saves it in a .pdf file
    If such a .pdf already exists, it is renamed with a stamp matching its modification date.
    --=====
    The Finder's Help explains:
    To make the Script menu appear:
    Open the AppleScript utility located in Applications/AppleScript.
    Select the "Show Script Menu in menu bar" checkbox
    --=====
    Yvan KOENIG (VALLAURIS, France)
    modifié 2010/08/17
    property closeIt : true
    (* true = closes the saved document
    false = doesn't close it *)
    property theApp : "Numbers"
    property theExt : "numbers"
    --=====
    on run
    tell application theApp
    activate
    set le_document to front document
    if modified of le_document then save le_document
    delay 0.2
    set thePath to path of document 1
    end tell -- theapp
    set {xPath, xExt} to my saveAs(thePath)
    if closeIt then tell application theApp to close document 1 saving no
    end run
    --=====
    on saveAs(p)
    local extension_export, type_export, nomde_loriginal, dossierde_loriginal, nomde_lexport, cheminde_lexport
    set {extension_export, type_export} to {"pdf", "LSDocumentTypePDF"}
    set {nomde_loriginal, dossierde_loriginal} to my quelNomEtDossier(p)
    if nomde_loriginal ends with theExt then
    • replace the original extension by the xExt one *)
    set nomde_lexport to (text 1 thru -(1 + (length of theExt)) of nomde_loriginal) & extension_export
    else
    • add the xExt extension name *)
    set nomde_lexport to nomde_loriginal & "." & extension_export
    end if
    set cheminde_lexport to dossierde_loriginal & nomde_lexport
    • CAUTION, When saving, Numbers doesn't take care of an existing document.
    It replaces it by the new one. *)
    tell application "System Events"
    if exists (file cheminde_lexport) then
    Playing safety, we rename the existing file by inserting a modificationdatetime stamp *)
    set name of file cheminde_lexport to (text 1 thru -(2 + (length of extension_export)) of nomde_lexport) & my horoDateur(modification date of file cheminde_lexport) & "." & extension_export
    end if
    end tell -- System Events
    • save as type_export document *)
    tell application "Numbers" to save document nomde_loriginal as type_export in cheminde_lexport
    return {cheminde_lexport, extension_export}
    end saveAs
    -- =====
    on quelNomEtDossier(f)
    local nom, dossier
    tell application "System Events" to tell file (f as Unicode text)
    set nom to name (* Unicode text *)
    set dossier to path of container (* Unicode HFS path *)
    end tell -- to System Events
    return {nom, dossier}
    end quelNomEtDossier
    --=====
    • Build a stamp from the modification date_time
    on horoDateur(datedemodification)
    local les_secondes
    set les_secondes to time of datedemodification
    return ("_" & year of datedemodification & text -2 thru -1 of ("0" & (month of datedemodification as integer)) & text -2 thru -1 of ("0" & day of datedemodification) & "_" & text -2 thru -1 of ("0" & les_secondes div 3600) & text -2 thru -1 of ("0" & (les_secondes mod 3600) div 60) & text -2 thru -1 of ("0" & les_secondes mod 60))
    (* Here, the stamp is "YYYYMMDDhhmmss" *)
    end horoDateur
    --=====
    --[/SCRIPT]
    Yvan KOENIG (VALLAURIS, France) mardi 17 août 2010 18:16:27

  • Export layers to .png files

    Hi,
    I took a .psd file (made by my coworker) and redesigned it. The problem is: he organized his layers so badly...made unecessary clones.
    The design is a landing page for a website, now I want to send it to my webdeveloper but he's a linux guy.
    So on gimp he can't work on my .psd so well because of color formats. He asked me to cut all the images and turn them to .png
    Hence I needed to run File> Script > Export Layers to files once that done I got too many similar .png as you can see (consequences of bad layers organization?)
    Is that bad ? Do I need to delete unwanted/similar images to make my web dev work easier?
    Last thing I saw that -in the export layers to files panel properties- transparency and trim boxes was checked and I set it to PNG24
    Is it the right thing to do?
    Thanks

    That would be up to your web dev's needs, I guess. Since these apper to be a background image for the whole page, removing the redundant ones would only be logical.
    Mylenium

  • Export Layers as Files - Please Help on Error Message

    Hi, Not sure if I'm doing the right thing anyway, but I'm trying to export all the layers in one file as separate JPGs. Each layer has its own name and ideally, i would like to save each layer as its layer name.
    When I choose the script 'export layers to files' it flashes on each layer and then eventually comes back with the error 'Specified value greater than maximum allowed value'.
    Does anyone have any idea of what this means? I have no real knowledge of scripting, it was just that this option sounded like it would do exactly what I needed!
    Thanks in advance,
    Gill

    Hi and Welcome to the Community!
    With only that limited information (e.g., no organizer app nor version, no version of the Desktop Software, etc.), all I can think to do is provide this:
    KB12268 Synchronization support for BlackBerry Desktop Software for Windows
    Good luck and let us know!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • How to avoid double extension *jpg.tif when exporting layers to files?

    Please help, I checked all the topics related and it seems nobody bothers about this issue.
    When I do a Photomerge of a series of jpg files, Photoshop builds a multilayered file - but preserves in the name of each layer *.jpg 
    When I want now to export layers to files, the Scripting function will do the dumb thing and export each file with the original name - ending in JPG - , plus the extension required by me - for ex tif.
    It does the same if I chose to export as jpg files and puts double extension again < *.JPG.jpg> at the end of each file exported from a layer.
    I looked everywhere and couldn't find a way to solve this behavior, which forces me to do batch renames in Bridge.
    The next program where I need the files (After Effects) doesn't want to import these files with double extensions.
    Has anyone encountered this issue and what can be done to avoid these double extensions at Scripts/Export layers to files?
    Thanks for the answer

    I have just altered my script so that it will remove the extentions if found.
    http://www.scriptsrus.talktalk.net/Layer%20Saver.htm
    Also it would be better to use :-
    var layerName = activeDocument.activeLayer.name.replace(/\....$/,'');
    As this way it doesn't arbitory remove the last four characters, only if it finds a fullstop.

Maybe you are looking for

  • Receipt in recent iTunes update

    My work recently issued me an iPod touch (the only reason I have an Apple product) and I purchased an app for work. I need a receipt to be reimbursed. I made the purchase over 72 hours ago and have not recited an email, and yes, I checked my junk mai

  • Problems with the richTextEditor and quotes

    Hello I'm having problems with quote chars and the richText control's htmlText. When users enter quotes into the richTextEditor control. The quotes breaks the HTML text, meaning it's no longer well formatted. Is there an escape char that I need to us

  • Error while running batch update statement

    Hi We are experiencing the below error while running the batch update statement where in the IN clause have more than 80,000 entries. The IN clause is already handled for max 1000 values so it has multiple or clause like update...where id in (1,2...9

  • XRPM error Message

    hi friends, we have installed xRPM 4.5 in our system and we have assigned the roles like Project managment , Portfolio Management, Design Collabration. Now when we click Portfolio Management tab  we are getting warnings like. *No portfolios exist No

  • Frieght Cost In STO for Intracompany

    Hi , We want a stock transport order to shift material from one plant to other plant within a company and want to book the freight cost  while receiving the same material at receiving plant .The condition tab is deactivated for posting a sto.and  how