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
ADVERTISEMENT
Jul 24, 2013
i'm totally new to scripting. i have a bunch of illustrator cs5 files (actually some of them might be older cs versions). they all have an artboard size of 200 x 200. i need to resize them to 700 x 700 and save them as png24 preserving transparency and keeping the same file name. is this possible? if so, any examples?
View 1 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 16, 2013
the Script of creating mirror text and stroke text in Adobe illustrator scripting.
View 4 Replies
View Related
Jul 25, 2013
I recently designed a logo for a client that included both a gradient and transparency. I flattened the transparency, expanded the strokes and embedded the text before saving a copy of it in .eps and another in .pdf (PDF/x-1a:2003)
When I opened both files in Preview, I found these two problems:
I didn't have this problem when I saved the file in other formats (.jpg, .png) Also, while I'm here, is PDF/x-1a:2003 preset optimized specifically for printing?
View 2 Replies
View Related
Aug 17, 2013
I'd like to purchase a website template online which denotes that I'd have to use Adobe Illustrator, Freehand, or CorelDRAW to implement it. There's just one problem - I can't use any of these programs. As a matter of fact, I would like to use the template that I found with a "drap and drop" website builder, as opposed to coding. I was thinking, "What if i could covert an entire Ai file to a folder of PNG's?" ..then I could just manually build my website using those PNG's. Is this type of conversion even possible?.
View 11 Replies
View Related
Jul 31, 2012
I can't seem to figure out why the illustrator file opens blank if photoshop. I tried converting to EPS and PDF and even Ai CS3 but the file is opening blank. The pdf file also saved as blank document.
View 5 Replies
View Related
Oct 18, 2012
What would be the best Adobe product to convert AI -> dxf ?
View 2 Replies
View Related
Oct 1, 2012
We create hundreds of large .AI-files (ranging from 10-100 MB in size) every few months, and before we can send them to our suppliers, we have to save them as PDF-files (both in order to reduce the size, but also to make sure our suppliers can open them). Now, the straight-forward answer is of course to open each file and export it to PDF manually.. But that takes way to long.
The files are saved on a server in a folder with several subfolders all containing ai-files.Is there a smart way to convert all the files from AI to PDF?
View 1 Replies
View Related
Mar 19, 2014
I'm having trouble getting an image successfully into my vinyl cutting program. I open a black and white image into illustrator, I trace it, I paint a few more black lines that I need and then save it into svg or pdf. Once I import the image into my software it show all the brush strokes that I painted making it impossible to cut. Is there a way to make the image in illustrator all one image once painting it and making it decal cuttable?
View 1 Replies
View Related
May 24, 2012
I made a really awesome logo in Adobe Illustrator earlier today and wanted to share it with my friends, but I didn't know how since none of them had Illustrator. Then I remembered that I once opened a PNG file in Illustrator, so I tried to save it as a PNG.
In case you haven't already guessed, my efforts were in vain. Is there anyway that I can convert an .ai to a .png?
View 2 Replies
View Related
May 23, 2012
I've been trying to export some CS4 Illustrator files to cad for laser cutting. Fab shops here use mostly Solidworks, but can use autocad. I'm selecting dfx/dwg in the export, and scaling to inches, even double checking the scaling is correct from a decimal measurment found on another forum thread, and it is-- but I've tried this about 8 times now with 2 different fab shops and they both say when they open the files the scaling is WAYYYY off, and there are breaks and "splines" all over that are disconnected.
View 11 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
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
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 27, 2004
I have a logo that I need to give to someone else so they can alter it but they don't have a font that is used in the original .ai file.
I know it's possible, but I'm just not sure how, to convert the text in the logo to art so that it won't matter if they have the font or not.
View 3 Replies
View Related
Nov 18, 2013
I'd like to convert a file from RGB to CMYK. Normally, I can go into Assign Profile, and just select CMYK. However, in this case (actually hundreds of files), none of them have CMYK as an option. So, all the files remain in Untagged RGB, when I need them to be CMYK US Web Coated SWOP.
View 1 Replies
View Related
Apr 6, 2013
I have multiple files that I am converting to PDF files to print and all of them converted fine except one. When I convert it to a PDF half of the color changes to black. I can't figure it out and I feel like I've tried everything! And this is what it looks like when I convert it to a PDF.
View 2 Replies
View Related
Jul 16, 2013
I'm woring on a custom textile design that needs to be printed on fabric within the CAD-generated garmet production pattern.
The garmet pattern was created in the CAD progrom PAD.
PAD exports .dxf and .txt files. The dxf file imports into AI as text and code. The .txt file is unusable. It's scale is skewed and important information is missing from the file.
I'm working in AI 5.5 on a Mac. I've imported .dxf files from other cad progrms like Optitex no problem.
PAD exports .dxf AAMA. I need to import this into AI, and the AI forums say Illustrator can read .dxf files.
View 3 Replies
View Related
Jan 7, 2014
I have 14000 Freehand mx file and need to be able to open them in Illustrator cs6.... how can I convert them to ai files ... I do not have CS4 or CS5....
View 1 Replies
View Related
Feb 18, 2014
new to illustrator and im trying to convert a digitally generated pdf. into a vector format/file without the pixel data. I have drawn up a logo/font (in autocad as thats what i know) and made a pdf from it to send to a printing company that only deals in vector format. i can import the image and get a trace of it but the frames add radii to corners and im having trouble isolating the vector/trace result to make a seperate file from (to send off)
so, its there an easier way to get a vector file from my pdf image
View 2 Replies
View Related
Jun 8, 2012
theres this client of mine who accepts work only in corel draw format n I have tried importing expanding and saving saving in different formats etc but nothing seems to work I have a lot of artwork with drow shadow transparency clipping mask and objects filled with patterns I made these are the effects I find extremely difficult to import in corel draw working half in illustrator n half in corel draw is annoyingly time consuming.
View 10 Replies
View Related
May 16, 2013
I'm trying to Extrude my logo in After Effects CS6 to appear 3D. My understanding is I need to import an Illustrator file (.AI) in order to "Creat Shapes from Vector Layer". I'm having trouble opening a .PSD and then saving it as an .AI. The file is empty when I open it in After Effects.
View 3 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
Mar 13, 2014
I am trying to close alert at once but the loop continues the alert, how can I stop the alert at once
var doc = app.activeDocument
var layersToTargetNameArray = ["Background", "Artwork", "diecut", "size", "sign off panel"];
for (var i = 0, il = doc.layers.length; i < il; i++) {
var curLayer = doc.layers[i];
[Code] ......
View 6 Replies
View Related
Feb 11, 2014
Is there anyway in JavaScript to replace one swatch with another?
I've seen other posts where similar questions have been asked, but the solution seems to involve iterating over all the pageItems, testing and then changing the fillColor.
All I want to do is delete/replace a specific color. Say replace Yellow with Green.
Is there a way of doing this without recursing through all of the page items?
View 3 Replies
View Related
Sep 11, 2012
I added CS6 COM reference in my VB.NET application and after that I have the following basic object creation in order to convert a eps file to svg. But for some reason when I create this COM object it is launching the Adobe Illustrator application. Why it is doing like this? It’s a simple COM object why it is interacting with Illustrator Editor?
View 9 Replies
View Related
Jul 30, 2013
I'm working on a script with an UI element. I want all values of the 2. cloumn (Rasterkeilfarbe) returned in one array and all values of the 3. column (Klischeenr.) returned in another arry.
var farben = ["black", "red", "blue", "green", "bla", "blupp"]
var myName = myInput (farben);
// rest of the script
[Code]....
View 5 Replies
View Related
May 26, 2012
Is it possible to script a tabbed ui like this, i can't seem to get it to work,
My script for now:
#target illustrator
tabbed_ui();
//Functions
function tabbed_ui(){
[Code]....
View 2 Replies
View Related
Feb 7, 2012
Is it possible to loop thru the artboards (with Illustrator CS5) and only work with the pageItems on the current iterated artboard?
For example, if I have 3 artboards, with 2 textFrames on each artboard. And I add the textFrames sporadically (I add a TextFrame with contents "Text 1" on artboard 1, then a textFrame with contents "Text 2" on artboard 3, then a textFrame with contents "Text 3" on artboard 1, etc).
Artboard 1:
Text 1
Text 3
Artboard 2:
Text 4
Text 6
Artboard 3:
Text 5
Text 2
Is there a way to loop thru these artboards and get the textFrames tied to the appropariate artboard? So, on the first iteration of the loop, I'm looking at artboard 1 and only looking at "Text 1" and "Text 3", then on the the 2nd iteration I'd be working with artboard 2 and it's textFrames "Text 4" and "Text 6", and so on.
If I loop thru only the doc.textFrames, the order would be incorrect, with the way I added each textFrame. Instead of artboard order, they'd be in this order:
Text 1
Text 2
Text 3
Text 4
Text 5
Text 6
View 4 Replies
View Related