Illustrator Scripting :: AppleScript Placing Page From PDF Into Layer

Sep 20, 2012

I have a PDF file with 25 pages that I need to get into the form of an Illustrator file with 25 layers. I found the example of opening a particular page of a PDF file (using CS6), and that works. And I can create layers. But I can't figure out how to place a particular page of a PDF file into the new layer. Where/how do I provide the page info?
 
(I have a PostScript program that generates artwork for signs that are to be laser etched at the TechShop. The laser interface uses Illustrator and a special Print driver. I notice that opening a page from a PDF file positions the contents slightly differently than placing that page, when I do it manually, so I figured I'd create the multilayered Illustrator file by opening one page (which works) then placing all the pages in their own layers, then deleting the first page. Then the positioning will be consistent. But I'm stuck at placing a PDF page...)
  
tell application "Adobe Illustrator" to activate

-- This function opens the file passed as
-- a file reference parameter, at page myPage.
-- fileToOpen is a reference to a multi-page PDF file
-- and needs to be set up before calling this function.

on openMultipageFile(fileToOpen, myPage)
tell application "Adobe Illustrator"
set user interaction level to never interact

[Code].....

View 2 Replies


ADVERTISEMENT

Illustrator :: Placing Symbols By Name With Applescript

Feb 19, 2009

I need to place a series of symbols in a document in Illustrator CS3... some symbols have multiple instances, some have only one... i need to be able to refer to them by name... right now, i can only seem to place them using this syntax...

make new symbol item in document 1 with properties {symbol:symbol 1 of document 1}

i'd like to use something like this...

