Illustrator Scripting :: Script Suddenly Halts After Setting Crop Box

Nov 25, 2012

I'm working on a custom batch exporter, and at one point I need to set the crop box (inside an iteration of the current user-selection). Here's the relevant code:
 
var maxRect = getMaxRect ( objRef, overlappingItems );
alert ( maxRect.left.toString ( ) + " " + maxRect.top.toString ( ) + " " + maxRect.width.toString ( ) + " " + maxRect.height.toString ( ) );
doc.cropBox = [ maxRect.left, maxRect.top, maxRect.left + maxRect.width, maxRect.top + maxRect.height ];
alert ( "Crop box set" );
 
getMaxRect is a function that calculates the maximum bounding box between the current object ref and a group of overlapping items that I've already computed. The alert on the second line gives a nice set of numbers, so I'm fairly confident that the code thus far is ok. (In addition, I've inspected the crop marks subsequent to the execution of the above lines, and it looks all right.)
 
Here's the thing. Once doc.cropBox (doc being the active document) is set, it seems like the script execution simply halts. The crop box is actually set in the active document, but it seems to stop after setting this. I never see the second alert, and I don't see any error messages either.

View 4 Replies


ADVERTISEMENT

Illustrator Scripting :: How To Export Snapshot Setting Through IDExportJPG

Mar 9, 2012

How to export below snapshot setting through idExportJPG type since could not find color model, format, and resolution settings in javascript export options.

View 3 Replies View Related

Illustrator Scripting :: Setting Draw Mode Through A Script?

Aug 12, 2011

Is there any way of setting draw mode through a script?

I can't find any info.

What I'd like is to set the draw mode to paint inside for a selected path through a script instead of clicking twice on the toolbar button or hit Shift+D twice.

View 11 Replies View Related

Illustrator Scripting :: JavaScript - How To Trim / Crop Image For Export

Jul 2, 2012

In Illustrator CS5+, I'm looping through the objects in a document, exporting each of them to an image using exportArtBoardasImage().  They need to be trimmed afterwards, as they generally have a tonne of whitespace.  Normally, I run an ImageMagick shell script (mogrify -trim).  It'd be awesome if I could reproduce this functionality from within illustrator.  I've seen people handle this by copy-and-pasting each object into a new file, sizing the artboard to that object, exporting, then closing the file.  I'd rather not do this, as it's *way* too slow. 

View 3 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

Lightroom :: Setting Crop Tool To Crop Only One Aspect At A Time

Sep 15, 2012

How do I set the crop tool in Lightroom to crop only one aspect at a time (e.g. - vertical). Right now all crops do a vertical and horizontal at once.

View 1 Replies View Related

Photoshop :: Crop Tool Is Suddenly Missing?

Dec 20, 2012

my crop tool is suddenly missing.

View 4 Replies View Related

Photoshop :: Crop Tool Has Suddenly Stopped Working

May 3, 2012

My crop tool has suddenly stopped working.  It reduces everything to one pixel.

View 1 Replies View Related

Lightroom :: Setting Crop Size

Mar 21, 2014

I crop all my pics at 8.5 x 11.How can I change my default to that size instead of highlighting the crop overlay and changing it to 8.5 x 11 for each photo.

View 6 Replies View Related

Paint Shop Pro :: Setting The Crop Tool In X3?

May 23, 2011

Having difficulty setting the CROP tool outlines. It seems to snap to the CENTER of pixels? and the edges are difficult to grab, especially when zoomed way in to the corners/pixel level. Also dragging the outline edges seems sluggish and I don't see four numerical readouts in the CORP tool palett like earlier Jasc versions.

p.s. I almost always crop to the hearest 5 pixels, i.e. 675x495.

View 7 Replies View Related

Photoshop Elements :: 11 - Perspective Setting For Crop Tool

Jul 27, 2013

Is there a perspective setting for the crop tool in OS Elements 11?

View 5 Replies View Related

CorelDRAW X5 :: Scripting - Publish To PDF With Color Mode Setting

Jun 21, 2011

I am be able to publish to PDF, but unsure how to set the color mode to CMYK?

View 2 Replies View Related

Illustrator Scripting :: How To Automate Importing Variable And Datasets Into Graphs Via Scripting

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

Illustrator Scripting :: Access Graph Data Through Scripting DOM?

May 6, 2012

Can you access graph data through the scripting DOM?

View 3 Replies View Related

Illustrator Scripting :: Create Mirror Text And Stroke Text In AI Scripting

Mar 16, 2013

the Script of creating mirror text and stroke text in Adobe illustrator scripting.

View 4 Replies View Related

Illustrator :: Cs5.5 - Suddenly Can't Start New Files

Aug 1, 2012

with illy cs5.5 I suddenly can't start new files. The dialogue box opens huge and is blank. other windows are also corrupted. I deleted the prefs file with no change.

View 1 Replies View Related

Illustrator :: Smart Guides Suddenly Disappeared

Sep 1, 2013

I was working on a project and using Smart Guides, but suddenly, they disappeared. I don't know what I did, the Smart Guide box is still checked in the View panel, and if I open a new document, they work just fine again. what other settings I should check?

View 3 Replies View Related

Illustrator :: Why Are Logo Elements Suddenly Uneditable

Mar 7, 2013

the logos i created are suddenly no longer editable, neither paths nor text! i can select each element with the selection tool but anchor points don't show up so i can't edit them, and i can't select the text itself to edit it. nothing's locked, i've ungrouped everything, i can see the specs for everything. yesterday i used save to web a couple of times. today i started recreating the logos and it happened again after i exported (not save to web) once or twice. and today i can select the paths, but they're no longer a single path but a tracing, as if it was bitmapped and then traced. but i haven't rasterized or traced. and the type is still unselectable and uneditable as type. it happened again after updating. i have since reinstalled and reupdated, but i still have to re-create all four logos - and it's possible it could happen again! as it is, one "unrasterized" version of the logos allows me to select the paths but doesn't show the anchor points - and still won't let me edit the text.

View 1 Replies View Related

Illustrator :: Colors Of Macbook Suddenly Changes / When Create A New Web-profile File

Feb 11, 2013

I bought a macbook pro and the student suite about 3 months ago. They work fine together (better than the couple windows-adobe), but i've got a problem. Today colors of my macbook suddenly changes when i create a new web-profile file on Illustrator. I inspect my mac wtih the utility colorsync, and this was the result:
 
/Library/Application Support/Adobe/Color/Profiles/RedBlueYelllow.icc
   Etichetta 'pseq': Il profilo richiesto non è presente. Non può essere riparato.
/Library/Application Support/Adobe/Color/Profiles/Smokey.icc
   Etichetta 'pseq': Il profilo richiesto non è presente. Non può essere riparato.
/Library/Application Support/Adobe/Color/Profiles/TealMagentaGold.icc
   Etichetta 'pseq': Il profilo richiesto non è presente. Non può essere riparato.
/Library/Application Support/Adobe/Color/Profiles/TotalInkPreview.icc
   Etichetta 'pseq': Il profilo richiesto non è presente. Non può essere riparato.

View 1 Replies View Related

Illustrator :: CC Suddenly Crashes When Mouse Cursor Moves A Drawn Object

Mar 14, 2014

I've relaunched and tried re-installing Illustrator CC twice and didn't solve this unexpected crash problem. It has never happened since I paid for this software months ago.
 
Illustrator won't crash when:
- using the keyboard arrows to manually move any path or drawn shapes/ objects
- using my wireless mouse to draw objects/ new paths from clipboards, colour boards etc.
 
Illustrator CRASHES when:
- using my wireless mouse and macbook's touchpad mouse to move any new or old drawn paths/ objects/ shapes/ lines etc.
 
In my Opinion - ROOT OF PROBLEM:
- Wirelss and macbook's touchpad mouse cursor causees it to hang then crash 1 minute later.
 
Why would my mouse cursor suddenly be the cause of this crash problem when it was working fine all along?

Below is the error message, I use this software to run my design business.
 
Process:         Adobe Illustrator [18899]
Path:            /Applications/Adobe Illustrator CC/Adobe Illustrator.app/Contents/MacOS/Adobe Illustrator
Identifier:      com.adobe.illustrator
Version:         17.1.0 (17.0.0)
Code Type:       X86-64 (Native)
Parent Process:  launchd [122]
User ID:         501

[Code] ....

View 5 Replies View Related

Illustrator :: Create New Document - Suddenly Lost Ability For Customer Option

Mar 3, 2014

All of the sudden I can't create a customer profile when creating a new document.  Earlier I selecting the print profile.  I tried opening a new document and creating a custom profile but that option is grayed out. 
 
I created custom brushes yesterday but they don't appear today.  Is that because of the profile that the brushes were created with and without that profile I won't see the brushes? 

View 5 Replies View Related

Illustrator :: AI CS5 Won't Keep Color Setting?

Sep 8, 2013

I'm creating a document with this background color #3399ff, and this color font #b4fff8. Neither of which sticks.They change slightly as soon as I close the color picker box. what I need to check?

View 3 Replies View Related

Illustrator :: How To Install Asian Setting In CS 6

Mar 7, 2013

How to install the Asian Setting in illustrator CS 6 as I can not find it in the preference>>type

View 2 Replies View Related

Illustrator :: How To Keep Pen And Brush Setting As Per Layer

Dec 21, 2013

is there anyway to keep the pen and brush setting remember as per layer , let say i have 2 layers of different stroke setting , after i draw 1 to another , it always revert to 1pt stroke width automatically .
 
i want to keep all the setting : transparency , color , stroke width to be remembered in layer . Therefore, i dont need to change again or remember whenever i draw in between layers.

View 3 Replies View Related

Illustrator :: How To Save Print Setting

Jun 13, 2013

The Print setting in Photoshop remember everything for the file once reopened like 'type of paper, color profile, etc.', but not in Illustrator. It doesn't save the information about the Printing Preferences set with the printer for the printed file.
 
I don't have CS6 yet, but I'd love ask if this can be done in CS6?

View 2 Replies View Related

Illustrator :: Can't Set Brush Setting To Basic

Feb 12, 2014

I'm having a problem changing brush settings back to basic, having pencil tool selected. Still I can draw basic line after I've clicked basic, but the line selection doesn't show. That occured after I chose the brush to be "Charcoal pencil". I still can change the brush to be anything else from the library (like different kind of calligraphics, inked, decorative brushed, even image brushed) but not back to basic. The width-settings are to uniform.

View 2 Replies View Related

Illustrator :: Use Basic Setting On Paintbrush?

Jun 9, 2013

When I use the paintbrush tool, If I try to click "basic" and the straight line it simply does not do it no matter what, it reverts to 3pt round. Can you not use the basic setting on the paintbrush? Only the pencil?

View 4 Replies View Related

Illustrator Scripting :: How To Export JPG

Jan 15, 2014

Quite new to Ai's scripting stuff.
 
I'm having a complicate time with Ai's save to jpg options vs artboard sizes and units conversions.
 
Say, i have a doc (from my client), which they inherited and enhanced for 10 years may be.
 
It's "supposed" to be in millimeters, but artboardRect gives me those values :

-0.27880000000005
436.191388980878
646.457
-0.20900000000074
 
which sound like weird points or pixels.
 
I need to export a jpg (or gif, or png), that will be X pixels wide. For the purpose of the test i set it at 1200.
 
var maxLargeurPx = 1200;
 
First thing, getting the artboard's width :
 
largeurArtboard = Math.abs(thisArtboardRect[2]-thisArtboardRect[0]);
// 646.7358
 
Then i try to have a multiply factor to use
 
coefExport = /*Math.round*/ (100 * maxLargeurPx / largeurArtboard);
// 185.54717397738
 
and then set my ExportFile jpg to this value (i can't give it a number)
 
     // exportOptions.horizontalScale = coefExport
 
That's when it's getting fun : my images are 1204 px wide with or without clipping.
 
Of course, i "can't" resize the doc for each export, especially expecting to have dozens of those, with different values, dimensions, etc.

View 5 Replies View Related

Illustrator Scripting :: Converting PDF To PNG?

Jul 27, 2012

I wrote the following AppleScript to open a PDF file and export is as PNG. I am using Illustrator CS5.
 
The export command gets an error: Adobe Illustrator got an error: Can't get current document.
when it encounters the export command.
 
set inputFile to (choose file with prompt "Open PDF file to convert to PNG:") as text
set exportFile to inputFile & ".png"
tell application "Adobe Illustrator"
if not frontmost then activate
open inputFile as alias without dialogs
export current document to exportFile as PNG24 ¬
with options {class:PNG24 export options ¬
, resolution:300 ¬
, matte color:{red:0, green:0, blue:0}}
close current document saving no
end tell

View 5 Replies View Related

Illustrator Scripting :: How To Add PDF On Top Of Existing PDF

Jun 20, 2012

Im trying to add a pdf on top of an existing PDF in illustrator using a script. This is supposed to be done by anyone at my firm so that is why I want it in a script. I also have a lot of other functions that works that will do some other stuff with this document.
 
Created this from the scripting guide but it doesnt work. Im pretty sure its the embedDoc var thats empty and i dont understand why. Im not sure if the File "points" to the directory of the script or the original file but Ive tried both ofcoarse.
 
This is the masterpiece
 
var embedDoc = new File("/temp/testfile1.pdf");
if ( app.documents.length > 0 && embedDoc.exists ) {
var doc = app.activeDocument;
var placed = doc.groupItems.createFromFile( embedDoc );
}else {alert("suck")}

View 4 Replies View Related

Illustrator Scripting :: Get Layers By Name VBA?

Apr 7, 2012

Is it possible to reference layers or groups by their names instead of their index using VBA? If so, what is the sytax? I know you can do it in Extendscript, but I'm not finding info for VBA.

View 7 Replies View Related







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