Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

Any Way to Synchronize a Book to Turn On/Off Layers?

Return to Member Forum

  • Author
    Posts
    • #56959
      Mr.Screens
      Member

      I'm working a heavily illustrated college textbook for a publisher client. They recently updated their security guidelines to not only password protect PDF proofs but also to watermark them with NOT FOR SALE and copyright notices, with very specific transparency and positioning instructions.

      I've implemented this on a Master Page layer named Watermark that I'll turn on to make their PDF proofs, then turn off when I make print-ready PDFs.

      I was curious whether there's any way to use the synchronize feature in my Book file to turn on/off this particular layer in multiple chapters. I tried turning it on in one chapter, designated that chapter the master for sync, then syncing Master Pages, but that didn't do it. Any other ideas?

      I'm using InDesign CS4 on a dual Quad-Core Intel Xeon Mac Pro, OSX 10.5.8. Thanks!

    • #56960
      David Blatner
      Keymaster

      There is no automatic way to synch layer visibility, unfortunately. I'm sure a script could do it. I could see many different reasons why people would want to synch layers among all the files in a book.

    • #56962

      David, it can be scripted but only if all layer names across the entire book are the same. It needs some consideration — what if you hide all layers but one, and there is a document in the book without the one remaining visible layer?

      (I realize a perfectly reasonable answer would be “Do what the user asked, then put the blame on him if it's not what he intended”.)

    • #56965
      ropapareli
      Member

      Hi Mr.Screens,

      I have an idea that may work for you.

      You could set an object style to the watermark with the opacity you need for the pdf. And then edit the object style and set the opacity to zero when you don't need the watermarks anymore.

      I know the synchronize feature works for the styles but I am not sure if those objects with zero opacity can cause some trouble in your final file. I mean printing problems… I am not a fan of using transparency inside indesign but you are already using transparency anyway.

    • #56970
      Mr.Screens
      Member

      Since I had already built 20 chapters' worth of “prelayout” (styled text flowed in but no art added yet) when these new guidelines came in, I was thrilled to be able to add the new layer to the Master Pages of one chapter, then sync Master Pages and have it magically appear in all my chapters. But turning it on and off has no effect in syncing.

      This morning I had the thought, “I brought you into this world, and I can take you out.” So I deleted the Watermark layer from the sync-master chapter and again synced Master Pages, just to test that as a brute-force method (although it's not really what I wanted). It deleted all the elements from the Watermark layer on all the Master Pages, but the empty layer remained. Pretty close—effectively the result I wanted, but inelegant.

      Ro, that's a clever solution, but I'm with you about not liking ghostly zero-precent opacity objects haunting every page of my final file, doing who knows what? Rasterizing all the type they “overprint”? I'd rather manually click off the Watermark layer in each chapter when I'm making the proofreader's corrections. I just like letting InDesign do the work for me whenever it will.

      Thanks for your input, everybody!

    • #56977

      Mr. Screens, no need to leave it at that!

      Try this script: layersPerBooks.jsx (right-click and select “Save Target As”, or equivalent, into your User Scripts folder. You might need to remove the .txt extension that some browsers automatically add.)

      It works like this:

      • First, it checks if you have one single Book file open. Due to an unfortunate mistake of Adobe's, one cannot trust ID to handle more than one Book at a time when scripting …
      • Then it opens all of the individual documents from that book.
      • It checks all layers of all documents, and builds a list of just the ones that occur in every book. That's just to make sure, because …
      • then it displays a tiny dialog, where you can check on and off the individual layers! The initial setting is taken from the first document in the book, but you are free to check and uncheck all of them at will.
      • It applies the changes to all documents, and then you can:
      1. Do nothing — the documents stay open, unsaved, on your screen. I'd recommend this when running it for the first time. I tested the script, of course, but please make sure it works as I am hoping it does.
      2. Save. All documents are saved when changed but stay opened on the screen.
      3. Save and Close. (No explanation needed, methinks.)
    • #57034
      Mr.Screens
      Member

      Wow! Thanks, Jongware! The script works like a charm. You're like a genius or something.

      I somehow didn't get or didn't see the e-mail notification of your reply. Good thing I saw this topic in the Buzzworthy Forum Posts section of the InDesign Secrets Newsletter, or I may never have known you posted this script.

    • #57035
      stewb
      Member

      What about converting the watermark on the master page into a button?

      Then, on export, you can specify Interactive Elements->”Do not include” when you export for print, and ->”include appearance” on the pdfs that require it.

    • #57553
      carynsiegs
      Participant

      Jongware wrote:

      David, it can be scripted but only if all layer names across the entire book are the same.

      and

      It checks all layers of all documents, and builds a list of just the ones that occur in every book.

      I installed the script and it works, but it isnt bringing up the box to select layers. The error message I get says that I don't have layers that run throughout all of the files in the book. This is true–and is exactly why a script would be so helpful! :)

      The book I have to export has lots of shared files and lots of different layers. Is it possible to write a script that would bring up all the layers throughout all the files in the book and allow me to select only the layers I need to export a particular version?

      This would save me hundreds of hours of turning layer comps on and off!

      -Caryn

    • #57555

      Caryn, wouldn't that lead to lots of documents with no layers selected at all?

    • #57556
      Mr.Screens
      Member

      The script is working perfectly for my book project (thanks again, Jongware!), but that's because all the chapters in my book have the same layers.

      The way I added layers I needed after the chapters had been started was via Synchronize Options in the InDesign Book file I'd gathered them into. By adding layers to one chapter's Master Pages, I could use that chapter as the master to synchronize Master Pages throughout my Book file, bringing in the layers.

      Any chance you might be able to standardize layers across all your documents that way?

    • #57557

      You mean, you'd want add all of the layers in each document added to all other documents?

    • #57558
      Mr.Screens
      Member

      I don't know whether Caryn wants to (or should) do that, but I thought it was way to get the script to work.

      There are probably hidden dangers there, depending on how consistently the layers are named and what their properties are.

    • #57562
      Anonymous
      Inactive

      Why not just add the watermark in Acrobat afterwards? You set the type size and the opacity, angle and position pretty easily.

      I do this sometimes, then I can FLATTEN the pdf in Acrobat, this embeds the watermark on anything that touches it, making it pretty difficult to remove.

      In Acrobat go to “Document>Watermark>Add”

      Add Watermark Acrobat

      1. Add text

      2. Choose Font

      3. Any styling or alignment

      4. Add rotation

      5. Add opacity

      6. Choose position

    • #57611
      alfredmosskin
      Participant

      Jongware. Thank you for an excellent script! I just visited the InDesign Conference in Chicago and we discussed this lack of default functionality in InDesign. This really does exactly the trick I was looking for!

    • #57618

      If Adobe is going to incorporate it into CS6, should I send them my bank account number? :D

    • #57626
      alfredmosskin
      Participant

      haha, definately.

    • #58053
      carynsiegs
      Participant

      Sorry for the delayed response.

      Jongware asked:

      You mean, you'd want add all of the layers in each document added to all other documents?

      I would like a menu of all the layers in the book. Then I can select the ones I want to use for the export.

      The issue is that the book has 70+ separate documents, some of which are shared with other books that have different sets of layers. No one layer cuts across all the files.

      B/c each document in the book has to be opened to select the correct layers each time I want to export a different version, it takes a long time to set up the book for exporting. Your script seemed like the perfect answer (and yes, I think adobe should give you a commission!)

      Thanks in advance for any suggestions.

      -Caryn

    • #58054

      Ah, yep, got it.

      Warning: this script may switch off all visible layers in some documents! (I'm just sayin'.)

      The initial state of the checkboxes in the dialog box cannot be trusted! It only shows a valid state for the layers in the first document in the book (on and off); it cannot check all other documents, because same-named layers may be on in one document and off in another. I don't think scripting can handle an “undetermined” state of its checkboxes, but even if it did, well, I just hacked this up in 5 minutes ;)

      Click here to download the script; use with care, make a back-up, check your documents after running it, don't trust strangers, & oh — happy holidays by the way!

    • #58068
      Alan Gilbertson
      Participant

      @Jongware: Just sorta vaguely with this topic, but I've run into a situation in both CS4 and CS5 across two OSes (Vista and Win7) in the last 18 months whereby ID crashes quite reliably (and a bit rudely, imho — I've never done anything to ID that would warrant such shabby treatment) if I try to synch master pages throughout a book to effect a global margin change. With Layout Adjustment off, the first doc or two will happily change, then ID crashes. If Layout Adjustment is on, ID doesn't even get that far. This has happened on more than one project, and I've reported it as a bug because it's reproducible. That doesn't fix the problem, of course.

      This bites me partly as a result of my own book design workflow, but mostly from the need to respond to late editorial changes that require slight tweaks to leading (therefore baseline grid and top/bottom margins) or left-right margins to maintain a target page count.

      Seeing your brilliant sleight-of-hand at work in this thread, I'm now thinking that perhaps a script could work around the bug until the ID engineering team finally track it down and fix it. (Given the complexity of InDesign and the relatively rare situation, I don't think it'll bubble up to the top of the priority stack any time soon.)

      Wotcher fink? Would a script do it, or might it run into a DOM issue?

    • #58070

      Hi Alan,

      .. a bit rudely, imho — I've never done anything to ID that would warrant such shabby treatment ..

      ( :D If that happens to me, I usually take it as its revenge for all the times I .. blessed the dear thing from the bottom of me heart.)

      Well, I dunno. I don't know for sure how enabling Layout Adjustment and changing margins would work from within a script — it's not something I've done so far. I've never even sync'ed master pages manually across a book! I must say that I am a bit wary of all of the synching functions, it seems you get all or nothing. Last time I needed to synchronize a couple of GREP styles across a single 660 p./58 document book, I didn't rely on it either but wrote a script that checked stuff instead of changing it blindly!

      But I will look into it. If I can make it work by script, I can only test it on some small fry docs, so it's entirely probable that it runs at my end but still has difficulties with your (presumably) more complex documents.

    • #60581
      DonaLuisa
      Participant

      Hi, Mr. Jongware,

      I would like to try your script. I am a brand new user of InDesign CS5.5. I know next to nothing about using a script.

      Following the posted instructions, I saved the script file, layerPerBook.jsx, to C:Documents and SettingsdonaluisaApplication DataAdobeInDesignVersion 7.5en_USScripts.

      I launched InDesign, and opened the book, then opened one file.

      Now what? What do I do to display the little dialog box that lists the layers that I check on/off? So curious what I'm missing.

    • #60584

      Dona, you have to double-click the script in the Script panel to run it.

      You say you are using CS5.5 — I wrote it for an older version of InDesign and didn't test it on any newer versions, so unfortunately it might just not work.

    • #63762

      I'm using the script (version september 2009) with InDesign CS5, it's very useful.

      Today I have an error that I've never seen before:

      Script Error

      Tomorrow I'll try the December 2010 version, so I'll see if it works.

    • #126501

      Jongware – thank you so much for your LayersPerBook script – it’s saved me a lot of time! Can I ask, was there extra functionality in the v.2 script mentioned above, but now a dead link?

Viewing 24 reply threads
  • The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
Forum Ads