make new symbol item in document 1 with properties {symbol:{name:"Text Tag"}

i've tried different syntax after the "symbol" property, but i can't seem to find what works, if there's anything that actually works...

View 3 Replies View Related

Illustrator Scripting :: Convert JavaScript To AppleScript?

Apr 3, 2012

I need to convert javascript to Apple script.
 
try {
app.activeDocument.layers.getByName( '.ARD' ).remove(); } catch (e) {};

View 1 Replies View Related

Illustrator Scripting :: Applescript Export Artboard As PSD

May 25, 2013

How can i export only the artboard as PSD? When i use this script a lot more is exported.

with timeout of (10 * 60) seconds
tell application "Adobe Illustrator"
activate
set dpi to 90 as text
set documentnaam to name of current document

[Code] ....

View 1 Replies View Related

Illustrator Scripting :: Change Overprint Of Color With Applescript

May 4, 2012

I want to overprint a PMS colors using Applescript. I though if I changed the property of the selected items fill color from (fill overprint:false) to (fill overprint:true) it would work. This doesn't seem to change a thing.
 
This is the script I am currently using:
 
script ChangeOverprint
tell application "Adobe Illustrator"
local docRef

[Code]....
 
This is the picture of a simple document I created. The elipse has fill overprint:true. The polygon has filr overprint:false. The original value for the property fill overprint was false. I changed it in the script to true. Which the log shows it changed.

View 1 Replies View Related

Illustrator Scripting :: Using AppleScript To Place PDF As A Link At Crop Bounds Other Than Art Box?

Mar 20, 2012

trying to have an applescript place a PDF as an Illustrator Link at the PDF's Media Box using "make new placed item". The only result possible as far as I can tell is a link at the PDF's Art Box.
 
I've seached around and have seen others with the same issue, but no answers as to whether it is actually possible. As with most Applescript stuff, I am either way overthinking it or it is not possible directly.
 
Currently I have a workaround using an Applescript script controlling Acrobat to sidestep the problem by setting the Art and Crop box to Media box, then place as a link in Illustrator, but it is not a direct route into illustrator.
 
I have also noticed that in the "Adobe Illustrator CS5 Scripting Reference" that the "PDF options object properties" do not honor the PDF crop bounds (except for the default value of Media Box). Is this an inherent problem with Applescript/Illustrator and PDF crop boxes? Could it be that the options for Open PDF and Place PDF are crossed?

View 7 Replies View Related

Illustrator Scripting :: Getting Used Spot Colors In Color Legend On MAC JS Or Applescript

Mar 23, 2012

I've been looking around for a script that will take the used spot colors in a document and place them in a predetermined spot. I've came across several posts about this, such as the COLOR CHIPPER although I think it's focus was on swatches. What is confusing is the part of making New CMYKColor or RGB or if I even need to do that. I've looked at other posts and the Adobe docs, but none seem to work. Adding the text isn't difficult, it's getting these spot colors to reflect what's in the document that is. From what I'm seeing now:
 
I may have to use some other type of script such as Applescript to get rid of unused swatches first throught the actions panel, but I'm not sure.I could possibly use the getByName method to call out the specific rectangle and the and relative callout with the appropriate color instead of having to position everytime. 

View 9 Replies View Related

Illustrator Scripting :: Round Font Size If In Decimal With AppleScript?

Dec 4, 2013

Is it possible to automate the rounding of font sizes if they are in decimal form? I have a few thousand files I have to prepare for upload and they can't have font sizes such as 8.214 which several do. With AppleScript would it be possible to identify and then round up or down such font sizes?

View 2 Replies View Related

Illustrator Scripting :: Export Multiple ARTBOARDS To Multiple JPGs (AppleScript)

Apr 9, 2012

I´m aware that Illustrator doesn´t have multiple artboards options for JPG as it does with eps, or other formats, but is there any workaround for this? Looping current artboard and exporting them to JPG or something.  Or maybe there is someway to force the   "save multiple artboards:true" in JPG?
  
export document currentDoc to file exportFolder as JPEG with options ¬
{class:JPEG export options ¬
, quality:100 ¬
, artboard clipping:true ¬
, artboard range:1 - 2 ¬
, save multiple artboards:true}

View 3 Replies View Related

Illustrator Scripting :: Getting Page Count For A Multi-Page PDF File?

Jun 25, 2009

how to get the page count of a multi page PDF file?  I know you can then open each page using the PDFFileOptions (pagetoopen).  But I need to know up front how many pages there are to loop thru to open each page and process each page.

View 8 Replies View Related

Illustrator Scripting :: Placing A Text File Into CC

Jul 6, 2013

how to place an image into illustrator via scripting with javascript, however I am having difficulties with text files. My code is:
 
var myDoc = app.activeDocument;
var Layer1 = myDoc.layers[0];
function getTextFile() {
    return File.openDialog('Please select the text file to be imported:', undefined, undefined);
}
var myTextfile = getTextFile();
var myPlacedFile = Layer1.placedItems.add();
myPlacedFile.file = myTextfile;
 
But when I select a text file, it says it is an unsupported format. I'm assuming it has something to do with the extra options that come with importing a text document, specific for .txt and .doc for example.
 
For what it's worth I was working on an alternate method by read() ing in the contents of the .txt file and setting them equal to the contents of a textFrame, however it imported the text without carriage returns/newlines and I haven't been able to result that issue.

View 3 Replies View Related

Illustrator Scripting :: Placing All Symbols Into Layers

May 14, 2012

How I can place all my symbols at one time in the File and on there on layers? is this possible?
 
The only dialog box i could find is in the corner of the symbols palette is "Place symbol"... I tried to create an action but it wont go to the next symbol.

View 2 Replies View Related

Illustrator Scripting :: Placing FXG Images And Working With Symbols

Jan 20, 2012

Place fxg images in illustrator using applescript or actionscript? We spent a ton of time trying to troubleshoot it today and counldnt figure out why, but we couldnt seem to place them on a page. That and symbol scripting has been pretty tough to find any reference or examples of scripts.

View 11 Replies View Related

Illustrator Scripting :: Page Item Name Property In UI

Jan 14, 2013

Does name property of a page item appear anywhere in the user interface in Illustratpr CS6? I thought it would be the name you assign to it in the Layers palette, but it does not appear to be.

View 2 Replies View Related

Illustrator Scripting :: Accessing Elements Of A Page Item

Jan 6, 2014

I am working on a script that performs a series of things on all of the artwork in a document.  At one point, it needs to compare the fill color of every item to a sample color.  The problem is, the artwork is a collection of compound path items and path items.  When I look for pathItems[x]. fillColor, it works fine.  When I look for compoundPathItem[x].fillColor, it comes back undefined.  So, I've moved to looking at page items, but I seem to be unable to get to the internals on the page items.  If I have a compound path item, how would I address its properties from its parent page item?  I tried:
 
pageItem[x].compoundPathItem.pathItems[0].fillColor,
pageItems[x].fillColor,   & 
pageItems[x].compoundPathItem.fillColor. 

View 9 Replies View Related

Illustrator Scripting :: CS4 - Remove All Hidden Page Items?

Jan 26, 2012

I'm trying to remove all hidden page items regardless of how many sublayers they are burried in. I wrote a snippet here that seems to only partly work. It removes all hidden page items unless two hidden items exist right after each other in the stacking order.
 
for (i=0; i<doc.pageItems.length; i++){
if (doc.pageItems[i].hidden == true){
doc.pageItems[i].remove();
}
}

View 3 Replies View Related

Illustrator Scripting :: Rotate Whole Document Page In Vbscript

Apr 19, 2012

in an open PDF File  i press 'Ctrl+A' to select all Items in the document, then i choose Edit/Transform/rotate ... 90 degree.now i'd like to do the same with an vbscript.
 
the best thing i could find is:

rotate(90)
Sub rotate (degree)
Dim appRef, argument, element
Dim changePositions, changeFillPatterns, changeFillGradients, changeStrokePattern, rotateAbout
Set appRef = CreateObject("Illustrator.Application")

[code]....
 
not all, but all elements i am interested in are rotated - it would be better if really all elements would be rotated the elements are rotated around 'aiTransformDocumentOrigin' ... i would prefer if they are rotated around 'middle of document'.

View 3 Replies View Related

Illustrator Scripting :: Make All Text On Page Dynamic?

Jul 5, 2011

Is there a way or a script that will make all the text on a page Dynamic? At the moment we have to select each text box and press 'make text dynamic', which can get tiresome with a lot of text boxes. If we select all the text boxes and do the same we get a lot of variables with the same name which gives an error.
 
So we need a script that can make it all dynamic with different named variables.

View 3 Replies View Related

Illustrator Scripting :: Write A Script That Renames A Layer And Group Within The Layer?

Jul 25, 2013

I'm trying to write a script that renames a layer, and group within the layer, then an object within the layer (but not a part of the group) and have it run in a loop.
 
Here's what I've got so far, the group rename doesn't work.
 
 #target Illustrator 
var doc = app.activeDocument;
 idLayers(doc)//IRename layers
idGroups(doc)//Rename groups
 function idLayers(doc){

[code]....
 
I haven't put in anthing to rename the single object yet since I cant even get the group rename to work. I suspect that the group re-name section isn't working because I'm either using bad syntax or an invalid command.

View 3 Replies View Related

Illustrator Scripting :: Filter Page Items By Property In JavaScript

Aug 9, 2012

What is the Javascript equivalent to this AppleScript?
 
set xxx to every page item whose note = "John"
 
After looking at some of the tutorials, I pieced this together. Is there a better way of doing this? With 30,000 path items it took over a minute to execute...
 
docRef = app.activeDocument;
var pathLength = docRef.pathItems.length;
docRef.pathItems[0].note;

[Code].....

View 4 Replies View Related

Illustrator Scripting :: How To Read Swatch Used For Fill Color Of A Page Item

Mar 21, 2012

Is there a way to read the swatch used for fill color of a page item?
 
I can read the fill color but I can't read if the color is a global swatch.

View 2 Replies View Related

Illustrator Scripting :: Can Tint Be Adjusted For Items On Page That Have Spot Color Applied

Sep 27, 2012

I have been trying to mess with and target "tints" via javascript but either I am not understanding something or it cant be targeted as I had hoped, so I am looking for direction and guidance. I have a spot color assigned in the color swatches palette, and have drawn a few boxes on the page using this spot swatch. I then try to alter the tint using JS code.
 
sel[i].tint = // whatever number
alert(sel[i].tint) // This alerts fine
 
The alert shows a change taking place but it never gets applied to the item, the actual item never gets changed. I know things are properly targeted as I can change other attributes fine. When I look in the JS documentation it just shows for when creating a new spot, not for ones that already exist on items, I cant seem to find an example otherwise.
 
Can tint be adjusted for items on the page that have a spot color applied?

View 8 Replies View Related

Illustrator Scripting :: Apply Every Swatch Library Color To Path Items On Page?

Oct 1, 2012

I'm trying to write a script that applies a single swatch to a single path item and repeat for every swatch that is currently contained in the swatch library. This script that I have written is only applying the last swatch in the swatch library to every path item on the page. Currently I'm more concered with getting each swatch that is currently in the swatch library to be applied at least once before worrying about applying the same patch to any extra number of patch items compared to the swatches.length.

// Apply every swatch library color to path items on a page
if ( app.documents.length > 0 && app.activeDocument.pathItems.length > 0 ) {
doc = app.activeDocument;

[Code]....

View 11 Replies View Related

Illustrator Scripting :: How To Delete Layer

Apr 3, 2012

I am writing my own Illustrator scripts.
 
How do I write a script to delete layer with ".ARD" name.

View 8 Replies View Related

Illustrator Scripting :: Import PSD To AI Layer

Sep 8, 2012

I am new to scripting in Illustrator.I am trying to import PSD files into an AI layer.So far this is my solution.
 
var TRGdoc = app.documents.add(DocumentColorSpace.RGB, "1920", "1080");
var onFile = File( '~/Desktop/jpeger/illDanceREFon_00642.psd' );
var REFon = app.open(onFile);
var LAYon = REFon.layers[0];
var LAYstuffon = LAYon.pageItems[0];
LAYstuffon.selected = true;
app.copy();
TRGdoc.activate();
var TRGlayer = TRGdoc.layers[0];
TRGlayer.selected = true;
app.paste();
 
It works most of the time but sometimes it hangs up on the paste. 

View 4 Replies View Related

Illustrator Scripting :: How To Script Using Highlighted Layer

Dec 19, 2012

Is it possible to script using a highlighted layer.
 
I know that selected items can be used for scripting, but I would like to just highlight the layers I want to process but not directly select the items on those layers.

View 2 Replies View Related

Illustrator Scripting :: Delete Some Text From Layer

Jan 3, 2013

what is the script to delete some letters from layer?For ex. I've "Layer XYZ" and I want "Layer XY".

View 9 Replies View Related

Illustrator Scripting :: Making Layer Visible By Its Name?

Mar 3, 2013

How to make a layer visible by using the name of the layer, with javascript?

View 2 Replies View Related

Illustrator Scripting :: Move PageItems From One Layer To Another?

Dec 19, 2012

I am working on a script to standardize layers and I need to move all the pageItems from a layer called "PART_NUMBER" to a layer named "STATIC".
 
following code at the arrow...
 
I am using "test" to troubleshoot the move.
 
standardizeLayerNames() // This function verifies that the Layer names conform to the standard Layer names.
function standardizeLayerNames()      {  
var myDoc7=app.activeDocument  
var myLayerCount7 = myDoc7.layers.length

[Code] ........

View 4 Replies View Related

Illustrator Scripting :: How To Rename The Created Layer

Sep 27, 2012

I create with VBA an Illustrator sheet with custom size:
 
'define size
Dim B_cust, H_cust As Integer
Set appRef = CreateObject("Illustrator.Application")
B_cust = CInt(InputBox("B=", "Higth:"))
H_cust = CInt(InputBox("H=", "Width:"))
Set newDocument = appRef.Documents.Add(aiDocumentCMYKColor, B_cust, H_cust)
 
This works fine
 
I would have fore each new document the same layer order like

cadsymboltext 
Rem ###new Layer###
Set myDoc = appRef.ActiveDocument
Set myLayer = myDoc.Layers.Add()
Set myLayer.Name = "cad"
 
I'm not able to rename the created layer ?

Furthermore I would erase the default Layer LEVEL 1

View 1 Replies View Related

Illustrator Scripting :: Turn On Layer Visibility Without Exact Name?

Jan 4, 2013

I am realtively good with actionscript, so I am trying my hand at this to streamline our image exporting process. I am using CS5 on a PC.
 
We build our illustrator files to be a combination of different layers. Sometimes just one layer is exported at a time, and sometimes layers are combined to form a more complex image. We use layer names with instructions of what layers should be on and off.
 
An example of the layer naming might look like this:
 
03 (01-ON, 02-OFF)
02 (01-OFF)
01
 
I have been able to figure out how to check if there is a note to turn a layer on, my question is how do I select the layer to turn on the visibility without using the exact name of the layer?
 
In my example, when layer 3 gets exported, it should have layer "01" visible and layer "02 (01-OFF)" not visible. Since our files are always constructed differently (meaning 02 might not always have a note about 01 being off), I can't use the getByName option because I don't have an exact name to call the layer and turn the visibility on. The layers always start with 01, 02, 03, etc. Is there a way to use getByName and only have it look at the first 2 characters of the layer name?

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved