Delete layer

Hi,
is it possible to delete a layer in Acrobat X  (by scripting) ?
I need to delete it because although it is hidden and locked it still shows up in Safari on a Mac.
It takes a lot of hours to go back to InDesign and then Acrobat so that's no option.
I noticed that exporting my pdf to pdf/a removes the locked layer but I'm uncertain if anything else is modified (scripts, document actions etc)
Thanks for any idea pointing me in th eright direction.
Leendert

You cannot delete an OCG (layer) but you can merge it within another. Of course the content of the layer won't be removed by merging it, you'll have to do that manually.

Similar Messages

  • Delete layer mask and not image?

    I create a layer mask on a layer and then I duplicate the layer and I want to delete the layer mask on the duplicate layer, though keep the image part. I select the layer mask and hit delete, though it deletes everything on the layer. How can I keep the image portion of the layer?
    Thanks.

    There are several ways including dragging the layer mask to the trash icon
    at the bottom of the layers panel (pick delete in the dialog that pops up)
    or right clicking on the layer mask and choosing Delete Layer Mask.
    MTSTUNER

  • PS CS5 - Can I automate deleting layer comps?

    I have about 50 files that need their layer comps deleted. I need a way to automate this. Is there a way?
    Thanks

    If your a programmer you may be able to write a Photoshop script to do that. One may have been written. Do a web search for a Photoshop script for deleting layer comps.

  • How to delete layer

    Hi,
    I am writing my own Illustrator scripts.
    How do I write a script to delete layer with ".ARD" name.
    MOhan

    try {
        app.activeDocument.layers.getByName( '.ARD' ).remove();
    } catch (e) {};

  • Brush resize with [ ] deletes layer

    Hello, ALL!
        I have Photoshop CS4 x64 Extended installed on Windows XP x64 and there is a problem with resizing brushes with brackets []. Pressing these buttons leads to active layer deletion. Undo restores layer and resizing work ok for a while, but after some resizes or selection of another layer, the same error occures. I have 11.0.1 update installed. This error is actual for both x32 and x64 versions. Drag resize works fine.
        Did someone face the same issue and have a solution?
    Thanks in advance.
    Best regards / Ilya.

    If you are experiencing problems like that and you are in the laptop make sure to check the keyboard shortcuts and change them to some other key on your keyboard. This tutorial shows you how to:
    http://www.photoshopsupport.com/tutorials/jennifer/keyboard-shortcuts.html
    Let me know if you find this info useful,
    Vicente Tulliano

  • Can't delete layer in photoshop

    Sorry this was the closest forum I could find.
    I added a layer in a photoshop to change the skin tone of a photo slightly. However, I am not happy with it, but when I delete the layer nothing changes. It seems I can delete the layer, but the actual effect remains. Does anyone have any idea how I can delete the layer and remove any effects within the layer at the same time?
    Many thanks

    >You have to make sure and explicitly target the Layer mask in order to affect it.  <br /><br />good point. make sure the mask is selected first. :)<br /><br />>CS3 has buggy targeting behavior<br /><br />really? i don't think i've ever noticed it. <shrug>

  • Can't delete Layer Mask content in PS CS4.

    I am completely baffled with this and am thinking that it's something obvious I am just missing.
    I have a photo open and click on the "Create new fill or adjustments layer" button at the bottom of the Layers panel.
    In CS3 I able to create a layer (say Levels) and apply it, then select the eraser tool and delete sections of that adjustment layer that I did not want revealing an unaltered section of the original photo behind it.
    I can not seem to do this in CS4. I can add the layer and select the eraser tool but it will not delete anything.
    :s Help??
    Thanks.

    >You have to make sure and explicitly target the Layer mask in order to affect it.  <br /><br />good point. make sure the mask is selected first. :)<br /><br />>CS3 has buggy targeting behavior<br /><br />really? i don't think i've ever noticed it. <shrug>

  • Using PSE11 on MacPro, using a commercial digital template text editing stuck in upper case, cannot change to LC in any font; tried deleting layer

    Using PSE11 on MacPro, using a commercial digital template>text editing>stuck in upper case, cannot change to LC in any font; tried deleting layer

    Can you use lower case in other files? If not, then go to the far right of the tool options and click the little four-lined square and choose Reset Tool.

  • How do I delete a layer?

        How do you delete a layer in Adobe touch. Great app, enjoying the new features

    Select the layer you want to delete, hit the little layer icon at the bottom of the column and then click the delete layer button

  • How to I find/delete empty layers? (AS)

    Cleaning house on the files I get with 20 pages and 15 layers! Any input on how I can find and delete the empty layers via Applescript? Otherwise, I am first trying to move every item to one layer, then delete the empty layers. Long process....

    G'day
    You can use non-Applescript solutions to give you hints.
    The above posts point to a property of layers which is also available through Applescript — page items.
    So, maybe try...
    tell application "Adobe InDesign CS4"
        activate
        tell active document
            repeat with x from (count layers) to 1 by -1
                get page items of layer x
                if result is {} then
                    delete layer x
                end if
            end repeat
        end tell
    end tell
    m.

  • How do to I locate & delete empty song titles

    I had to reformat my boot drive, so I upgraded to Win 8.1.  After doing so I used the Add File to Library option to reload my music.  Now I have two problems-
    1. I have hundred of duplicate songs of which the first of each duplicate is empty.  Meaning that it can't find it and asks if I want to locate it.  Since I have a valid version below it I'd want to delete it.  HOW do I get all these empty song titles together in one place to delete?
    2.  I have my old .itl and .xml files.  How do I use them to recover my playlists and RATINGS?
    Many thanks~
    David - VA

    G'day
    You can use non-Applescript solutions to give you hints.
    The above posts point to a property of layers which is also available through Applescript — page items.
    So, maybe try...
    tell application "Adobe InDesign CS4"
        activate
        tell active document
            repeat with x from (count layers) to 1 by -1
                get page items of layer x
                if result is {} then
                    delete layer x
                end if
            end repeat
        end tell
    end tell
    m.

  • Photoshop Rename layer if layer exists?

    I need to rename "Original Layer" to Original Image" When this layer exists. In photoshop
    I've been trying this, but I get this error
    error "Can’t make «class cCLr» 1 of document \"DE00ER515.psd\" of application \"Adobe Ph
    otoshop CS6\" into type boolean." number -1700 from «class cCLr» 1 of document "DE00ER515.psd" to boolean
    tell application "Adobe Photoshop CS6"
              tell current document
                        if (quick mask mode) then delete channel ¬
                                  "Quick Mask"
                        if layer "Original Layer" then ¬
                                  set OriLayer to "Original Layer"
                        set OriLayer to make layer with properties {name:"Original Image"}
                        delete layer "Original Image"
              end tell
    end tell

    Thats still gave an error. The error it first runs into the if layer.....
    this appears to work now like this.
    tell application "Adobe Photoshop CS6"
              tell current document
                        if (quick mask mode) then delete channel ¬
                                  "Quick Mask"
                        if (exists layer "Original Layer") then ¬
                                  tell layer "Original Layer" to set name to "Original Image"
              end tell
    end tell
    Many thanks
    Matt

  • Photoshop deletes the security text while creating a web-gallery

    Hi!
    I unintendedly must have changed some settings in my photoshop 7, as the security text adding while creating a web-gallery doesn't work anymore.
    The steps for creating a web-gallery I go through and finally choose the text to appear on every picture. However, while creating the web-gallery, photoshop automatically first adds the text, then deletes the text layer so that at the end no text appears on the picture, when the web-gallery is ready.
    Can someone help me? I am trying to fix it for the last two weeks and I am sure it's got a very simple reason.
    Thanks a lot in advance!
    Cüneyt

    I am really desperate. Isn'T there anyone to help?`
    Now here are the steps the Photoshop goes while creating a photo gallery. After I'Ve chosen the presettings (image sizes, security settings etc.)
    1) Open
    2) Type Tool (here it types the security text onto the picture)
    3) Rotate
    4) Select Canvas
    5) Align Bottom Edges
    6) Align Right Edges (Because I asked to place the text at the bottom-right corner)
    7) Move (Moves the text to the corner)
    8) Deselect
    9) Delete Layer
    10) Image Size
    For what the hell it makes the step 9, where it deletes the layer, which is practically the text? First it puts the text onto the picture, then it deletes it again.

  • Delete pictures from project screen?

    Hi all. I loaded some pics into a new project to practice with. I have deleted the pics, but they still show on my screen in new project. How do I delete them ? (Samsung Galaxy Tab 10.1) Thanks.   Jack

    You mean in the workspace itself? If so, in the lower right, there is an icon with two diamond-shaped layers stacked. Tap it > Delete Layer. (Make sure the particular layer you want to get rid of is selected.)

  • Script to crop (no delete pixel) snap to ruler guide

    Hi everyone,
    I manually make 1 ruler guide and automatically create 3 ruler guides. These 4 ruler guide form a rectangular.
    Could I have a script that crop my image (no delete pixel) to fit that rectangular formed by the 4 guides .
    Thank you in advance for your help!

    I had a fight scripting it. Strange thing were happing when I was testing. There seems to be a bug in scripting in cs6 -> CC 2014. Re-size layer seems to back up a history step. undoing the last step.  When I was using suspend history states I was loosing the last guide I set or the layer mask from my last test that I deleted the mask was restored and the script would fail.
    http://www.mouseprints.net/old/dpr/FitImageToGuides.jsx
    /* ==========================================================
    // 2014  John J. McAssey (JJMack)
    // ======================================================= */
    // This script is supplied as is. It is provided as freeware.
    // The author accepts no liability for any problems arising from its use.
    /* Help Category note tag menu can be used to place script in automate menu
    <javascriptresource>
    <about>$$$/JavaScripts/FitImageToGuides/About=JJMack's FitImageToGuides .^r^rCopyright 2014 Mouseprints.^r^rFour and only four guides are required</about>
    <category>JJMack's Script</category>
    </javascriptresource>
    // enable double-clicking from Mac Finder or Windows Explorer
    #target photoshop // this command only works in Photoshop CS2 and higher
    // bring application forward for double-click events
    app.bringToFront();
    // ensure at least one document open
    if (!documents.length) alert('There are no documents open.', 'No Document');
    else {
      // declare Global variables
      main(); // at least one document exists proceed
      //app.activeDocument.suspendHistory('Fix Image to Guides','main()');  // seems to be a problem layer is resize Photoshop back up a history step ?
    //                            main function                                  //
    function main() {
      // declare local variables
      var orig_ruler_units = app.preferences.rulerUnits;
      var orig_type_units = app.preferences.typeUnits;
      var orig_display_dialogs = app.displayDialogs;
      app.preferences.rulerUnits = Units.PIXELS; // Set the ruler units to PIXELS
      app.preferences.typeUnits = TypeUnits.POINTS;   // Set Type units to POINTS
      app.displayDialogs = DialogModes.NO; // Set Dialogs off
      try { code(); }
      // display error message if something goes wrong
      catch(e) { alert(e + ': on line ' + e.line, 'Script Error', true); }
      app.displayDialogs = orig_display_dialogs; // Reset display dialogs
      app.preferences.typeUnits  = orig_type_units; // Reset ruler units to original settings
      app.preferences.rulerUnits = orig_ruler_units; // Reset units to original settings
    //                           main function end                               //
    // The real code is embedded into this function so that at any point it can return //
    // to the main line function to let it restore users edit environment and end      //
    function code() {
      if (app.activeDocument.guides.length != 4) { alert("Four and only four Guides are required"); return; } // quit
      // get guides;
      var theVert = new Array;
      var theHor = new Array;
      for (var m = 0; m < app.activeDocument.guides.length; m++) {
      if (app.activeDocument.guides[m].direction == Direction.HORIZONTAL) {theVert.push(app.activeDocument.guides[m].coordinate)}
      else {theHor.push(app.activeDocument.guides[m].coordinate)}
      if (theHor.length != 2 || theVert.length != 2) { alert("Four Guides two vertical and two horizontal are required"); return; } // quit
      getTarget=getSelectedLayersIdx();
      if (getTarget.length!=1){ alert("The number of layers targeted is " + getTarget.length ); return; } // quit
      if (app.activeDocument.activeLayer.isBackgroundLayer ) { alert("Can not resize the background layer"); return; } // quit
      if (!app.activeDocument.activeLayer.visible ) { alert("Active layer is  not visible"); return; } // quit
      //if (hasLayerMask()) { alert("Active layer is  Masked"); return; } // quit
      if (app.activeDocument.activeLayer.kind == LayerKind.NORMAL  || app.activeDocument.activeLayer.kind == LayerKind.SMARTOBJECT && hasLayerMask()) { deleteLayerMask ();}
      if (app.activeDocument.activeLayer.kind != LayerKind.NORMAL  && app.activeDocument.activeLayer.kind != LayerKind.SMARTOBJECT )  {
      alert("Active layer is " + app.activeDocument.activeLayer.kind); return; } // quit
      // set selection to the ared defined but the guide lines the selectiom may get undone bt the bug in .resize() backing up a steo in histoty ???
      app.activeDocument.selection.select([[theHor[0], theVert[0]], [theHor[1], theVert[0]], [theHor[1], theVert[1]], [theHor[0], theVert[1]]]);
      // resize current normal layer or smart object layer to just cover selection canvas area aspect ratio and size and mask off any overflow
      var SB = app.activeDocument.selection.bounds; // Get selection bounds
      var SWidth = (SB[2].value) - (SB[0].value); // Area width
      var SHeight = (SB[3].value) - (SB[1].value); // Area height
      var LB = app.activeDocument.activeLayer.bounds; // Get Active layers bounds
      var LWidth = (LB[2].value) - (LB[0].value); // Area width
      var LHeight = (LB[3].value) - (LB[1].value); // Area height
      var userResampleMethod = app.preferences.interpolation; // Save interpolation settings
      app.preferences.interpolation = ResampleMethod.BICUBIC; // resample interpolation bicubic
      try {
      if (LWidth/LHeight<SWidth/SHeight) { // layer's Aspect Ratio less the Canvas area Aspect Ratio
      var percentageChange = ((SWidth/LWidth)*100); // Resize to canvas area width
      app.activeDocument.activeLayer.resize(percentageChange,percentageChange,AnchorPosition.MIDDLECENTER);
      else {
      var percentageChange = ((SHeight/LHeight)*100); // resize to canvas area height
      app.activeDocument.activeLayer.resize(percentageChange,percentageChange,AnchorPosition.MIDDLECENTER);
      catch(e) {
      app.preferences.interpolation = userResampleMethod; // Reset interpolation setting
      selectFront(); // Photoshop make top layer current when none are targeted
      code(); // Retry  with top visible layer selected targeted
      return; // rest would have been done during the retry
      app.preferences.interpolation = userResampleMethod; // Reset interpolation setting
      // Seems to be a bug in  resize() the document seems to first be backed up a step in history
      app.activeDocument.selection.select([[theHor[0], theVert[0]], [theHor[1], theVert[0]], [theHor[1], theVert[1]], [theHor[0], theVert[1]]]); // redo the selection
      align('AdCH'); // align to horizontal center
      align('AdCV'); // align to vertical center
      addLayermask(); // add layer mask
    // Helper Functions
    function align(method) {
      var desc = new ActionDescriptor();
      var ref = new ActionReference();
      ref.putEnumerated( charIDToTypeID( "Lyr " ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ) );
      desc.putReference( charIDToTypeID( "null" ), ref );
      desc.putEnumerated( charIDToTypeID( "Usng" ), charIDToTypeID( "ADSt" ), charIDToTypeID( method ) );
      try{executeAction( charIDToTypeID( "Algn" ), desc, DialogModes.NO );}
      catch(e){}
    // Function: hasLayerMask
    // Usage: see if there is a raster layer mask
    // Input: <none> Must have an open document
    // Return: true if there is a vector mask
    function hasLayerMask() {
      var hasLayerMask = false;
      try {
      var ref = new ActionReference();
      var keyUserMaskEnabled = app.charIDToTypeID( 'UsrM' );
      ref.putProperty( app.charIDToTypeID( 'Prpr' ), keyUserMaskEnabled );
      ref.putEnumerated( app.charIDToTypeID( 'Lyr ' ), app.charIDToTypeID( 'Ordn' ), app.charIDToTypeID( 'Trgt' ) );
      var desc = executeActionGet( ref );
      if ( desc.hasKey( keyUserMaskEnabled ) ) { hasLayerMask = true; }
      catch(e) { hasLayerMask = false; }
      return hasLayerMask;
    function getSelectedLayersIdx(){
          var selectedLayers = new Array;
          var ref = new ActionReference();
          ref.putEnumerated( charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
          var desc = executeActionGet(ref);
          if( desc.hasKey( stringIDToTypeID( 'targetLayers' ) ) ){
             desc = desc.getList( stringIDToTypeID( 'targetLayers' ));
              var c = desc.count
              var selectedLayers = new Array();
              for(var i=0;i<c;i++){
                try{
                   activeDocument.backgroundLayer;
                   selectedLayers.push(  desc.getReference( i ).getIndex() );
                }catch(e){
                   selectedLayers.push(  desc.getReference( i ).getIndex()+1 );
           }else{
             var ref = new ActionReference();
             ref.putProperty( charIDToTypeID("Prpr") , charIDToTypeID( "ItmI" ));
             ref.putEnumerated( charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
             try{
                activeDocument.backgroundLayer;
                selectedLayers.push( executeActionGet(ref).getInteger(charIDToTypeID( "ItmI" ))-1);
             }catch(e){
                selectedLayers.push( executeActionGet(ref).getInteger(charIDToTypeID( "ItmI" )));
          return selectedLayers;
    function selectFront() {
    // Alt+. shortcut select ftont visible layer
    var idslct = charIDToTypeID( "slct" );
        var desc250 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref207 = new ActionReference();
            var idLyr = charIDToTypeID( "Lyr " );
            var idOrdn = charIDToTypeID( "Ordn" );
            var idFrnt = charIDToTypeID( "Frnt" );
            ref207.putEnumerated( idLyr, idOrdn, idFrnt );
        desc250.putReference( idnull, ref207 );
        var idMkVs = charIDToTypeID( "MkVs" );
        desc250.putBoolean( idMkVs, false );
    executeAction( idslct, desc250, DialogModes.NO );
    function deleteLayerMask (apply) {
    // Delet Layer mask default to not apply first
    if (apply == undefined) {var apply = false};
    try {
    var idDlt = charIDToTypeID( "Dlt " );
        var desc9 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref5 = new ActionReference();
            var idChnl = charIDToTypeID( "Chnl" );
            var idChnl = charIDToTypeID( "Chnl" );
            var idMsk = charIDToTypeID( "Msk " );
            ref5.putEnumerated( idChnl, idChnl, idMsk );
        desc9.putReference( idnull, ref5 );
        var idAply = charIDToTypeID( "Aply" );
        desc9.putBoolean( idAply, apply );
    executeAction( idDlt, desc9, DialogModes.NO );
    catch (e) {}
    function addLayermask(){
    // Add layer Mask
    var idMk = charIDToTypeID( "Mk  " );
        var desc52 = new ActionDescriptor();
        var idNw = charIDToTypeID( "Nw  " );
        var idChnl = charIDToTypeID( "Chnl" );
        desc52.putClass( idNw, idChnl );
        var idAt = charIDToTypeID( "At  " );
            var ref19 = new ActionReference();
            var idChnl = charIDToTypeID( "Chnl" );
            var idChnl = charIDToTypeID( "Chnl" );
            var idMsk = charIDToTypeID( "Msk " );
            ref19.putEnumerated( idChnl, idChnl, idMsk );
        desc52.putReference( idAt, ref19 );
        var idUsng = charIDToTypeID( "Usng" );
        var idUsrM = charIDToTypeID( "UsrM" );
        var idRvlS = charIDToTypeID( "RvlS" );
        desc52.putEnumerated( idUsng, idUsrM, idRvlS );
    executeAction( idMk, desc52, DialogModes.NO );
    // Un link layer mask just added fron the layers content
    var idsetd = charIDToTypeID( "setd" );
        var desc2 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref1 = new ActionReference();
            var idLyr = charIDToTypeID( "Lyr " );
            var idOrdn = charIDToTypeID( "Ordn" );
            var idTrgt = charIDToTypeID( "Trgt" );
            ref1.putEnumerated( idLyr, idOrdn, idTrgt );
        desc2.putReference( idnull, ref1 );
        var idT = charIDToTypeID( "T   " );
            var desc3 = new ActionDescriptor();
            var idUsrs = charIDToTypeID( "Usrs" );
            desc3.putBoolean( idUsrs, false );
        var idLyr = charIDToTypeID( "Lyr " );
        desc2.putObject( idT, idLyr, desc3 );
    executeAction( idsetd, desc2, DialogModes.NO );

Maybe you are looking for

  • Won't quit, won't register protected music accounts

    This is a two part question.  First off, for whatever reason my iTunes will not quit unless I force quit it.  It may be related to why my other issue is happening. The second problem.   I used to have all my protected music at smart.net, and smart.ne

  • Advice on client proxy generation (ABAP and SAP PI)

    Hi, I've set up an ABAP client proxy using the wizard in transaction SE80 in the backend system, released it using transaction SOAMANAGER and tested that it works. I now want to compare this technical approach against the same scenario using a proxy

  • Keyword Search Not Functioning Correctly

    In firefox 3, Keyword search does exactly as explained in the link below. However, when I downloaded Firefox 4, keyword search does not work as it did in Firefox 3. When I type "Mozilla foundation" (or any improper URL) in firefox 4 and hit enter, it

  • Lock for bsis table..

    Hello, this thread is divided into 2 queries that i have, 1 - is their any lock object for  bsis table ? 2 - i want to update a field in both bseg and bsis table. is their any bapi or sum SAP function which updates the whole document or will i have t

  • Vendor communication language restriction

    Hi experts, is there a way to restrict the list of languages in the communication field in vendor master data? My customer doesn't want all the T002 table list but only a few of them. I didn't find anything both in the IMG and in SDN. Thanks in advan