• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Illustrator 9 & Group Items
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Illustrator 9 & Group Items


  • Subject: Re: Illustrator 9 & Group Items
  • From: Jason Bourque <email@hidden>
  • Date: Sun, 15 Jul 2001 19:14:08 -0400

On 7/15/01 6:46 PM, "Shane Stanley" <email@hidden> wrote:

> On 16/7/01 1:16 AM +1000, Jason Bourque, email@hidden, wrote:
>
>> I am trying to get the width & height of every page item as a group in
>> illustrator 9 and the resize the document to that found width & height.
>>
> I'm not sure why you'd try this; you can't change the size of the document,
> and it's pretty much irrelevant anyway.
>
Well clients can come up with the strangest requests. Hmmm, let me explain.

My client wants a PDF version of the multiple types of charts my scripts
create for them(all different sizes), but they want it cropped to the size
of the chart plus a little buffer room. So when you save it as a pdf the
page size sticks with it unlike saving to a gif, where its cropped to the
size of the artwork.

Your right about the page size, I will create a new document with the chart
dimensions and copy between docs. Work arounds are a pain.


>
> "every page item" includes the group you've created; thus, you're trying to
> include a group in itself. And the move command seems to prefer groups
> referred to by index or reference. Even then, I doubt that it will work;
> "every page item" effectively includes items that are part of other groups
> more than once.
>
> The geometric or visible bounds of a document should give you the bounds of
> the _illustration_, but they seem to insist on returning 0 or a negative value
> for the bottom left corner.
>
Interesting, I will try it but I just found a work around take a look and
tell me what you think. And maybe you can explain to me what happens with
the page origin of the newly created doc. It's not {0,0}

Jason


on cropPage2Artwork()

tell application "Adobe Illustrator. 9.0.2" activate

set selected of every page item of document 1 to true

set selectedItems to selection of document 1

make new layer at end of document 1

set layerIndex to index of result

set groupRef to make new group item at beginning of layer layerIndex
of document 1 with properties {name:"Group Crop"}

set groupedPageItems to duplicate selectedItems to beginning of groupRef

set groupWidth to width of groupRef set groupheight to height of groupRef


-->>Make New Document<<
make new document with properties {color
space:CMYK, width:groupWidth + 4, height:groupheight + 4}


set pageItemRef to duplicate group item "Group Crop" of layer layerIndex of
document 2 to beginning of document 1 with properties {position:{169 + 2,
566 - 2}}

close document 2 without saving


-->>Set the View of the Document<<
--set center point of current view to
{groupWidth / 2, groupheight / 2}
set zoom of current view of document 1 to
1.5

end tell end cropPage2Artwork


  • Follow-Ups:
    • Re: Illustrator 9 & Group Items
      • From: Shane Stanley <email@hidden>
References: 
 >Re: Illustrator 9 & Group Items (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: Illustrator 9 & Group Items
  • Next by Date: Re: Illustrator 9 & Group Items
  • Previous by thread: Re: Illustrator 9 & Group Items
  • Next by thread: Re: Illustrator 9 & Group Items
  • Index(es):
    • Date
    • Thread