Illustrator Scripting :: Run Script That Pastes Set Background Into Existing PDF
Nov 16, 2012
In Illustrator, I run a script that pastes a set background into existing PDFs that each contain about 200,000 circles. This then gets saved as a new file. That part of the project works fine.
My problem is that the viewer of these PDF's will want to view them on their screen in landscape mode and I'd like them to open up that way. All my files output in portrait mode, eventhough the original file (with the 200,000 circles) was created as landscape. I do not see PDFSaveOptions() that changes the orientation.
Is my only solution to rotate every item in the file 90° and then resize the artboard to landscape mode?
View 4 Replies
ADVERTISEMENT
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
Mar 2, 2014
What is the javascript to add a new artboard to an existing Illustrator document?
View 2 Replies
View Related
May 8, 2013
<ai cs5><javascript>
I creat 5 pathitem in the K_layer, i want to group them.
code:
var myDoc = app.activeDocument;
var K_layer = myDoc.layers.add();
var k01 = K_layer.pathItems.add(); k01.name='01';[code].....
View 3 Replies
View Related
Feb 12, 2014
I'm working on a script for my company that sets up templates for internal use. I've been able to get most of it completed by drawing basic pathItems and textFrames. The problem I face now is adding our company logo. In the scripting reference I've found examples of duplicating art from one document to another, but that isn't what I need here.
I've approached this by trying to select our company logo in an existing document and in some way capturing the pathPoints so I can use them in the the script that is setting up the templates.However I've not had much luck with this. Ideally everything will be self contained in the one script, so that external files aren't required.
View 3 Replies
View Related
Jun 28, 2012
Is there a way to access text boxes in an existing document and replace them with a new value taken from an excel table? I've been able to create new documents from scratch and populate them with excel data, but formating these new documents to look like those we already made is proving more difficult than I thought using just Javascript.
Ideally I'd be able specific an index for each text box and replace them in order as i itterate through the excel(or CSV) document.
I already have a way to pull from the table, another question asked here, but can't figure out the object model to put the new info in a specific place.
Below is what I came up with to create a very rough looking document from scratch:
#target Illustrator
var csvFile = new File('C:/users/whatever/spreadsheet.csv');
if(!csvFile.exists){
alert('notafile');
app.quit(); }
[Code].....
View 3 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
Jul 8, 2013
Copy and paste error — Text pastes at half-size.
When I copy and paste text already in my photoshop document, the text retains the styling but the text size is exactly half of what it should be.
I'm using the most recent version of CS6.
View 4 Replies
View Related
Jun 28, 2012
When I cut, and copy an image to the clipboard and then paste the image into a new, blank page, it pastes the image multiple times (about 20) on the one page. How can I revert to it pasting just one image?
View 1 Replies
View Related
Apr 12, 2011
I work with Architects who change the background layouts. I need importing the new background to my existing drawing.
View 2 Replies
View Related
Mar 16, 2013
the Script of creating mirror text and stroke text in Adobe illustrator scripting.
View 4 Replies
View Related
Mar 24, 2012
I have a five-frame animation to which I would like to add a background and I don't have enough GIMP knowledge to do it myself, so I've been trying to use the merge-anim script (URL...). When I use it under Debian Linux, with GIMP 2.6.10 (I have also tried it with GIMP 2.6.11 under Windows 7) however, it gives two error messages.
The first is "Plug-In 'Merge layer with others' left image undo in inconsistent state, closing open undo groups."
The second is "Error while executing script-fu-merge-anim: Error: not enough arguments."
The merge never does occur.The script doesn't have any real instructions and I haven't seen any anywhere else (just a number of example results that don't show the steps take), so my first attempt was with all the default values that came up and then other attempts were with changes to various options. None of them made any difference. The error messages were always the same and the script-fu console did not show any messages.
Do any of you know if this script, as old as it is, even still works with GIMP 2.6.10, or is it just a completely dead project that would only work with older versions of GIMP?
If it SHOULD work with GIMP 2.6.10 for Linux or GIMP 2.6.11 for Windows, what I should do to fix these errors and get it to work properly.
If there's no hope for the script, how DO I make a "background" layer the background for each frame of an existing animation. Also, if it makes any difference, the background I'm trying to use is a gradient created by GIMP.
View 4 Replies
View Related
Feb 1, 2014
I want to increase my canvas size, but not with a color. When I choose exisiting background it just chooses one color. I want to extend the exisiting background image out. t
View 4 Replies
View Related
Nov 13, 2011
I didn't realized that as I'm importing images, the 'background' was defaulting to white. I'm working a couple images right now, in which the transparent setting is really needed. I found where to change the default, but not how to change it for existing images in PS already.
View 2 Replies
View Related
May 14, 2012
Is there a way to add new art boards to an existing document (same dimensions and same space betwen artboards)? What I do now is I have to create a new file (with new number of artboards) and cut & paste - is there another way to do this?
View 4 Replies
View Related
May 8, 2013
I'm running CS5 and need to add some Arabic to an existing Ai file. Should I get the Middle Eastern version of Ai or is there a cheaper and easier alternative?
View 2 Replies
View Related
Dec 28, 2013
I am trying to edit a menu for my restaurant that a former employee made with illustrator. I downloaded the free trial, and can open my menu, but can't figure out how to edit the content. I just need to edit words, no graphics or anything.
View 2 Replies
View Related
Mar 22, 2012
I want to write a script that hides the background partitions in every pass but the pass that is currently selected. Is this possible? If so, how would I accomplish this? I have been using VBScript for everything else, but an example of how to do this in any language would be useful.
View 1 Replies
View Related
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
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
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
Oct 23, 2013
How do can I remove bullets in an existing illiustrator file CS5 version
View 1 Replies
View Related
Jan 15, 2014
We are having an issue with CS4 and CS6 with a couple of users who are using Windows 7 64bit. Previously the users were using CS4 on Windows XP 32 bit.
The program seems to open ok and the user is able to create, save and open new files, the issue seems to be when the users try to open files that they previously created. The behavior they see is that the files take between 5 and 10 mins to open (even if stored locally) and the programs hangs when they then try to do anything with the files.
The are using the same hardware, the only difference being that the OS has been migrated to Windows 7 64 bit. CS4 and CS6 were then installed cleanly onto the machines.The users have the same issue with both CS4 and CS6 with their existing files.
View 1 Replies
View Related
Sep 11, 2013
I have designed some packaging artwork using Illustrator which looks fine although I would like to see the artwork as it would look when made up. The artwork will be used for pouches, bags and boxes. Is there a way of creating a generic 3D pouch, bag and box that I can wrap the existing artwork around?
View 2 Replies
View Related
Dec 11, 2013
Since installing Maverick I have encountered a problem with Illustrator CS6. Any file new or existing is subject to freezing. It usually occurs when I try to drag an object from one place to another within the file while working on a project. It can happen at anytime and I'm unable to save the work. I have to Force quit Illustrator and in most cases restart the computer ( 12 month imac).
View 9 Replies
View Related
Feb 6, 2014
I have a logo with text that I am starting to need as Vector image to get things printed etc. At this stage I only have this as photoshop document and jpeg.
How ot get started in Illustrator to either convert or to recreate the logo etc so I can then do whats needed.
View 8 Replies
View Related
Oct 31, 2012
How do I modify the text in an existing logo?
View 3 Replies
View Related
Jun 16, 2013
when will illustrator cc be available to existing member of creative cloud?
View 9 Replies
View Related
Jan 17, 2014
How can I import images onto an existing template?
View 2 Replies
View Related
Oct 10, 2012
Swatches Swatches Read-only. The swatches in this document.
Deletes a swatch from the current document
Set appRef = CreateObject("Illustrator.Application")
Set documentSwatches = appRef.ActiveDocument.Swatches
Set swatchToDelete = documentSwatches(5)
swatchToDelete.delete
How am I supposed to be able to make changes to the swatches collection - it is read only...
Not supprisingly I have failed to implement this in C-sharp
View 5 Replies
View Related