Skip to main content
Participant
June 3, 2009
Answered

Exporting an .ai file to a bitmap file

  • June 3, 2009
  • 1 reply
  • 7379 views

In Illustrator Scripting (VBscripting), how can you export an ai file to a bitmap file?

In Illustrator you can open an ai file and by selecting the Export option you have a choice of formats and one of them is BMP.  How can this be done in scripting?  I did look at the AIExportType, but BMP is not in the list.

aiJPEG = 1

aiPhotoshop = 2

aiSVG = 3

aiPNG8 = 4

aiPNG24 = 5

aiGIF = 6

aiFlash = 7

aiAutoCAD = 8

I will also need to do this same method by Exporting to an eps file.

The task is the following:

When a client uploads an image file, we need to automatically export the file to bmp and to esp, thus having 3 files (original upload, bmp, and esp).  The file types that we are exporting, so far, will be ai, esp, and pdf (more to follow I am sure).

We also need to get information about each file.

Is it vector or a bitmap?

Color:  RGB, CMYK, or Pantone?

Is there text or curves or both?

What is the DPI resolution?

What is the image size?

Any help would be beneficial.

Thanks,

Tom

This topic has been closed for replies.
Correct answer Larry G. Schneider

You've run into some of the problems with scripting in AI. Not all of the menu items are exposed to scripting. 6 of the 12 export types have no export option. As for EPS, look at the EPSSaveOptions for saving an EPS file.

1 reply

Larry G. Schneider
Community Expert
Larry G. SchneiderCommunity ExpertCorrect answer
Community Expert
June 4, 2009

You've run into some of the problems with scripting in AI. Not all of the menu items are exposed to scripting. 6 of the 12 export types have no export option. As for EPS, look at the EPSSaveOptions for saving an EPS file.

trundoAuthor
Participant
June 10, 2009

Larry,

On a different issue...

If you have a groupitem (contains a textframe and a rectangle object), I can

loop thru the group item, but it seems that it gives a type back as group

item for each item in the group. But it should give back TextFrame and a

rectangle. Any ideas?

Tom

Larry G. Schneider
Community Expert
Community Expert
June 10, 2009

Look at the explanation under the PageItem class. Seems like its typekind is only the overall group and not the typekind of the element.