Fit Object to Artboard

Written by

in

Fit Object to Artboard

In Illustrator there’s a Fit Artboard to Selected Art feature. The next script does exactly the opposite, it fits Selected Object(s) to the Artboard.

                            ↓

Download: fitObjectToArtboard_v2.zip

Comments

22 responses to “Fit Object to Artboard”

  1. Euan Avatar
    Euan

    Carlos, This code is amazing. How would I edit it so it is set to -10 from the edge of Artboard? Can you hard code the choices made from the alert windows?

  2. Paolo Avatar
    Paolo

    Thank you! This is great

  3. Santy Avatar
    Santy

    Thank, work amazing also in ai CC 2018

  4. Usman Nazir Avatar
    Usman Nazir

    Is it useful tool or not ?

  5. Ioannis Portalios Avatar

    Hello I have multiple groups of paths and I would like to fit all of them inside a specified sized artboard but without resizing the items. Is there any script that can do that ? Thank you

    1. Carlos Avatar
      Carlos

      Hi Giannis, it should be possible. But that would need a totally different approach.

    2. Flint Ibrah Avatar
      Flint Ibrah

      Please I have a similar problem if any body has a soln pliz help. I want to fit multiple objects to an artboard without distorting the sizes but i want when it can orient each object either horizontally or vertically to minimize the waste space.

      1. Maclovio Gordillo Avatar

        Debería ser posible convirtiendo tu composición a un símbolo de 9 sectores, intenté con algo muy simple y funcionó, para algo mas complejo no estoy seguro.

  6. Clutch Cargo Avatar
    Clutch Cargo

    Just what I am looking for… well almost, ha! Any chance of version 1 still available? I am trying to automate as much as possible and don’t need any user input boxes. Just matching a single image to the artboard. Also, any chance of getting this in vbscript (or at least maybe VBA as I know that is what you prefer), so I can add to my vbscript rather than interaction with Illustrator.

  7. Miguel Avatar

    YOU are Awsome!

  8. Tracy Avatar
    Tracy

    Thank you! Works great.

  9. Caner ÖZDEMİR Avatar

    Could you make resizing to respect aspect ratio as an option ?

  10. hub2000 Avatar
    hub2000

    hello,
    very nice script.

    is there the possibility to delete the old object and only to keep the duplicated one?

    1. Carlos Avatar
      Carlos

      Yes, it’s possible, I will add it to next release

  11. Luca Benaglia Avatar

    hii!version 2 it work amazing also in ai CC2016 , but i found 2 problems
    1) when there are some clipplig area. It keep note of the whole size of the different compoment of the artwork ignoring the clipped area,
    2)When it is resized, it didn’t place the artwork in the page

    tks Luca

    1. Luca Benaglia Avatar

      a little update, if instead to use clipping mask i use cropping area it works perfectly!!
      tks

  12. Jarek Avatar

    Hello, 2016 called and even though typed print is hard to convey gratitude, here I am thanking you for this. I would like to know if I missed the update that allows to keep proportion you may have gotten around to creating. Thanks!

  13. Ozgur Kilic Avatar
    Ozgur Kilic

    Thanks for saving my day. And agree to keep proportions option.

    1. Carlos Avatar

      noted, I’ll include options for it in the next version, stay tuned.

  14. Carlos Avatar

    it should be possible, will look into including that option for next version.

  15. Adiohea Avatar
    Adiohea

    Is there a way to modify this script so it keeps the objects proportions in tact and scales to maximum height or width depending on the images proportions?

    1. Giannis Portalios Avatar
      Giannis Portalios

      Hello friend I am looking for the same exact thing . Did you find anything ?

Leave a Reply

Your email address will not be published. Required fields are marked *

Cookie Preferences

We use cookies to enhance your experience. Choose which types of cookies you want to allow.

Strictly Necessary

Required

Required for core site functions such as security, load balancing, login sessions and remembering your cookie choices. No data is shared with third parties. Cannot be disabled.

Functional

Remember choices you make (language, region, preferences) to provide enhanced, personalized features. May set cookies from embedded services you interact with, such as video players or maps.

Analytics

Measure how visitors use the site (pages viewed, time on page, referring source) so we can improve it. Data may be processed by analytics providers such as Google Analytics, generally in aggregated form.

Marketing

Build a profile of your interests to show relevant advertising on this and other sites, and measure ad performance. Data may be shared with advertising partners such as Google Ads and Meta (Facebook).