How can I set width or height of an object?
Hi guys,.
y at - it a simple method to define a width/height of an object in absolute terms without messing with .geometricBounds?
Something like this:
app.activeDocument.selection [0] .width = "150 mm;
or
app.activeDocument.selection [0] .width ("150 mm", ConstrainProportion.Yes, AnchorPoint.bottomLeftAnchor);
The object is in my case, usually a vector image copied from Illustrator.
PanDulka
> Don't have you by any chance version of CS3?
In this case to use the PageItem.transform () method in an same special way.
Try this:
function setWidthHeightCS3(/*PageItem*/o, /*str*/w, /*str*/h, /*bool=false*/useVisibleBounds) { if( !o.transform) return; var CS_INNER = CoordinateSpaces.INNER_COORDINATES, BB = BoundingBoxLimits[(useVisibleBounds?'OUTER_STROKE':'GEOMETRIC_PATH') + '_BOUNDS']; var wPt = UnitValue(w).as('pt'), hPt = UnitValue(h).as('pt'); if( 0 >= wPt || 0 >= hPt ) return; var wsBkp = app.transformPreferences.whenScaling, a = o.resolve([[1,1], BB], CS_INNER)[0]. concat(o.resolve([[0,0], BB], CS_INNER)[0]), sx = wPt / (a[2]-a[0]), sy = hPt / (a[3]-a[1]); app.transformPreferences.whenScaling = WhenScalingOptions.APPLY_TO_CONTENT; o.transform( CS_INNER, AnchorPoint.CENTER_ANCHOR, [sx,0,0,sy,0,0], MatrixContent.SCALE_VALUES ); app.transformPreferences.whenScaling = wsBkp; } // Sample code // --- setWidthHeightCS3(app.selection[0], "5cm", "100pt");
@+
Marc
Tags: InDesign
Similar Questions
-
I have problems with the resizing of text box. I can only display width or height not both
I'm new to Flash, I was able to create the text box and adjust the width and height, but now can only set the width. The box height is unusable. Did turn something off? I use the horizontal mode.
Steve
If you have the textfield value "Static Text", then the text space extends vertically so that it contains the text that you type in. You can adjust the width and height will change to accommodate the text content.
If you change the "Input" or "Dynamic" textfield, then you will be able to resize the textfield that you want.
-
How to get the width and height of Flex Mobile view?
Hello
The following instructions can get the width and height of the current Flex app:
var request: UIComponent = FlexGlobals.topLevelApplication as UIComponent;
trace (application. Width);
trace (application. Height);
But I don't know how to get the width and height of mobile display Flex current (i.e. the content size excludes bar action and the Navigation bar). Why the "this.width" always returns 0?
Thank you!
Looks like you're running in this bug: https://bugs.adobe.com/jira/browse/SDK-30070
-
How can I set up a daily playlist for podcasts on Iphone 5
How can I set up a daily playlist for podcasts on Iphone 5
Without further explanation of what you want the list of reading to do, it is difficult to suggest something specific...
You can just go down the list of the Unplayed episodes and start listening to. That you have finished playing the episode, it disappears from the list, so it is always "fresh" next time.
-
At the launch of Thunderbird, how can I set a password that prevents viewing of my emails if someone uses my computer?
100% this addons can help you
https://addons.Mozilla.org/en-us/Thunderbird/addon/master-password/Look at my Thunderbird when I open
-
How can I set the default download locations
How can I set the default download locations?
You can watch here:
- Tools > Options > general: downloads
-
It's my 1st iPhone. How can I set up my voicemail? Thank you!
It's my 1st iPhone. How can I set up my voicemail? Thank you!
nonnamac wrote:
It's my 1st iPhone. How can I set up my voicemail? Thank you!
To set up Visual voicemail on your iphone, you will need to contact your cell phone provider to implement.
-
How can I set a password for firefox so that everyone must enter the password before running firefox
My younger sister run my firefox just to this afternoon (she origin use IE), and she saw something that is not visible. How can I set a password for firefox so that everyone must enter the password before running firefox?
Another option is the master password + extension.
You must first make sure that Firefox uses a master password, for more details on how to do that see use a master password to protect stored logins and passwords. Then with the master password + extension in its options, go to the getting started section and make sure that "ask for password at startup" and "Exit if cancelled" is selected both.
As with all extensions, this protection is quite weak and can be bypassed if start you Firefox in safe mode that disables extensions.
-
I remember my Skype ID but I don't remember my password? How can I set a new password?
I remember my Skype ID but I don't remember my password? How can I set a new password?
If you are still using the same email account, that you used when you created your Skype name, you can have your password of rest through this link:
https://login.Skype.com/account/password-reset-request
Please note: I do not answer requests for help via private Message. -
How can I set contact ringtone purchased on multiple devices?
I have a few iPhones: 5, 6, and 6... How can I set ringtone touch purchased on iTunes Store on multiple devices?
Because you can not download again for free, you will have to try to sync them with your devices, see this article:
-
How can you set it up to play 2 songs always together?
How can you set it up to play 2 songs always together in iTunes, downloaded on your ipod?
You can reach consecutive tracks whole CD you rip a CD, a file which has two songs, otherwise you can not really do. There is an iTunes feature called Shuffle by grouping, but it is not the iPod.
TT2
-
How can I set up my new Officejet Pro 8600 more printing on paper photo 4 x 6?
How can I set up my new Officejet Pro 8600 more printing on paper photo 4 x 6? I'm running on Windows 7 64 bit.
It's strange. Looks like you have a second paper tray and put it to the default tray. The second paper tray only supports the types of paper that show on your list. It's strange because unless you have purchased a second tray paper, plus model has one. Does only the high-end model. Other than that, only certain types of media can be duplex, so if you have double-sided printing, it can limit the selection. I'll watch what else could be the cause and get back to you.
-
How can I set the time axis on my waveform table to show run time that is to say whenever I start the program I should have 0 as the starting point. I've been messing around with the without success. I'm under Labview 2012.
Thank you!
Townes wrote:
I can't understand what you mean. I have no formal training with labview. It took me a long time to write the simple program that I joined. Any guidance would be greatly appreciated!
Its pretty normal for a beginner to take the time to write code. Right-click the map of waveform > Create > property node > historical data, you will get a property node, keep this at the beginning of the code and create a constant. You can also go to the VI properties and > run and select "clear indicators when it is called.
I recommend you to go through the basic materials of LabVIEW which will give you an understanding on the basics of bases/components of LabVIEW.
-
How can I set up a website that charges a small fee when landed on?
Original title: Mother Mary
How can I set up a website that charges a small fee when landed on? I have something to show to the world & I, that the award is not unreasonable
[Moved from the community centre of Participation]
First of all, this is not the arena for that. Do some research on Google and Bing.
Then, if someone has to pay a fee, it should be their choice, whether they pay or not. It'snot automatic. You will need to research the acceptance of credit card, merchant gateways, set bit. And it won't be cheap.
-
How can I set up a wifi connection?
Programs Application Applications Apps game games Legacy Crash crashes Hang Application Compatibility hangs
How can I set up a wifi connectionHello jamesjones882
Please see the link below for setup of wireless networks. Thank you.
Maybe you are looking for
-
6 sec more lost/stolen iPhone. Turned on the 'lost' Mode and displays the number to call if found on-screen. It is w / "Find my iPhone", went up, no response from any home in the area. Later received an email that it was found, still no call to the n
-
Find my friends only exists on iOS?
I think that Apple has really messed with it. I always keep my apps iOS updated in iTunes, in case I have to restore my iPhone or iPad. I received the message that find my friends and podcasts were available in iOS. I know that, I just wanted to upda
-
HP LaserJet P1102w: I do not know my email address for HP EPrint
Hello I have a HP Google Chromebook 14 and I try to my HP LaserJet P1102w EPrint. I did not initially set up this printer and I need email EPrint to print. How to find this e-mail address?
-
I have a cd with pictures on it. I don't have any idea on how to do it. I never seen before pictures. I installed the cd in the cd drive. What to do next?
-
USB drivers are missing (after installing Win7).
Hi all! I bought a laptop HP - pavilion 17-f008sr Energy star (G7Y08EA). There was a Windows 8 operating system. To work on this laptop, I installed a Windows 7 (64 bit) operating system. That I started a system, I saw a problem with my USB in Device