To change page displayed means to relink graphic with different pdfPlacePreferences.pageNumber value.
graphicLayer.currentVisibility you can set keeping current link.
ok - i'm trying:
app.pdfPlacePreferences.pageNumber = 2;
now page is switched to page number 2 but layers settings are changed to defaults.
How can I preserve layer settings?
sorry for my English
You can try this:
// Store the layer's properties: myLayerProps = myLayer.properties; // place your PDF on myLayer app.pdfPlacePreferences.pageNumber = 2; n.place(n.itemLink.filePath,0, undefined); //Then restore the layer's properties: myLayer.properties = myLayerProps;
but I mean layers in pdf file - not layers in InDesign document.
I can turn on / of visibility of particular layers on placed pdfs.
I would like to preserve this settings of visibility after relinking to another page.
Ah -- I don't know about PDF layers. Did you check the object model to see if there's anything about PDF layers in there?