Highlighted

Hide everything outside the Artboard?

Community Beginner ,
Mar 12, 2008

Copy link to clipboard

Copied

I'm designing some business cards, which have an 1/8" bleed, along with elements that hang outside of the border of the card. Is there a way in Illustrator CS3 that I can say, "hide everything outside of the Artboard" so I can see what the finished product will look like?

I know I could print them out or output to PDF and see it without the non-Artboard items, but these approaches seem clumsy and labor intensive. I'd like it if I could have some sort of "cropped view"--where everything not on the Artboard is hidden--to work in.

Thanks.

Views

162.7K

Likes

Translate

Translate

Report

Report
This conversation has been locked.

Hide everything outside the Artboard?

Community Beginner ,
Mar 12, 2008

Copy link to clipboard

Copied

I'm designing some business cards, which have an 1/8" bleed, along with elements that hang outside of the border of the card. Is there a way in Illustrator CS3 that I can say, "hide everything outside of the Artboard" so I can see what the finished product will look like?

I know I could print them out or output to PDF and see it without the non-Artboard items, but these approaches seem clumsy and labor intensive. I'd like it if I could have some sort of "cropped view"--where everything not on the Artboard is hidden--to work in.

Thanks.

Views

162.7K

Likes

Translate

Translate

Report

Report
Mar 12, 2008 0
New Here ,
Mar 12, 2008

Copy link to clipboard

Copied

I just fudge it either by using a Clipping Mask, or by having a dummy "Masking" layer on top with white rectangles drawn to hide the content off the artboard.

Likes

Translate

Translate

Report

Report
Mar 12, 2008 0
Community Beginner ,
Mar 12, 2008

Copy link to clipboard

Copied

I've done that, too...but doesn't it seem a little absurd for me to have to create a separate layer, remember to set it to "non-print" status, etc., just so I can see how my item will print? It's hard for me to believe that Illustrator doesn't have a feature like this.

Likes

Translate

Translate

Report

Report
Mar 12, 2008 2
Community Beginner ,
Sep 28, 2010

Copy link to clipboard

Copied

I have been hoping and wishing for this ever since I started using AI — Now with multiple artboards it's tedious to make and keep editing the masking layer as artboards are added.

Adobe: Please add Artboard Masking

Likes

Translate

Translate

Report

Report
Sep 28, 2010 7
New Here ,
Jun 10, 2011

Copy link to clipboard

Copied

I totally agree. I'm missing this feature for so long. I know about my friends creating white boxes everywhere outside the artboard which is absurd.

Likes

Translate

Translate

Report

Report
Jun 10, 2011 0
Adobe Community Professional ,
Jun 10, 2011

Copy link to clipboard

Copied

you can create your own "hide everything outside the Active Artboard" using Actions.

self explanatory

hideEverythingOutsideAB.PNG

to bring everything back, go to Object->Show All, or hit Ctrl+Alt+3

Likes

Translate

Translate

Report

Report
Jun 10, 2011 1
Explorer ,
Jul 14, 2011

Copy link to clipboard

Copied

Neat idea for the action, but I want something more along the lines of a clipping mask (without having to create the mask). As others said, just like InDesign.

Your action will not work if items are partially within and partially outside of the artboard.

Clipping masks suck in this regard as it messes up easy layer configuration and editing, and doing so with nested layers wreaks havoc with doing lock/unlock all.

Likes

Translate

Translate

Report

Report
Jul 14, 2011 1
Adobe Community Professional ,
Jul 14, 2011

Copy link to clipboard

Copied

Make a mask for each layer: an artboard-size rectangle aligned to the artboard. With it selected, select the layer in the Layers panel and click on the Make/Release Clipping Mask button at the bottom of the panel. You can lock it in place, you can turn its functioning on and off in the Layers panel, and it shouldn't "mess up easy layer configuration and editing" (not quite sure what that means). Yes, you are still creating a clipping mask, but it's applied to the layer rather than the objects or groups. I agree that it would be really useful to have one-click access to this, but in the meantime…

Peter

Likes

Translate

Translate

Report

Report
Jul 14, 2011 0
Explorer ,
Jul 14, 2011

