CreativePro Forum
Join our community of graphic designers, publishers, and production artists from around the world. Our members-only forum is a great place to discuss challenges and find solutions!
- You must be logged in to reply to this topic.Login
Any Way to Synchronize a Book to Turn On/Off Layers?
- This topic has 26 replies, 11 voices, and was last updated 12 years, 7 months ago by
Claudio Marconato.
-
AuthorPosts
-
-
September 9, 2010 at 4:38 pm #56959
Mr.Screens
MemberI'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!
-
September 9, 2010 at 5:20 pm #56960
David Blatner
KeymasterThere 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.
-
September 10, 2010 at 5:34 am #56962
Theunis De Jong
MemberDavid, 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”.)
-
September 10, 2010 at 7:40 am #56965
ropapareli
MemberHi 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.
-
September 10, 2010 at 8:56 am #56970
Mr.Screens
MemberSince 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!
-
September 10, 2010 at 2:55 pm #56977
Theunis De Jong
MemberMr. 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:
- 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.
- Save. All documents are saved when changed but stay opened on the screen.
- Save and Close. (No explanation needed, methinks.)
-
September 17, 2010 at 9:50 am #57034
Mr.Screens
MemberWow! 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.
-
September 17, 2010 at 11:56 am #57035
stewb
MemberWhat 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.
-
November 2, 2010 at 1:04 pm #57553
carynsiegs
ParticipantJongware 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
-
November 2, 2010 at 4:00 pm #57555
Theunis De Jong
MemberCaryn, wouldn't that lead to lots of documents with no layers selected at all?
-
November 2, 2010 at 4:13 pm #57556
Mr.Screens
MemberThe 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?
-
November 2, 2010 at 4:46 pm #57557
Theunis De Jong
MemberYou mean, you'd want add all of the layers in each document added to all other documents?
-
November 2, 2010 at 4:54 pm #57558
Mr.Screens
MemberI 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.
-
November 3, 2010 at 4:10 am #57562
Anonymous
InactiveWhy 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”
1. Add text
2. Choose Font
3. Any styling or alignment
4. Add rotation
5. Add opacity
6. Choose position
-
November 8, 2010 at 6:18 am #57611
alfredmosskin
ParticipantJongware. 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!
-
November 8, 2010 at 2:40 pm #57618
Theunis De Jong
MemberIf Adobe is going to incorporate it into CS6, should I send them my bank account number? :D
-
November 9, 2010 at 7:10 am #57626
alfredmosskin
Participanthaha, definately.
-
December 9, 2010 at 2:34 pm #58053
carynsiegs
ParticipantSorry 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
-
December 9, 2010 at 3:22 pm #58054
Theunis De Jong
MemberAh, 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!
-
December 10, 2010 at 1:33 pm #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?
-
December 10, 2010 at 2:41 pm #58070
Theunis De Jong
MemberHi 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.
-
September 21, 2011 at 11:59 am #60581
DonaLuisa
ParticipantHi, 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.
-
September 22, 2011 at 1:30 am #60584
Theunis De Jong
MemberDona, 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.
-
December 17, 2012 at 10:51 am #63762
Claudio Marconato
MemberI'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:
Tomorrow I'll try the December 2010 version, so I'll see if it works.
-
August 11, 2020 at 2:34 am #126501
Phillip Clarke
MemberJongware – 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?
-
August 11, 2020 at 6:28 am #126503
David Blatner
KeymasterSorry about the broken link… I think it is fixed now… or here: https://indesignsecrets.com/downloads/jongware/layerPerBook2.jsx
-
August 11, 2020 at 7:09 am #126504
Phillip Clarke
MemberMany thanks, David :)
-
-
-
AuthorPosts
- The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
