Placed PDF Layer visibility options

How do I access the layers in a linked PDF. Basically I need to turn on certain ones at a time when placing the PDF.
Below I believe is basically Kasyan's(?) (sorry if this is the wrong person, maybe Jongware's) script from another site for dealing with images.
Main();
function Main() {
    var page, placedFile, graphics, i, j,
    doc = app.activeDocument,
    pages = doc.pages;
    for (i = 0; i < pages.length; i++) {
        page = pages[i];
        var graphics = page.allGraphics;
        for (j = graphics.length-1; j >= 0; j--) {
            placedFile = page.allGraphics[j];
           // if (placedFile.constructor.name == "ImportedPage" && placedFile.itemLink.linkType == "InDesign Format Name") {
                try {
                  / /placedFile.graphicLayerOptions.graphicLayers.item("Frames").currentVisibility = false;
                   //alert(placedFile.constructor.name);
                    alert(placedFile.graphicLayerOptions.graphicLayers[0].name);   // this line tells me "untitled - 3" but I can't seem to access or see how to loop throught the rest of the layers.
                catch (err) {}
    alert("Done");
Thank you in advance!!

Okay I got it. Not sure why but graphicLayers of graphicLayers does the trick.
Something like..
placedFile.graphicLayerOptions.graphicLayers[0].graphicLayers.count()

Similar Messages

  • Interactive PDF Layer Visibility Buttons Not Working On iPad

    I've created a document in Indesign CS6 and exported the layers to pdf. I created a button in acrobat pro to change a layers visibility. The pdf is intended to be viewed on an iPad and the button wont work. It does however work perfectly on my desktop. Does anybody have a work around?

    There is little to none support for scripts and other advanced features of PDF files on iOS devices, unfortunately.

  • Layer Visibility Overrides

    I'm having an issue with InDesign's Layer Visibility Options when importing a PSD file. I use the layer visibility option upon import of the PSD and shut off the layers I do not want showing. But then if I edit the PSD and add an additional layer, the file updates in InDesign and turns on every single layer again. Is there a way around this? It makes the layer options kind of useless to me.

    When I import the PSD into InDesign CS3, I make sure it says to preserve the layer overrides, but if I end up adding a new layer to the PSD, when it updates in InDesign the layer override goes haywire and shows all the layers.

  • Change visible layers in placed PDF

    I need to programmatically change the visibility of layers in a placed PDF. Do I use kChangeVisibleLayersCmdBoss? Please show an example. I can get the "eyeball" to toggle in the "Object Layer Options" dialog box, but the view does not reflect the change.

    I'm not sure if this setting exists in version 8, but check to see if Allow Layer State To Be Set By User Information is selected in the Documents Preferences. If it is not selected, Layer Properties dialog box settings, other than Layer Name and Default State, are ignored.

  • Interactive PDF file with layer visibility issue.

    I have created an interactive PDF file in InDesign CC and added buttons in Acrobat CC. The buttons reveal layers with the layer visibility action under properties. The problem is that Reader takes 3-4 seconds to show the layer in full screen mode and flickers in any other view.

    For that kind of volume and unattended operation, you want InDesign Server – which is the server/high volume edition of INDD.
    From: Adobe Forums <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Thu, 3 Nov 2011 06:58:07 -0700
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: How do I create an interactive PDF file with variable data
    Re: How do I create an interactive PDF file with variable data
    created by Ti26E31DSxxx<http://forums.adobe.com/people/Ti26E31DSxxx> in PDF Language and Specifications - View the full discussion<http://forums.adobe.com/message/4005459#4005459

  • Save layer visibility states into new PDF

    Hi there,
    I have a document that is a floorplan of a building. I have created color layers to highlight specific rooms (e.g. Office 1, Office 2, Women's/Men's room, Storage room, etc.). I would like to save the PDF (overwrite or as a new PDF) with certain layers turned on so that the next time it is opened (by me or a client), the highlighted rooms are still showing. I found a somewhat convoluted way of doing this in Acrobat using Bookmarks and tying a "Set layer visibility" Action to it, but I am not sure how to go about doing it in Reader. Or should I look into creating a button or JavaScript in Acrobat so that it can complete the same tasks in Reader?
    Thank you for your help,
    Serge

    You might try using View>New View. It will entail going through and setting each map as you would like by turning on and off the layers you want and then save that view with a distinctive name. Then you can use the saved views to act as Layer Comps.

  • Saving layer visibility as views does not work - CS5 for Windows

    I've read about it multiple places, even watched a video where it supposedly works. But when I toggle layer visibility and save as a new view, it doesn't seem to work.
    Here's the video: http://layersmagazine.com/illustrator-different-views.html
    Any ideas?

    Layer Visibility Variables – A short introduction
    1. Open a new document and name Layer 1 "Cyan"
    2. Add three main layers and name them "Magenta", "Yellow" and "Black"
    3. On each layer draw a shape and colour it according to the Layer's name.
    4. Save the file as "My_first_Variables.ai"
    5. Target Layer "Cyan" (click the circle at the right hand of the Layer's name)
    6. At the bottom of the Variables Palette click the Make Visibility Dynamic button
    Now you've created your first Layers Visibility Variable. Continue with
    7. Target Layer "Magenta" and click the Make Visibility Dynamic button in the Variables Palette
    8. Target Layer "Yellow" and click the Make Visibility Dynamic button in the Variables Palette
    9. Target Layer "Black" and click the Make Visibility Dynamic button in the Variables Palette
    Done. You have created four Layers Visibility Variables. The next step is to define the Data Sets:
    1. Layers Palette: Show Layer "Cyan" and hide all other layers
    2. Variables Palette: Click the Capture Data Set button (the camera icon)
    3. Layers Palette: Show Layer "Magenta" and hide all other layers. Now in the Variables Palette the first Data Set becomes italic indicating that you can create an new Data Set. So click the Capture Data Set button to define Data Set 2.
    4. Layers Palette: Show Layer "Yellow" and hide all other layers
    5. Variables Palette: Click the Capture Data Set button to create Data Set 3
    6. Show Layer "Black" and hide all other layers. Click the Capture Data Set button to create Data Set 4
    7. Show all layers and click the Capture Data Set button to create Data Set 5
    Done. You have created five Data Sets. Just play around by toggling them in the Variables Palette (Next/Previous Data Set button or via Popup menu/Flyout menu) and see one feature among other things: The Variables Palette as a remote control of the Layers Palette. If you like, rename the Data Sets according to the Layers names for instance.
    Now it's time to create some simple Save/Export actions in order to Batch save/export Layers as single files. For example:
    Export as PSD
    1. Open any file
    2. Actions Palette: Create new action and name it "Export Layers as PSD"
    3. File > Export as PSD. Choose any destination folder, the desired options in the Photoshop Options dialog and hit Enter
    4. Click the Stop Recording button in the Actions Palette and disable the Show dialog icon (on the left hand of the action's name)
    Save as PDF
    1. Open any file
    2. Actions Palette: Create new action and name it "Save Layers as PDF"
    3. File > Save as PDF. Choose any destination folder, the desired options in the PDF Options dialog and hit Enter
    4. Click the Stop Recording button in the Actions Palette and disable the Show dialog icon (on the left hand of the action's name)
    Now start the Batch command:
    1. Switch to the original "My_first_Variables.ai"
    2. Actions Palette Flyout menu: Batch
    3. In the Play Area choose the Export Layers as PSD action
    4. Choose Data Sets as the source
    5. In the Destination Area enable the Override Action Export Commands option and choose any destination folder
    6. Choose an option for the File name and hit Enter to start the Batch
    Done. All four Layers plus the fifth Data Set have been exported as single Photoshop files. Repeat the Batch with the Save Layers as PDF action (don't forget to enable the Override Action Save Commands) and, of course, create your own actions, experiment with other file formats, figure out some harmless bugs especially in conjunction with the PDF compatible AI format when placing in InDesign.

  • Layer Visibility Override icon

    My maps team have just seen this icon and are wondering why it's appeared in the links icon.
    I looked in the help section to find out but couldn't find much about it, does anyone have a second to explain to me regarding this icon, or how to turn it on or off?
    hope to hear from you
    Brgds
    Alex

    Help > InDesign Help
    Search for
    layer PSD
    Look for topic
    To set layer visibility for placed PSD or PDF files
    That should help.
    The icon beside the link it telling you someone has adjusted the visibility of its layers by using the Object Layer Options dialog box.
    HTH
    -mt

  • Placed PDF with Layers - can layers be maintained and exported in a new PDF?

    Can a layered PDF placed in InDesign include these layers in the InDesign Layers Panel? I have a layered PDF created in Illustrator CS4. I'm placing it in InDesign CS4 6.0.4 and want to export a PDF with the layers in tact from Illy. I use the Show Import Options dialog box and can see all of the layers in the layers tab. I tried both options for update links so that choice seems unimportant. I only see one layer, Layer 1, in the InDesign layers panel after placing the PDF. I was expecting to see all of the layers from the placed PDF. I exported as Acrobat 6 with Create Acrobat Layers checked but the only layer in the exported PDF is Layer 1. I searched and read for quite some time and can’t figure it out. Maybe I’m expecting something that isn’t possible but it sounds like it should be. I tried placing it as a native AI file with the same results. Where am I going wrong?
    Thanks,
    Glenn

    Thanks to Bob and Peter. I understand what you said. It seems as though the ability to place a file with layers should allow you to take advantage of it better. This is a map that will allow users to turn on or off various points of interest, hotels, etc. Now I realize I can at least control them from the place dialog box so, other than having to place the same map multiple times I end up with what I wanted. Thanks for the soultions.
    Glenn

  • Need to hide running heads in placed PDF

    I’m trying to reformat the PDF of a book for a client that was set up the wrong size to print. If I could remove the running heads from each page then I could get the PDF into a new ID document that’s set up to the proper trim size. I tried cropping the pages in the PDF, but that just hides the part that’s cropped out. The full page shows up when placed in ID. So then I pulled down the top of each frame in ID so that the running heads were no longer visible. I exported this to PDF and it looks good. I know the running heads are still there, just not visible. I’m concerned that they might show up when the book is printed. Can I assume that if something is hidden on the PDF page it won’t print?

    That script probably honors the last used choice for a placed pdf so placing once, enabling Show Options, and selecting trim or crop would be honored by the script.
    UnChecked

  • Change the page in a placed PDF?

    Is there an easy way to change the page in a placed PDF? Something along the lines of Object Layer Options?
    Thanks.

    We can fix this with scripting! Easy oneline script [Edit: break it two 2 lines so you don't get a scrollbar in the forum]:
    var g; (g=app.selection[0].graphics[0]).
        place(g.itemLink.filePath, true);
    save as replace.jsx and assign it a key in Edit > Keyboard Shortcuts (Scripts Area).
    It assumes a frame (rectangle) is currently selected, and re-places the file associated with it, while showing the options dialog box (2nd argument to place()).

  • Indesign Applescript Placed Object Layer Visibilty Override

    Hi, trying to programmatically control layer visibility of placed objects (either AI or other ID files) in a multi-page Indesign document.  Have looked all over the dictionary but can't seem to figure a way to reference the layers.
    Would someone have an example of how to do this in Applescript?  (Please, not javascript, will convert one day but for now am staying with AS.)
    Thanks!

    Thanks, Mary, your suggestion has put me on a good path, but I'm still having some trouble.
    I have several similar documents, each having multiple pages with one placed item per page that are linked, not embedded.  Each of those placed items may or may not have a layer with a specific name.  I'm trying to iterate through the links and toggle visibility of the layers within the placed objects as needed.
    Ultimately the script would:
        Cycle through all links in the target doc.
            Get a list of all layers in the current link of the cycle.
            Cycle through a list of layer names to check.
                Set the desired layer to visible, all others in the list to not visible.
                (This could be with a string var that was the same as the desired entry in the list, or a numeric index var to compare with where the counter was in its cycle)
    Here's a verbose example of what I've got so far.  It assumes the target document is already open...
    # With which app are we working?
    tell application "Adobe InDesign CC 2014"
        # With which document are we working?
        set theDocName to "My Indesign Document"
        # Which layer do we want to be visible?   
        set theDesiredLayer to "My Desired Visible Layer"
        # Set the Document ID of the chosen document
        set theDocID to document named theDocName
        # Work with the chosen document
        tell theDocID
            # Create an object of all links of the chosen document
            set theDocLinks to links of theDocID
            # Set the count of all links in the chosen document
            set theDocLinksCount to count of theDocLinks
            # Cycle through all the linked objects
            repeat with i from 1 to theDocLinksCount
                # Create an object of the current link
                set theCurLink to item i of theDocLinks
                # Set the name of the current link
                set theLinkName to name of theCurLink
                # Create an object of the parent of the current link
                set theLinkParent to parent of theCurLink
                # Create an object of the graphic layer options of the parent of the current link
                set theGraphicLayerOptions to graphic layer options of theLinkParent
                # Get a count of the layers in the current link
                set theLayerCount to count of graphic layers of theGraphicLayerOptions
                # Cycle through the layers in the current link
                repeat with j from 1 to theLayerCount
                    # Create an object of the current layer
                    set theLayer to item j of graphic layers of theGraphicLayerOptions
                    # THIS FAILS
                    set theLayerName to name of theLayer
                    log "Layer: '" & theLayerName & "' ~ Visible: '" & current visibility of graphic layer theLayerName of theOptions
                    # THIS WORKS ONLY UNDER CERTAIN CONDITIONS
                    set current visibility of graphic layer theDesiredLayer of theGraphicLayerOptions to true
                end repeat
            end repeat
        end tell
    end tell
    The part that works does so only when I let it act on specific links (based on theLinkName).  If the link has no such layer, it bombs (as expected).
    I'd really rather just iterate through the layers of each link and take action based on whether or not my target layer exists in that link.  For that to happen, I need to be able to access the name of the layer.
    When cycling through the layers,
        set theLayer to item j of graphic layers of theGraphicLayerOptions
    *should* return a graphic layer object, which has a name property that I could then use for comparison.  But that always fails.
    I've also tried other properties of the graphic layer object such as parent, object reference, etc. It always bombs out when I try to work with the layer object.
    The obvious conclusion is that I'm not really creating a graphic layer object, but according to the dictionary it seems this should work.
    Any ideas what I'm doing wrong?
    Thanks!

  • Layer Visibility Javascript

    Hi,
    I am working on a model of a dovetailed drawer. It is a simple model, but it must be made to show different design options - to be able to switch them back and forth.
    I have tried to use Daniel Beardsley's "Build Your Own Car Prototype" as a template for my own presentation. All seemed to go fairly smoothly until it came time to swap the Layer Visibility code around to my own needs.
    I want the user to be able to choose between three different deisgn options and so I put each mesh on a separate layer. However, I do not get the effect I am seeking. The console returns:
    TypeError: context3D.LayerManager has no properties
    2:AcroForm:Button2:Annot5:MouseUp:Action1
    How can I set this up correctly?
    - David

    Thank you very much, Daniel, for your further input.
    I have changed the document as you suggested, however it did not work for me. Perhaps I omitted something vital.
    Looking over the layers.js carefully I see that at the top a number of methods are named in the Layer Object Constructor, and that at the bottom a number of functions are offered as options for the user of the script. It would seem to me that the functions use these methods to make changes in the layers of the 3D object via its source code.
    Considering the above, it seems best to me that I use the functions offered and then define the variable and its properties as you suggest. Editing Layers.js like this:
    // The following functions can be called by any PDF document
    // that includes this file as part of its 3D Annotation JavaScript.
    // the rest of the code in this file (above) is private and can only
    // be accessed via the layersManager.
    var layersManager = new LayersManagerObject(4);
    function addPartToLayer( partName, layerIndex )
    layersManager.addPartToLayer( partName, layerIndex );
    layersManager.addPartToLayer( "Bottom", 0 );
    layersManager.addPartToLayer( "Straight01", 1 );
    layersManager.addPartToLayer( "DeepU02", 2 );
    layersManager.addPartToLayer( "Crescent03", 3 );
    function displayLayer( layerIndex )
    layersManager.displayLayer( layerIndex );
    layersManager.displayLayer( 0 );
    layersManager.displayLayer( 1 );
    layersManager.displayLayer( 2 );
    layersManager.displayLayer( 3 );
    Then set up the button to "displayLayer":
    var context3D = getAnnots3D(0)[0].context3D;
    context3D.layersManager.displayLayer( 1 );
    Unfortunately this does not seem to work either, but instead returns an error that "function is not a function" . . . :(
    - David

  • Keeping layer visibility overrides in CS2

    Hi,
    I apologize if this has been answered before - did a search but couldn't find what I was looking for.
    When using CS4 (6.0.3), I have no problem setting my "object layer option overrides" on a pdf file inside Indesign and having them stick when the pdf is updated.
    The problem comes when I have to use Indesign CS2 on projects.  When setting the over rides everything looks fine but when I use illustrator to make some changes to the pdf and refresh the link in Indesign, all the layers are shown and the "keep layer visibility over rides" does not do what it is supposed to do.  I have it set to only show 2 of 3 layers and the smallest change to the pdf file and a subsequent update to the link will always reset all the layers to show.  Is there a fix for this?
    Thanks,
    Rob

    From what I can tell, Illustrator CS2 does not export usable layer info. So apparently they didn't test if layer overrides would work correctly.
    It is kind of interesting that an Illustrator CS3/4 file has usable layer info in InDesign CS2, but you're correct that the layer overrides seem broken by any update to the file...

  • Hyperlinks from placed PDF

    Hi
    Is there any ways to pick up hyperlinks from placed PDFand convert them to InDesign hyperlinks (or buttons)?
    Of course there´s no native text in placed PDF but converted hyperlinks could be for instance rectangles on the top of the original hyperlink.

    Importing PDF pages
    Using the Place command, you can specify which pages you want to import from a multipage PDF: You can place a single page, a range of pages, or all pages. Multipage PDF files let designers combine illustrations for a publication into a single file.
    The page range options appear when you select Show Import Options in the Place dialog box. The dialog box includes a preview, so you can view a thumbnail of the pages before you place them. As you place each page, InDesign reloads the graphics icon with the next page, letting you place the pages one after the next.
    i InDesign doesnt import movies, sound, links, or buttons when you place a PDF file.
    (my italics)

Maybe you are looking for

  • S:RSSDK:400 Unable to create javax.ejb.EJBObject

    Hello Guys,    I'm trying to extract information from xPD in to BW and the error message S:RSSDK:400 Unable to create javax.ejb.EJBObject is raised during the dataload. If you have any suggestion, please let me know. Thanks and Regards, Iván.

  • Using LIKE and IN at the same time

    Is it possible to use both LIKE and IN at the same time such as: select first_name from emp where user_id LIKE IN('1%','2%') Thanks in advance --Joshua                                                                                                   

  • Change table rows with Combo Box

    I want to change the size of the rows displayed per page. I tested this code but the number of the rows is updated only when the pages are switched. Can you tell me how I can fix this? import javafx.application.Application; import static javafx.appli

  • JMenubar and JMenuIteam

    Hi frds, I add the JMenu after that i add JMenuIteam. In add Three menuiteam.. so which event i will for that..? if i will click on one menuiteam then open one iteam like that so which event i wil add for that.? so please give me brief information. T

  • Rating is being applied to EVERYTHING, not just the active image- please help.

    Seemingly out of nowhere a particular feature in LR stopped behaving the way it normally does for me. When I am in the Survey view (in the Library mode) and I have a number of images selected because I am trying to make my selections, it suddenly sta