Copy link to clipboard

Copied

The problem here is masking things on multiple layers. I tend to crate my art on multiple layers for the line art, color, shading, etc. Masking these separate layers will result in the objects being "grouped" and pushed to one layer.

I tried putting all my layers as sub-layers in a "master layer" and adding an artboard-sized clipping mask to the layer, but then when doing Unlock All, it unlocks all my sub-layers instead of just the stuff I manually locked. Without sublayers, Unlock All works as desired.

I've heard the argument that sub-layers are the same as folder layers in Photoshop, but they do odd things since Illustrator considers all the elements of a layer as sub-layers. True folders, with the ability to mask them, would probably work.

Likes

Translate

Translate

Report

Report
Jul 14, 2011 0
Adobe Community Professional ,
Jul 14, 2011

Copy link to clipboard

Copied

You lost me on "objects being "grouped" and pushed to one layer": nothing is grouped, nothing is pushed. All it does is visually clip objects on the layer (or sub-layer. Everything is just as editable as it was before applying the layer. Locking-unlocking is a separate issue, is it not?

Oh, wait:

Adding a clipping mask to objects groups them and puts them on one layer, but that's not the process I described. Don't select objects to be masked in addition to the masking object: highlight the layer in the Layers panel and click the Make/Release Clipping Mask button at the bottom of the panel, dont go to Object>Clipping Mask>Make.

Likes

Translate

Translate

Report

Report
Jul 14, 2011 0
Explorer ,
Jul 14, 2011

Copy link to clipboard

Copied

OK you're right — masking via the Layers panel almost does as you say, and definitely does not group them (good to know!). However, if I do:

- Layer 1 (mask object)

- Layer 2 (artwork layer)

- Layer 3 (artwork layer)

in order to create a clipping mask, I need to select each layer (highlighting them does nothing), and if the mask is on a different layer (as diagrammed above), no mask is created. Only if the masking object is on the topmost artwork layer (Layer 2 in example above) does the mask get created.

My Layers panel is set to show layers only — I wonder if this plays a factor?

edit: nope, just tried it. The toggling on/off feature is crucial here. Thanks for helping figure this out!

Message was edited by: georgecoghill

Likes

Translate

Translate

Report

Report
Jul 14, 2011 0
Adobe Community Professional ,
Jul 15, 2011

Copy link to clipboard

Copied

I beg your pardon. The topmost object in the layer becomes the layer clipping mask when the layer is highlighted and the button is clicked. The object does not have to be selected, but the layer must be highlighted. The masking object must be in the layer it is to mask.

Likes

Translate

Translate

Report

Report
Jul 15, 2011 0
Explorer ,
Jul 15, 2011

Copy link to clipboard

Copied

OK I misunderstood your post. Having the clipping mask object on the layer to be clipped does not make this an easy toggle on/off for the entire image, which is what I think the OP and myself are looking for. This method requires you to do it for each layer, which can become cumbersome if you have many layers.

Perhaps due to a setting somewhere, but I am not seeing the same results as you. If my layer set up is as follows:

LAYER 1 : Masking Object plus other artwork, MO on top of all objects

LAYER 2: other objects

and I highlight both layers (no objects are selected), the Make/Release Clipping Mask button in the panel gets grayed out. Only when I highlight one single layer does the Clipping Mask button becomes clickable (and works fine). Selecting just the masking object while both layers are highlighted has no effect (Mask button still disabled/grayed out). Neither does selecting all layers (large color rectangle to the right of layer name).

The odd thing is that I swear your method (highlight all layers and create mask) worked for me earlier, but it is not working now. As it stands now, each layer needs it's own mask applied.

I quit/restarted Illustrator and started from a brand-new default document, but still see the same results I outlined above.

Likes

Translate

Translate

Report

Report
Jul 15, 2011 0
Explorer ,
Jul 15, 2011

Copy link to clipboard

Copied

I recorded this video to help explain what I am seeing on my end, as well as explain my earlier problem with using sublayers for masking and the Lock/Unlock All command.

Likes

Translate

Translate

Report

Report
Jul 15, 2011 0
Adobe Community Professional ,
Jul 15, 2011

Copy link to clipboard

Copied

First, yes, I'm talking about a mask for each layer.

If I understood you correctly about your locking/unlocking needs, I don't see a way around it. The keyboard commands lock/unlock objects, groups, etc., but not layers; unfortunately Illy treats sublayers as objects. If you select a layer and apply the keyboard command, the objects in the layer are locked, but not the layer. that has to be done by clicking the lock box in the Layers panel, as does unlocking the layer.

So, I thought I had a solution for you, but unfortunately not. If you come up with one, I'd love to hear about it.

Thanks,
Peter

Likes

Translate

Translate

Report

Report
Jul 15, 2011 0
Explorer ,
Jul 16, 2011

Copy link to clipboard

Copied

Thanks again for helping me understand Peter. At the very least, I learned a new method for clipping mask using the layer as opposed to the objects — was not aware of the differences there.

Unless Adobe changes something on their end, I think we are out of luck on this one. Best workaround is the created a compound path with a "hole" the same size/location of the artboard, and just save it as part of a custom template.

George

Likes

Translate

Translate

Report

Report
Jul 16, 2011 0
Adobe Community Professional ,
Jul 16, 2011

Copy link to clipboard

Copied

Hi guys, this is a brute-force approach, it makes big frames around artboards to cover what's outside. It frames all artboards, and places those frames in a top-most layer. The script only needs to be run once and it will frame all artboards, if more artboards are added, delete existing frames layer and run script again. Frames can be turned on/off as needed in the layer palette.

artboardMask.PNG

#target Illustrator

//  script.name = artboardClipping.jsx;

//  script.description = makes a faux "artboard clipping mask" by drawing a box to cover everything outiside artboards;

//  script.required = an open document;

//  script.parent = carlos canto // 7/16/11;

//  script.elegant = false;

if (app.documents.length > 0)

    {

          var idoc = app.activeDocument;

          var ilayer = idoc.layers.add();

          ilayer.name = "ArtboardsMasks"

          var newColor = new CMYKColor();

          newColor.cyan = 0;

          newColor.magenta = 0;

          newColor.yellow = 0;

          newColor.black = 40;

          var msg = "Enter Artboard Mask Percentage Margins \n";

                   

          var margins = Number(Window.prompt (msg, 400, "Artboard Faux Clipping Mask"));

          for (i=0; i<idoc.artboards.length; i++)

               {

                    var abBounds = idoc.artboards.artboardRect;// left, top, right, bottom

                    var ableft = abBounds[0]; // 0

                    var abtop = abBounds[1]; // 612

                    var abwidth = abBounds[2] - ableft; // 792 // width

                    var abheight = abtop- abBounds[3]; // 0 // height

                    //$.writeln(abBounds);

                    var igroup = ilayer.groupItems.add();

                    igroup.name = "Artboard " + (i+1);

                    var ipath = igroup.pathItems.rectangle(abtop, ableft, abwidth, abheight);

                    igroup.artworkKnockout = KnockoutState.ENABLED;

                    ipath2 = ipath.duplicate(ipath,ElementPlacement.PLACEAFTER);

                    ipath2.resize(margins,margins);

                    ipath2.filled = true;

                    ipath2.fillColor = newColor;

                    ipath.opacity = 0;

                    ipath.strokeWidth = ipath2.strokeWidth = 0;

                    igroup.locked = true;

                    igroup.hidden = true;                   

               }

     }

else

    {

        alert ("there are no open documents");

    }

Edit:

I just added a line to the script if you have copied it, please copy it again

Message was edited by: CarlosCanto

Likes

Translate

Translate

Report

Report
Jul 16, 2011 1
Adobe Community Professional ,
Jul 17, 2011

Copy link to clipboard

Copied

Carlos,

I still think that your brain must be an amazing place in which to live.

Peter

Likes

Translate

Translate

Report

Report
Jul 17, 2011 0
Adobe Community Professional ,
Jul 18, 2011

Copy link to clipboard

Copied

thanks Peter I appreciate it,

Likes

Translate

Translate

Report

Report
Jul 18, 2011 0
New Here ,
May 30, 2012

Copy link to clipboard

Copied

Hey Carlos,

How would I save this to use in Illustrator? With text/edit?

Cheers,

Jeff.

Likes

Translate

Translate

Report

Report
May 30, 2012 0
Adobe Community Professional ,
May 30, 2012

Copy link to clipboard

Copied

Jeff, copy and paste it into a Text Editor, and save it with a .jsx extension, then double click to run or save it into your preset Scripts folder and run from File->Scripts Menu.

Likes

Translate

Translate

Report

Report
May 30, 2012 0
New Here ,
May 30, 2012

Copy link to clipboard

Copied

I get this error when I try to run it. I think I could be saving it wrong but when I look at the saving formats in textedit .jsx is not listed and when you maunally try to type it in it doesn't let you.

Screen shot 2012-05-30 at 2.44.41 PM.png

Likes

Translate

Translate

Report

Report
May 30, 2012 0
Adobe Community Professional ,
May 30, 2012

Copy link to clipboard

Copied

Set the file to be saved as plain text only (from the Format menu in TextEdit, choose Make Plain Text). From the error message you saved the file as a .rtf file. This will allow you to save it with the .jsx extension.

Likes

Translate

Translate

Report

Report
May 30, 2012 0
Adobe Community Professional ,
May 30, 2012

Copy link to clipboard

Copied

do as Larry advised and once you get it to work you might want to try this other script. It is called Artboard Preview

http://forums.adobe.com/message/3895305#3895305

Likes

Translate

Translate

Report

Report
May 30, 2012 0
New Here ,
Aug 15, 2013

Copy link to clipboard

Copied

Why in the world is this not a feature? More people by easily an order of magnitude (that I know, at least) use Illustrator for creating business cards (and other things that this feature would be good for) than use InDesign. Why is Illustrator missing this essential feature?

Likes

Translate

Translate

Report

Report
Aug 15, 2013 1
New Here ,
Sep 25, 2014

Copy link to clipboard

Copied

I agree Mangello. That original cropping feature was so easy to use. Wished that we could get it back.

I've worked with the above suggestions in clipping and cropping and can hide what is on the outside of the artboard, but does anyone know how to eliminate the resize and inclusion of white space when I export to another type of file (ie. JPG)?    Explaination, if my original (before mask or crop) graphic extends beyond the left side of my artboard (framed toggles of the graphic are outside the edges of the artboard), when I save to JPG it creates a white portion on the left from top to bottom in the area where the graphic was masked from. The only way to remedy this so far is to move the whole graphic inside the artboard thus messing up the desired design.

Is there any way to do a "Save to extensions of artboard only" command? Or could we have the cropping command back? It was needed for essential uses.

Likes

Translate

Translate

Report

Report
Sep 25, 2014 0
Enthusiast ,
Sep 25, 2014

Copy link to clipboard

Copied

does anyone know how to eliminate the resize and inclusion of white space when I export to another type of file

Untitled-1-01.jpg

Likes

Translate

Translate

Report

Report
Sep 25, 2014 1
Engaged ,
Jul 27, 2020

Copy link to clipboard

Copied

@CarlosCanto

i tried you script but kept returning errors about the getActiveArboard. So i looked into others scripts and adjusted yours a bit. I got it working again, for me on my older system it works fine in 2018 cc

I thought i shared my edit to your script

#target Illustrator

// https://community.adobe.com/t5/illustrator/hide-everything-outside-the-artboard/td-p/1270239?page=1
//  script.name = artboardClipping.jsx;
//  script.description = makes a faux "artboard clipping mask" by drawing a box to cover everything outiside artboards;
//  script.required = an open document;
//  script.parent = carlos canto // 7/16/11;
//  script.elegant = false;
if (app.documents.length > 0) {
    var idoc = app.activeDocument;
    var ilayer = idoc.layers.add();
    ilayer.name = "ArtboardsMasks"
    var newColor = new CMYKColor();
    newColor.cyan = 0;
    newColor.magenta = 0;
    newColor.yellow = 0;
    newColor.black = 40;
    var msg = "Enter Artboard Mask Percentage Margins \n";

    var margins = Number(Window.prompt(msg, 400, "Artboard Faux Clipping Mask"));
    for (i = 0; i < idoc.artboards.length; i++) {

        // Source: Ladygin from the inc script file
        // https://ladygin.pro/products/lascripts/
        var activeArt = activeDocument.artboards[activeDocument.artboards.getActiveArtboardIndex()],
            rect = activeArt.artboardRect,
            artWidth = rect[2] - rect[0],
            artHeight = rect[1] - rect[3];

        var igroup = ilayer.groupItems.add();
        igroup.name = "Artboard " + (i + 1);
        // var ipath = igroup.pathItems.rectangle(abtop, ableft, abwidth, abheight);
        // create rectangle
        var ipath = igroup.pathItems.rectangle(rect[1], rect[0], artWidth, artHeight);
        igroup.artworkKnockout = KnockoutState.ENABLED;
        ipath2 = ipath.duplicate(ipath, ElementPlacement.PLACEAFTER);
        ipath2.resize(margins, margins);
        ipath2.filled = true;
        ipath2.fillColor = newColor;
        ipath.opacity = 0;
        ipath.strokeWidth = ipath2.strokeWidth = 0;
        igroup.locked = true;
        igroup.hidden = true;
    }
} else {
    alert("there are no open documents");
}

Likes

Translate

Translate

Report

Report
Jul 27, 2020 0
Engaged ,
Jul 27, 2020

Copy link to clipboard

Copied

@CarlosCanto,

Still wanted to know why your version of the script failed. It was actually a very easy fix. We just need to check which index the artboard has. You code wasnt that much different from what i added in the prior post.
I simply used the i to get the current Index number for the artboard. 

var margins = Number(Window.prompt(msg, 400, "Artboard Faux Clipping Mask"));
    for (i = 0; i < idoc.artboards.length; i++) {
        // Returns errors
        var abBounds = idoc.artboards[i].artboardRect;// left, top, right, bottom
        var ableft = abBounds[0]; // 0
        var abtop = abBounds[1]; // 612
        var abwidth = abBounds[2] - ableft; // 792 // width
        var abheight = abtop- abBounds[3]; // 0 // height
        //$.writeln(abBounds);
        // Source: Ladygin from the inc script file

 

Likes

Translate

Translate

Report

Report
Jul 27, 2020 0
Engaged ,
Jul 27, 2020

Copy link to clipboard

Copied

Perhaps a different approach would look nicer. Is that instead of using a margin for the mask, we add a second rect the size of the full document. So we make a rectangle based on the limits then subtract or mask the current artboard.

Screen Shot 2020-07-27 at 14.25.25.pngScreen Shot 2020-07-27 at 14.25.20.png

Likes

Translate

Translate

Report

Report
Jul 27, 2020 0
Most Valuable Participant ,
Jul 27, 2020

Copy link to clipboard

Copied

Hi @schroef,

Please do not dig out older threads unnecessarily!

 

But if you really can't ignore these topics: please leave the latest information.
There is a presentation mode in the current versions of Illustrator. You no longer need a script. You can also crop the view temporarily. You can find both commands in the menu: View

 

To your answer in the other thread: It is true that many scripts were incorrectly adopted when switching to the new forum software. Often only the counter is missing [i]

 

And please don't blame the script writers from before 2016. They didn't deserve it! Their scripts worked until the changeover.

 

If you can, help restore and preserve the ancient treasures. Thank you

 

[ This thread from the year 2008 is closed now ]

[ Reasons are apparent here Illustrator preview ]

Likes

Translate

Translate

Report

Report
Jul 27, 2020 0
LEGEND ,
Jun 10, 2011

Copy link to clipboard

Copied

For this sort of job you're better off using InDesign which has Normal, Preview, Bleed and Slug view options.

For business cards you put everything that's the same on all cards on a master page and the variables on ordinary pages.

You can duplicate pages ad infinitum – a whole lot easier than making lots of artboards.

Also if you've got printing on the backs you just work with facing pages.

I used to do business cards in Illie but have long since gone over to ID exactly for the reasons you mention.

You can easily copy your Illie artwork into ID or place it linked.

Likes

Translate

Translate

Report

Report
Jun 10, 2011 0