Illustrator Scripting :: How To Resize TextFrame While Also Resizing Its Parent (a Groupitem)
Oct 27, 2013
I'm trying to find the smallest textframe within a group and then matching that textframe font size to the minimum size allowed for printing. Everything else works, except I can't figure out how to resize the textframe while also resizing its parent, the group.
#target illustrator
docRef = app.activeDocument;
gpRef = docRef.groupItems[0];
var gpHeight = gpRef.height;
[Code]....
I'm not even sure if I'm going about this the right way. Hoping a fresh set of eyes can take a look
View 3 Replies
ADVERTISEMENT
Oct 5, 2012
To get the top, left and width of an groupitem without Clipping mask. Actually the group has Clipping mask. But i need only the width of the selection (without Clipping mask). I got these properties in scripting but including the clipping mask. The GUI itself shows different (i.e. Info -->: X:0 mm, Y:0 mm, W:full width [including clipping mask]. Transform palette -->: X:43.00, Y:22.0, W:64 [excluding clipping mask])
How to get the properties without clipping mask?
View 1 Replies
View Related
Sep 3, 2013
I am working with scripting in Ai, fill gradient color in TextFrame. I search in this forum but the other topics fill color to path or line. For now, I can make a gradient color, but I don't know how to apply it to textframe.
View 6 Replies
View Related
Feb 23, 2012
I'm trying to read a text file into a textFrame. It reads in but is not including linefeeds so it's just one big long line of text. I'm using the following code to read the file. I attempted to insert a character after each readln() but that didn't work. I also tried creating a variable that the readln() was stuffed into before setting the textFrame.contents to the variable, but that didn't work either. I'm stumped.
while (! notesDoc.eof) {
noteTextRef.contents += notesDoc.readln();}
View 2 Replies
View Related
Apr 15, 2012
This is my very first attempt at a script:
* this script will prompt the user for a file name and location and then save the current file as a .pdf with secure save options*/
var curDoc = app.activeDocument;
var destName = prompt ("Enter a Filename Daniel", "", "Save With Security");
var destFolder = Folder.selectDialog('Select which folder to save to :');
saveFileToPDF(destFolder+ '/' + destName); // not sure if i need this here ?
[Code] .......
i can do the math of (artboard width)-(text width) / 2 is start point of text but how do i find out the text width and the artboard width?
View 11 Replies
View Related
Jan 24, 2011
How to divide all textFrames in one-character-per-textFrame?
Example: the textFrame "Letters" will be divided in 7 textFrames: "L", "e", "t", "t", "e", "r", "s".
View 30 Replies
View Related
Sep 11, 2012
I think I might be doing this wrong, I am trying to get contents of a specific textFrame within first group on layer called "page numbers"
It seems to work, but is a bit sketchy, the documentation indicates textFrame is all the text frames in a document, and that textFrameItem should be the specific one within collections of groups etc, maybe I am misunderstanding. this is what I am using:
var existingPageNumbers = app.activeDocument.layers.getByName('page numbers').groupItems[0].textFrames[0].contents;
is this correct approach...?
View 1 Replies
View Related
Jul 5, 2011
How to find out the textframe contains "stroke color" (or) "fillcolor" via javascript. Any sample.
View 5 Replies
View Related
Feb 20, 2013
Is there a way to send a selected textFrame item to a layer using javascript?
I don't mind if it is send to current layer or some other way to accomplish the task.
(Using Adobe Illustrator CS4)
View 5 Replies
View Related
May 30, 2012
I think the execution would be relatively easy. how to tell detect if a symbol is within a rectangle vector area. so almost like a parent child relationship in HTML goes? was thinking about getting top bottom left and right of a layer called parent then checking all layers below it (maybe they have "child" naming scene, so i can match by layer name) if the top bottom left and right are >=/<= the one above it. so it is basically detecting if a box is inside another box.
URL...need to detect is symbol1 is within div1 or 2 and same with symbol2
View 4 Replies
View Related
Nov 7, 2013
I have the following Adobe Illustrator file: [URL] .....
I would like to copy all visible elements of this file, and paste them onto a new file whose size is that of a standard business card. To do this I create the business card AI file in illustrator and then paste the contents of the AI file listed above onto the file with the business card artboard. SINCE THE ARTBOARD IS MUCH SMALLER, I Select -> All and Resize to 2%.
A. What I don't understand is why the bordeaux square in the middle does not resize proportionally when I carry out this operation. Instead it completely shrinks to a much smaller size.
B. Furthermore, I would like to completely get rid of the orange area that falls outside of the artboard. How can I accomplish this second task?
View 1 Replies
View Related
Jul 11, 2013
I have a few hundred vector files each of various sizes. I want them resize the vector shapes to the scale fit to 300"x200" artboard.I want them all to appear centered on a 300"x200" artboard.
View 2 Replies
View Related
Mar 24, 2011
how to auto fit overset text in a fixed text frame?
I import many languages into fixed text frames and it is a pain to keep resizing or scaling manually.
As of yet I've been unable to source any javascript or applescript that can do it. The closest has been "JET_AutoFitVertical.jsx" but this resizes the text frames.
View 4 Replies
View Related
May 7, 2013
I wish to resize a selection around a custom 2D point. I have had a look at the resize function:
#target illustrator
sel = app.activeDocument.selection[0];
var scale = 200;
var scaleAbout = Transformation.TOPLEFT;
[Code] .....
Which works allright but I assume that I need to use the constants defined in the Transformation class? I cannot just input a 2D point to scale around? Would be handy. I have a feeling that I need to use a transformation matrix to do this.
View 4 Replies
View Related
Jul 25, 2013
I'm trying to resize a opacity mask by doing
transMaskItem.resize(
10, //scaleX,
10, //scaleY,
true, //[,changePositions]
true, //[,changeFillPatterns]
true, //[,changeFillGradients]
true, //[,changeStrokePattern]
0.1, //[,changeLineWidths]
)
This resizes the item, but it does not resize the item inside it. I tried similar command with the translation command
transMaskItem.translate(
100, //([deltaX]
100. //[,deltaY]
True, //[,transformObjects]
True, //[,transformFillPatterns]
True, //[,transformFillGradients]
True, //[,transformStrokePatterns])
and similar thing happened. The item gets moved, but the object inside it doesn't.
How do I resize or translate an opacity mask along with the items inside it?
View 5 Replies
View Related
Aug 13, 2013
I'm trying to resize my artboard to an exact mm size via a script so then I can add this to a batch i'm trying to achieve.
I've been trying to use the following, but i cant work out how to add the size I want in mm?
#target illustrator
var doc = app.activeDocument;
var docVB = doc.visibleBounds;
var myVisibleBounds = doc.visibleBounds; //Rect, which is an array;
myVisibleBounds[0] -= 20; //left coordinate (use negative values to add artboard)
myVisibleBounds[1] += 20; //ltop coordinate
myVisibleBounds[2] += 20; //right coordinate
myVisibleBounds[3] -= 20; //bottom coordinate (use negative values to add artboard)
doc.artboards[0].artboardRect = myVisibleBounds;
View 4 Replies
View Related
May 23, 2013
i have around 500 eps formats images with different artboard size.
i need to resize the artboard to A4 size and the images to be placed in the centre of the artboard.
View 4 Replies
View Related
Jan 20, 2012
I have a textbox having some text and a shape like a curve given below. The text should be tranformed according to the shape pattern choosen.
Following figure shows what exaclty I want to do.
I have a curve, and textbox as shown in LHS of figure and I want output as RHS of figure.
View 4 Replies
View Related
Dec 2, 2011
I want to change the font(let's say Times New Roman) of selected text in textframe when I click on menu-item of my plug-in. I went through the Adobe Text Engine documentation and tried some code for setting font but failed. I don't see any member function in IFont class to set desired font, so unable to move forward. see the code. I would like to know one more thing that how can we set a particular font for a textframe?
TextRangesRef rangesRef = NULL;
result = sAIDocument->GetTextSelection(&rangesRef);
aisdk::check_ai_error(result);
ITextRanges ranges(rangesRef);
[Code].....
View 3 Replies
View Related
Dec 17, 2013
Just updated my LR to 5.3 from the CC and noticed a weird problem that I never encountered before in LR4 or 5.x (before 5.3 that is). I usually export pictures from RAW format to either TIFF or JPG (100% quality) and depending on purpose I use batch resizing, e.g. 1080 pixels on short edge ... well that whole Resize setting gets ignored by LR 5.3! It still exports full size (full RAW size in this case) into JPG or TIFF, but it won't resize .
EDIT:
I found out that I checked the "Don't enlarge" box in Export dialog under Resizing, that's when resizing was not working. After I unchecked it then it works fine, but still what does that have to do with anything if we are talking about downsampling images from 5184x3456 pixels to 1620x1080 ...
View 1 Replies
View Related
May 12, 2013
When I resize canvas my 3d text also resizes.How do you stop the 3d text from resizing when canvas resizes?
View 5 Replies
View Related
Apr 15, 2012
When I resize canvas my 3d text also resizes. How do you stop the 3d text from resizing when canvas resizes???
View 4 Replies
View Related
Dec 18, 2012
I'm try to automate the importing of the Varaible and datasets into my graphs via Scripting, but the ImportVaraibles() function doesn't seem to work. Here is my Script, mostly copied from the example script provided with Illustrator (CS5). And, this works manually, using the file names in the script, via Load Variable Library
Set appRef = CreateObject(strIllistratorVersion)
'Open the file and import the datasets
Set docRef = appRef.Open(strTemplate & "200-500.ai")
'docRef.Datasets.RemoveAll
docRef.Variables("Yearbook").Delete
Here is the problem, after I delete the previous library, then this next line, right from the example, does nothing
The script then exits with 'No Datasets in this document'
docRef.ImportVariables (strXMLFolder & "Lumber_200-500.xml")
'appRef.DoJavaScript "alert('Template:" & strTemplate & strRange & ".ai | XML file:" & strXMLFolder & "" & objFile.Name & "^')"
If (appRef.Documents.Count > 0) Then
Set docRef = appRef.Documents(1)
[Code]....
If I remove that delete line, the script runs, but just uses whatever Variables I had last loaded, not the XML file.
It's simply not loading. What do I need to do to get it to load?
View 8 Replies
View Related
May 6, 2012
Can you access graph data through the scripting DOM?
View 3 Replies
View Related
Mar 9, 2012
I have a parent groupwhich has multiple childs. By default, when parent group is selected, it propagates the Art configuration changed from panels (e.g. Gradient) to its childs, because its childs are also selected.
In some circumstances, I'd need some of those settings to NOT be propagated to one of the childs. How can I realize this?
My parent group is a PluginGroup
View 1 Replies
View Related
Mar 16, 2013
the Script of creating mirror text and stroke text in Adobe illustrator scripting.
View 4 Replies
View Related
Apr 3, 2014
Is it possible to use a textframe on a master page for means of common positioning of texts?
On pages based on this master page, I'd like to put individual text into this frame, or at least the exact location. Then, when I change the position of the textrame on the master page, the position of all textframes of the pages follow suit.
View 15 Replies
View Related
Sep 9, 2012
I have a pdf which is approx 25 pages, the original dimensions are 2500 x 2500. The pages are made up of text over artwork and I need to be able to resize the entire artwork and text to 384 x 512. Or the aspect ratio matching the same like 2048 x 1536. So far I converted the pdf to separate pdfs and opened each in Illustrator CS6 and need to first make the artwork smaller and then the text. Is there a set way to do this as I already tried creating a new doc in ai set for the new dimensions and copying and pasting the artwork. This is not that hard as the artwork I can manipulate but the problem is the text where some of it has strokes and other paths that make up each letter. I tried to ungroup but having a hard time. Would be great if I could just lift the text and just scale down.
View 2 Replies
View Related
Sep 13, 2004
I have only just got into using illustrator, after using photoshop for ages and getting bored with it, I have just made a vector image taken from a stock photo >here< at the moment it consists of 4 layers, one background white layer, a layer which has all the colour fills on, a layer with the outlines on it, and a final layer with some touch ups.
I realise now I should have made it in a much bigger size as I have been working on it at 400% and then scaled it down again on the nav and it just looks pathetic.
is there a way of resizing it as it is? or would I have to mess around with different progs and file formats?
I have had a quick browse to see if theres a thread on this subject, but cant seem to see anything of use.
View 3 Replies
View Related
Sep 4, 2013
the smaller resized pictogram has been deformed do to some weird **** happening in my program.
I have tried unchecking "Align new objects to pixel grid".
I have tried copying to a new document, using mm instead of px.
I have tried checking and unchecking scale strokes and styles (which would have been a weird bug, since there aren't any in this pictogram)!
I have unchecked snap to grid. and snap to point.
I have even changed the values of the "gridline every"...
View 7 Replies
View Related
Jun 30, 2012
I'm New to illustrator. I would like these bricks to get small as they go to the right. When I reshape them it cuts the bricks instead of resizing. How to get this effect of the bricks getting smaller.
What I Have...
What keeps happening...
What I would like...
View 7 Replies
View Related