Determine if hidden layers exist
I am building a script to cleanse photoshop documents, and one of the options I am including is to remove all hidden layers. There is no direct command to do so (or none that I have seen), so I used a chunk of code from ScriptListener to perform the 'Delete hidden layers' command.
I only want to enable this option if there are layers that are hidden, so I'm wondering if there is a simple way to determine if any layers are hidden in the document (aside from looping through all of the layers). Or, if there's a way to determine if the 'Delete hidden layers' command is enabled or not, since that is only enabled when there are hidden layers.
I would just bung the code between a try catch block (but I'm lazy )
If you did want to check this should be fast...
alert(hasHiddenLayers());
function hasHiddenLayers(){
var ref = new ActionReference();
ref.putEnumerated( charIDToTypeID('Dcmn'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
var count = executeActionGet(ref).getInteger(charIDToTypeID('NmbL')) +1;
try{
activeDocument.backgroundLayer;
var i = 0; }catch(e){ var i = 1; };
for(i;i<count;i++){
if(i == 0) continue;
ref = new ActionReference();
ref.putIndex( charIDToTypeID( 'Lyr ' ), i );
var desc = executeActionGet(ref);
var layerName = desc.getString(charIDToTypeID( 'Nm ' ));
var Id = desc.getInteger(stringIDToTypeID( 'layerID' ));
if(layerName.match(/^<\/Layer group/) ) continue;
if(!desc.getBoolean(charIDToTypeID( "Vsbl" ))) return true;
return false;
Similar Messages
-
Hi folks - total nube here. I am trying to find out whether I can determine if multiple objects exist beneath a usr's mouse click coordinates. The objects will be either shaded areas under a LineSeries in a chart or possibly overlayed images representing such areas (not sure which approach would be better). I know that I can probably determine alebraically whether the coordinates selected b a mouse click belong under one series or another or multiple and if this is the best option, then I will proceed with it. But possibly, there is a way for me to determine whether a shaded area under a series or a grpahical element exists under those coordinates. Any hints? Thanks in advance.
Yes, export it for your reference first. make it delete and create new one.
hope it should work fine.
thx
Deep -
How do I export to PDF in InDesign without the hidden layers
Hi there
This is probably a simple solution but I am trying to export a document to PDF in InDesign without the hidden layers.
i.e - I have created a document that includes images etc from an existing PDF.
When I open the new PDF and use the 'find' tool, Pro is highlighting words on the hidden (original pdf).
I have tried exporting only the visible layers but is there a setting in InDesign that I can use to export only the visible content to pdf?
Thanks in advance.Jenjimay wrote:
I have tried exporting only the visible layers but is there a setting in InDesign that I can use to export only the visible content to pdf?
Even if you mask off part of a PDF, or place a white rectange on top of it, the text will still be selectable. Other than with raster images, InDesign is not smart enough to clip off parts of a PDF (or rather, it's smart enough to leave them as they are). PDFs can contain incredibly complex objects, and any clipping routine would probably make as many mistakes as it solves problems.
Introduce a small Transparency to this image or one on top of it, then export with Acrobat 4 (PDF 1.3) settings. Since that old version does not support native transparency, ID is forced to redraw the image, and then it will clip off excess data. -
Hidden layers get PDFed anyway
Hello all,
I've been meaning to ask this for a while now:
Whenever I hide InDesign layers; then Export to a PDF; and choose Visible Layers (in the General options); and finish up and OK the producing of the PDF; the dialog immediately warns me that stuff from hidden layers will be in the PDF anyway! Sure enought there is!
Why?
Also, is there a way in Acrobat 8 or 9 Pro to remove an entire layer (OCG, in Acrobat-speak) along with its objects all at once?
I can't find it if it does this.
Mike Witherell in MarylandThe world's spun a few times since then Peter. I'm trying to think back.
I had a raft of buttons on a separate layer forming an index (call these buttons B). I could turn this layer on using a
button (call this button A) on the page in view, and a button on the index layer (call this button C) could then hide it
again.
The PDF was exported with all layers.
The visibility or otherwise was determined by the button options - visible in PDF or hidden.
So button A which turned on the raft of buttons forming the index was set to visible, but all the buttons on the index
raft (buttons B and C) were set to hidden. Mouse down of button A had the behaviour to show each of buttons B and button
C and hide button A - you have to list each event separately in the actions attributed to each button.
Mouse down of button C then hid buttons B and C and showed button A.
The crux I think is what you can define as a "field" for the purposes of the Button Option menu > Behaviors > Behavior >
Show/Hide Fields. I was defining buttons as fields. I can't remember/never knew whether you could define a layer as a
field. I think probably not, and you would have to make the contents of a layer a single button or selection of buttons
and then define them initially as visible or not visible in the PDF.
k -
Possible to determine which FIFO layers used on an Invoice
Hi,
Is it possible to determine which FIFO layers were used when satisfying an invoice?
Thanks
GreigThe information regarding the FIFO cost price exists in the OINM
(Warehouse Journal) table under the fields Calculated Price and
Open Quantity.
check this if it helps :
SELECT T0.ItemCode FROM OINM T0 INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode WHERE T0.CalcPrice = '0' and T1.EvalSystem ='F'
Regards, -
QuickLook / Preview and PDFs with hidden layers
Hidden layers in PDF files show up in preview, quicklook and in the generated thumbnails. Is there any known fix for this to get the content to render with only the visible layers?
It would help to look at a sample. Can you post one?
Also, check the "Show Large Images" Page Display preference. -
Does Safari support interactive PDFs with layers? Through the use of hidden layers and buttons we built in interactivity that allows the viewers to click on buttons to display different content. When I view the PDF in Safari 5.0.3 on my Mac OS 10.5.8 the PDF displays fine and the interactivity works. However our web design firm tell me the PDF displays all the hidden layers when they view it in Safari. Who's right?
Try updating your Safari to the latest version, 5.0.5.
Also check whether the rest of your system is up to date by going to Software Update in the Apple menu. -
How do I Reveal/Hide Hidden Layers for viewing with Acrobat Reader (iPad)?
Hi,
I've created a document in Quark Xpress with multiple layers which I then exported to a PDF. Using Acrobat Pro I created hotspots which revealed/hid these layers on rollover. It works perfectly on the desktop version of Acrobat Reader but not on Acrobat Reader for iPad (where the hidden layers are automatically switched on and touching the hotspots does not hide them). Does anybody know a good work around to this?There are many features which are possible in the desktop version of Adobe Reader which won't work in Reader for tablets. I think this is one of them. Probably no workaround possible until the feature is updated.
-
Why are my hidden layers showing up in a PDF when i convert it from an Ai file?
When I convert an illustrator file to a PDF the hidden layers are showing up when openned by a mac or iphone. This does not happen when i send it to people with a pc and is only happening to one person. What could be causing this and how can I fix it?
Thank you.That's probably because the Mac people are opening or viewing the PDFs within the Mac's "Mail" program or with the "Preview" program and not with Acrobat.
Since the Windows people aren't using these programs and most likely just Acrobat or Adobe Reader, the layers are kept hidden.
I'm afraid the only way to truly keep those layers hidden is to delete them before saving your file as a PDF. (Of course, do a "Save As" and keep your original .ai file intact. -
How to set the number of hidden layers for neural network?
I am using "Multiclass Neural Network" to build a model. I can configure number of hidden nodes, iterations etc., but I couldn't find anything to configure number of hidden layers. How to configure the number of hidden layers in Azure ML?
Here is the article describing it - https://msdn.microsoft.com/library/azure/e8b401fb-230a-4b21-bd11-d1fda0d57c1f?f=255&MSPPError=-2147217396
Basically, you will have to use a custom definition script in Net# (http://azure.microsoft.com/en-us/documentation/articles/machine-learning-azure-ml-netsharp-reference-guide/)
to create hidden layers and nodes per hidden layer -
Uploaded page does not correctly display hidden layers
Hi,
I am a bit baffled by this as I haven't seen this in all my
years using Dreamweaver.
I have created a few links, that when rolled over they
display a hidden layer that contains a styled table of contents (No
links in the tables).
This works perfectly as expected on my testing server, but
when it is uploaded to the client webserver, the hidden layers
display below each link, throwing the page out completely, and also
the CSS style does not apply.
Is there something on the clients webserver that needs to be
changed or tweeked to recognise hidden layers, CSS etc?
CheersAre the layers actually hidden in the code? I mean when you
look at the
code view of the page (either in the CSS or the inline styles
for the
layers, depending on what DW version you are using), do you
see -
visibility:hidden
or -
visibility:visible
Which?
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"Macnimation" <[email protected]> wrote in
message
news:e3q43i$1hg$[email protected]..
> Hi,
>
> I am a bit baffled by this as I haven't seen this in all
my years using
> Dreamweaver.
>
> I have created a few links, that when rolled over they
display a hidden
> layer
> that contains a styled table of contents (No links in
the tables).
>
> This works perfectly as expected on my testing server,
but when it is
> uploaded
> to the client webserver, the hidden layers display below
each link,
> throwing
> the page out completely, and also the CSS style does not
apply.
>
> Is there something on the clients webserver that needs
to be changed or
> tweeked to recognise hidden layers, CSS etc?
>
> Cheers
> -
Applescript: missing required parameter "including hidden layers"
I've used this script (below) for packaging files in InDesign CS3, but when I upgraded to CS4 I always get this message: "Missing required parameter 'including hidden layers' for event 'package'." Does anyone know how to include this and where it goes?
Thanks.
on run
display dialog "Whoa Dude, I'm a Droplet so drop an InDesign file on me"
end run
on open draggedItems
tell application "Finder"
make new folder at alias "Macintosh HD:Users:Melanie:Documents:ScriptFiles:Packaged:" with properties {name:"_Folder"}
end tell
set folderPath to "Macintosh HD:Users:Melanie:Documents:ScriptFiles:Packaged:_Folder:"
repeat with currentFile in draggedItems
tell application "Adobe InDesign CS4"
set openedfile to open (currentFile as alias)
set theDoc to (document 1)
tell document 1
package to folderPath copying fonts yes copying linked graphics yes copying profiles no updating graphics yes ignore preflight errors yes creating report yes
set fileName to (name of theDoc)
set filepath to folderPath & fileName & ".pdf"
export openedfile format "Adobe PDF" to filepath using "[Smallest File Size]"
save openedfile
close openedfile
end tell
tell application "Finder"
set NewName to fileName & "_Folder"
set name of folder folderPath to NewName
end tell
end tell
end repeat
end open
---------I don't use InDesign/CS4, but it seems clear that the 'package' command now has additional parameters that you're not including in the command.
Since it's telling you that 'including hidden layers' is the parameter that's missing, just append it to the packagecommand, with either a 'yes' or a 'no' depending on what you want:
package to folderPath copying fonts yes copying linked graphics yes copying profiles no updating graphics yes ignore preflight errors yes creating report yes including hidden layers no -
Using Power shell script how to hidden SharePoint existing features.
Hi Firends,
Using Power shell script how to hidden SharePoint existing features.
Please help me.
Thanks,
Tiru
TiruThe Hidden property is set within the solution, so you would need access to the source code in order to set it.
Trevor Seward
Follow or contact me at...
  
This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs. -
I found a tutorial on ( www.comeandphotoshop.com/animated-neon-sign/ ) and followed it up to the point of animation. The effect worked fine but it involved stroking outlines then hidding the layer and creating a new layer and adding the effects to the new layer. So far so good everything looks great. Problem is when I flatten the layer to send out to web as a jpeg I get a box that says flattening will disguard all hidden layers. This looses some of the effect. Can you get past the deleation of hidden layers or is there another way to keep all effects? I need to save my hidden layers but can't keep them visible or once again it ruins the effect.
Any help would be appreciated,
Thanks
ChuckAgain.
When you flatten, ALL layers are discarded. Flattened images don't have Layers, by definition. Any layer that had the visibility turned off will have no effect on the way the image looks whether it's flattened or not.
Are you looking at this at 100%? Something else must be going on.
Maybe what you mean by "turned off" is different than what I think. Are you clicking on the eyeball? Are you setting the Fill Opacity to zero perhaps (which is what I would do)? -
My site has hidden layers that function with side navigation
bar links so that you can show different iframes within the same
window of one page. The iframes show in the various hidden layers
that are shown when you click on their corresponding side nav tab.
The problem is that once you click on one of the side nav
links to show a layer, they will disapear when you roll over any of
the top navigation bars, which use the same extention to make a
drop down menu,
Here is an example:
http://webdemo.camba.org/pages/developmentdept.htm
If you click on "contact," the correct layer appears, but if
you move your mouse to the top of the page, say to the search bar,
the contact layer disappears again.
Can anyone remedy this? I'm sure it has to do with the
extention but I am not sure how to fix it.
Thanks![email protected] wrote:
> My site has hidden layers that function with side
navigation bar links so that
> you can show different iframes within the same window of
one page. The iframes
> show in the various hidden layers that are shown when
you click on their
> corresponding side nav tab.
> The problem is that once you click on one of the side
nav links to show a
> layer, they will disapear when you roll over any of the
top navigation bars,
> which use the same extention to make a drop down menu,
> Here is an example:
>
http://webdemo.camba.org/pages/developmentdept.htm
>
> If you click on "contact," the correct layer appears,
but if you move your
> mouse to the top of the page, say to the search bar, the
contact layer
> disappears again.
>
> Can anyone remedy this? I'm sure it has to do with the
extention but I am not
> sure how to fix it.
>
> Thanks!
>
>
your approach is flawed. If you're using an iframe, there is
no point in using layers to hide the
iframes. iFrames are meant to load different content
depending on what you click on in the main page.
Instead of hiding layers, you should just have one visible
iframe, and load different content
targetting this single iframe when you click on the
navigation.
Then, your problem will desappear. But if you don;t want to
do that, the problem you're describing
is probably due to the fact that you're using the same id or
variable name in the function call to
show-hide your layers on the menu and the layers that contain
the iframes.
Look at your code. Look at the javascript attached to your
links, and you'll find the answer.
seb ( [email protected])
http://webtrans1.com | high-end web
design
Downloads: Slide Show, Directory Browser, Mailing List
Maybe you are looking for
-
Is it possible to return the PO number after successful webadi upload
Hi All, Kindly help me for the below scenario if possible. I am downloading approved requisitions through WebADi and then user is adding pay items in the excel of WebADI. Once upload i am submitting the custom concurrent program which indeed submits
-
hi, i have created one batch file. aa.batch( in that i have written type ana command so that it should display the content of file 'ana') now what i want is to execute this file from java using Runtime..... and i want to display the content of file '
-
Keyboard shortcut for openAsSmartObject
Is there a possibility to create a shortcut definition in the file TranslatedStrings.txt for the command "Open in Photoshop as Smart Object"? I tried this but it is not working: "$$$/AgEditExternally/MenuCommand/ContextMenu/openAsSmartObject/Key
-
Hi, I'm a newbie in Garageband, and I'm having trouble getting GB to recognize jpg and png image files. Image files that I took off the Internet work just fine. I can find them and put them into the timeline as I please. BUT image files that I put on
-
Itunes purchases on multiple ipods
I bought my hubby a shuffle for jogging and he loves it. I had no intention of buying one for myself, but I'm thinking I want one also. Can I use the same music on both?