1

Is it possible to select an object on an artboard and turn that into a png? I have a lot of small titles I want to export as pngs but I dont want to make lots of small artboards for them.

2
  • Does CS6 have slice options? If yes, you can benefit from them.
    – Vikas
    Oct 24 '21 at 6:08
  • Copy, New Document, Paste, Export, close (don't save).. via shortcuts.... c, n, enter, v, e, w, d..... repeat...
    – Scott
    Oct 24 '21 at 17:19
1

You can make artboards for all selected objects with this script:

var sel = app.selection;
var s = sel.length;
while (s--) app.activeDocument.artboards.add(sel[s].visibleBounds);

enter image description here

And then to export all the artboards to PNGs as usual. The export can be done with a script as well.

For example this script (based on this example) will save a selected object to 'd:/1.png':

if (app.selection.length) {

    var ex = new ExportOptionsPNG24();
    ex.artBoardClipping = true;
    var exType = ExportType.PNG24;
    var file = new File("d:/1.png");

    var doc = app.activeDocument;
    doc.artboards[doc.artboards.getActiveArtboardIndex()].artboardRect = selection[0].visibleBounds;
    doc.exportFile(file, exType, ex);
    app.undo();

} else { alert('Please select an object') }

If you have many objects and you need to export them all, you need to decide how to handle with file names.

I can combine these two scripts into one (select objects, make artboards for them and export all these artboards with names like 1.png, 2.png, 3.png...) but I see no much sense.

1
  • Nice and simple, but I agree: what is the purpose? Which workflow these days require having a ton of PNGs containing text?
    – Wolff
    Oct 26 '21 at 16:22
0

A workaround:

enter image description here

In the left I have in Illustrator a "drawing" which contains three objects. In the other window in the right I had an empty drawing. It was opened as a new file.

I dragged the red object to the empty drawing and exported the drawing as PNG.

The PNG has nothing extra when it's opened in Photoshop:

enter image description here

The objects in the original drawing can overlap with no harm if you can select every object separately. There's no need to drag it to the other window, you can as well copy & paste. You can make selections in the layers panel.

Using Photoshop: If you have cut an object to the clipboard and open a new image in Photoshop you get an option to accept exactly the same pixel dimensions as the object had in Illustrator. If you paste an Illustrator object as pixels to an already opened image in Photoshop you can stretch the dimensions of the object with no quality loss as long as you have not nailed the pasting finally by hitting enter.

I'm afraid the shown methods will not be a great help if you must extract hundreds of items as separate PNGs. It needs something clever beyond the scope of this answer.

0

Edit I just realized that the question was phrased within the context of CS6 version of Illustrator. Not sure if that version has “Export Selection” or not. If so then I hope this helps! If not then I guess I’ll just leave this answer here in case someone with a different version of illustrator stumbles along this question with the same needs

You can do this with “Export Selection”. Select the object(or multiple items if you want a combination saved in one PNG), then go File>Export Selection…Make sure “Assets” is selected at the top of the window and not “Artboards”, then choose PNG in the format window. You can also choose other setting like the save location or scaling if you would like.

You can also do this for multiple objects at a time, which sounds like it would be very useful in your situation. Open up Asset Export (Window>Asset Export). Drag each asset you want to be exported into the Asset Export Window. Once you have added all the assets, choose which assets you want to be exported by clicking on them(command or ctrl click to select multiple, or shift-click the first and last asset to select them all). Chosen assets will have a blue box around them. Once you’ve chosen the assets you want to export, choose the format you would like(PNG in this case), and click “Export…”. Illustrator will export each of these assets individually to PNG’s and put them all in one convenient folder for you. No artboards required!

3
  • No "export selection" in CS6. You should still leave it. It may help future visitors :)
    – Scott
    Oct 26 '21 at 7:52
  • @Scott Gotcha, my bad haha
    – Sam Sabin
    Oct 26 '21 at 8:00
  • @Scott Gotcha, my bad haha
    – Sam Sabin
    Oct 26 '21 at 8:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.