Can you write extendscript code to export selected area in the image document

Hello

I don't know if this feature already exists.

I have an extension Panel. I want to select some objects/objects in the document and when I click on the "Export to Image" button on the Panel, selected area must get exported to image.

I tried extendscript API on the document object.

var  file = new File("/d/innovate/iconRollover.png");
var  selection = app.activeDocument.selection[0];
if(selection != null && selection != undefined)
{
       app.activeDocument.imageCapture(file, app.activeDocument.cropbox);
    //app.activeDocument.imageCapture(file, selection.geometricBounds);
}

This script works very well if you select unique object(groupItem/PathItem). BUIT when you select more than two elements, it does not work.

It is supposed to capture the entire area selected in the document and export in png.

Let me know if you need more information.

If you have CC, it works since version 19 on

var  file = new File("/d/innovate/iconRollover.png");
app.activeDocument.exportSelectionAsPNG(file);

Tags: Illustrator

Similar Questions

  • Can you please tell me how I arrange and move the images in a folder like in XP, when I drag and drop a picture, it comes down to its original position

    Organize and rearrange the images in a folder named as in XP. You could organize by date, size, etc. and do drag and drop all in a folder, it is not possible in Windows 7

    Hi Halohodge,

    Welcome to the Microsoft Answers site!

    You can't manually rearrange files/images by dragging them in the folder in Windows 7. This change is design in Windows 7.

    If you have concerns or comments with respect to the question or any other Microsoft application, please see the links below and send the same:

    Microsoft Connect
    http://connect.Microsoft.com/

    Comments for Windows 7

    If you are referring to the reorganize by date, size, etc. then you can always do than simply right click and selecting the option of sort by in the drop-down list when it appears in the photo or file folder.

    Concerning
    Varun j: Microsoft Support
    Visit our Microsoft answers feedback Forum
    http://social.answers.Microsoft.com/forums/en-us/answersfeedback/threads/ and tell us what you think

    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • How can you correct error code 800 F082F I get when trying to install SP1?

    How can you correct error code 800 F082F I get when trying to install SP1?

    Hello

    1. you are trying to install service pack 1 through Windows Update?
    2. What is the exact error message?

    Cause of the error 800F082F: cannot install this update with the other updates. Therefore, if you have already installed other updates without rebooting, and then you try to install this update, you may receive error 800F082F. To resolve this issue, restart your computer, and then install this update again.

    If the problem still persists, then download SP1 from the Microsoft Download Center and install it.
    For 32-bit computers: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=30
    For 64-bit computers: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=21299

  • Can I export and collect all the image files in my Muse site?

    Can I export and collect all the image files in my Muse site?

    Hello Peter,.

    Please go to file > export to HTML format and export your site in a folder you want.

    In the same folder, you will be able to see a folder named "Images" that will contain all the images used in the site.

    Kind regards

    Vivek

  • How do you change your bc intial model selection under options the site after clicking on finish

    How do you change your bc intial model selection under options the site after clicking on finish

    You can't do that. BC is not a system of theming like Wordpress or Joomla. The model is fixed and models of switching at this stage is not an easy feat.

  • Can you help me get "send a link" back to the top?

    I used to have a band at the top of the page with this sentence...

    "send a link" or similar.

    It is at the top left the band (whatever it's called)

    somehow the whole gang has changed...

    I don't know how.

    now the upper-left corner of the Strip was stuff I didn't need...

    It reads "more visited, getting started, latest titles, works road and planned...". »

    I have no need of these.

    I just to need to be able to send a link from an open page, an email opened using mozilla firefox.

    I have windows vista.

    can you help me get "send a link" back to the top?

    Original title: I do not have a title

    Hello

    You should check with the Support of FireFox and their forums.

    Support for Firefox
    http://support.Mozilla.com/en-us/KB/

    Firefox - community and live Chat
    http://support.Mozilla.com/en-us/KB/ask

    Firefox - Forums
    http://support.Mozilla.com/en-us/questions

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

  • Cursor autour breaks and clicks in the Middle words or a page, when you type, selects areas of the document when writing and by typing the following key, all this goes away.

    I have Microsoft Windows Vista Home premium, Version 6.0 (Build 6002: Service Pack 2), was Norton Internet Security. Cursor autour breaks and clicks in the Middle words or a page, when you type, selects areas of the document when writing and by typing the following key, all this goes away. Perhaps because of my attempts to resolve this issue, some of my PC system has had problems, it became unstable, I've had several accidents that I got Norton 360, but it don't did me not the solution and stops working, I re installed Norton Internet Security. Please give some answers and advice on how to solve this problem, thank you.

    Hello

    You use a desktop or laptop computer?

    Is the mouse a mouse wired or wireless?

    What is the brand and model of the computer and the mouse?

    If you are using a laptop, I suggest to change the sensitivity of the mouse pad.

    If this is a wireless mouse it might be interference from another close to the mouse. Make sure that speech recognition is not enabled.

  • Can you have CC installed on 2 computers AND have the app on your phone?

    Can you have CC installed on 2 computers AND have the app on your phone?

    Hello

    You can have the creative cloud installed and signed in on two computers as long as you don't use it on one at a time. Download and install as you did on the first computer, sign in to your Adobe account on the Adobe using your Adobe ID website, download the desktop app from clouds, then download the software. Sign on a computer that should not be used: log in and log out of the desktop Adobe Creative Cloud application

    You can have various applications of creative cloud on your phone as well:-Adobe mobile, iPhone, iPad, Android apps | Adobe Creative Cloud

  • accidentally, I buy the windows version of adobe acrobat DC instead of the mac version. I have only a mac computer. can you please cancel my purchase and replace it with the version of windows with a mac version.  the order number is AD006058877NL. Rgds,

    I accidentally buy the windows version of adobe acrobat DC instead of the mac version I only a mac computer can you please cancel my purchase and replace it with the version of windows with a mac version.  the order number is AD006058877NL. Rgds, jan van montfort + 31681471049. [email protected]

    Hi Jan,

    I understand your concern, please see this doc on this subject: return, cancel or change an Adobe order

    Kind regards

    Rahul

  • Can you please put me in touch with support for the trial version of adobe acrobat pro XI that I had tried on 15 March for 30 days. I tried to cancel because the cost is too, and Acrobat Reader are good for me. I can't uninstall program.

    Can you please put me in touch with support for the trial version of adobe acrobat pro XI that I had tried on 15 March for 30 days. I tried to cancel because the cost is too, and Acrobat Reader are good for me. I can't uninstall program.

    I had to wipe my drive since then with the trouble with Apple Store without acknowledging my machine and Time Machine reloading gave complications. Can you please cancel my trial and make my money from trial.

    Hi jack gordon.

    Adobe does not charge for the 30 day trial, but it seems that you have subscribed to Acrobat Pro (as a simple app for creative cloud membership) return March 15. To cancel your subscription, please contact customer service.

    Please let us know if you have any additional questions.

    Best,

    Sara

  • Captivate in 8, can you apply an effect (for example, a transition) for the grouped shapes? (I can apply the effect to a single shape, but when I group forms, I can't understand how).

    Captivate in 8, can you apply an effect (for example, a transition) for the grouped shapes? (I can apply the effect to a single shape, but when I group forms, I can't understand how).

    Hello

    It is not possible to apply effects to groups of forms. You can apply the transition from the distribution panel and other properties in the property inspector.

    You will need to apply the same effect of the same duration for all objects in a group in this case.

    Thank you.

  • Can you have v4.1 and v3.5 hosts in the same cluster?

    Can you have v4.1 and v3.5 hosts in the same cluster?  Before that I have to try, I thought I would check.  It would be only temporary until all hosts are upgraded.

    > Yes, 3.5 and 4.1 can coexist.

    But they can be managed vcenter 4.1 only, and you must leave the old license server for 3.5 hosts.

    ---

    MCITP: SA, MCTS Hyper-V, VMware vExpert, VCP 3/4

    http://blog.vadmin.ru

  • I can not open the area of the Image, please help.

    But I try to open the area of the Image, I get the following message:

    "an outgoing call cannot be made since the application is synchronous call to entry.

    This happens regardless of whether I am online or offline.

    I use windows XP, have the last driver installed on my PC and have a new HP Officejet J4580 all-in-one printer.

    If I put my cameras memory card in my PC, the images are downloaded, but the area of the Image are not accessible.

    Can someone help me please? Thank you.

    Here is the solution I got from HP. I was very worried when a warning box appears saying that I would lose the program, but I took the plunge and it worked.

    However, it is NOT a permanent solution. All both times that I try to access Image box, I have to perform the solution below, but it takes about 5 seconds, so it is not a problem.

    I hope this works for you...

    My name is Robert of HP email support; It's my pleasure to help you.

    Your email, I note that, at the opening of the area of the Image, you get an error message. I'm really sorry for the inconvenience caused in this respect.
     
    Cause of the issue:
    ========

    This problem may occur because of all-in-one software.

    Solution:
    ======

    I ask you to perform the steps below to open the area of the Image.

    1. press the keys Ctrl, Alt and delete at the same time to open the Task Manager.

    2. click on the processes tab.

    3. click on the process of hpqgalry and then click end task to end the process.

    4. exit the Task Manager. HP Image Zone can now be opened.

    Now find the feature.

    If the problem persists then please uninstall the Image Zone software and install the upgraded version of the HP Photosmart Essential software

  • How can I write ASCII code on my HP G56-130SA laptop that has no numeric keypad?

    I would like to know if it is possible to write the ASCII code on my laptop because there is no numeric keypad.

    Thanks a lot for your help.

    There is a way, but it is not as easy if a numeric keypad was present.  At least, it was the closest match I could find.

    Go to start, search for character map and open this result.

    You should get a screen like this.

    Scroll through the different characters, highlight a character you want and press select.  In the character of the text box copy, you can copy and paste the character from there to your program of your choice.

    I know that's not ideal, but that's really all that I could find.

    You can also use a USB NumPad as this one.

  • Can you write a book in 2015 Pages with internal links?

    Hello

    I am currently writing a book on the Pages and am having problems with the Table of contents.  It no longer seems an internal hypertext links or the possibility to use bookmarks.  I tried to copy the model of the ebook.

    If I'm looking at the table of contents, and I want to change something in Chapter 4, for example there is no way to get there that I was able to understand.

    Any help would be appreciated.

    Thank you

    Tony

    Pages 2015 is not a product. Pages v5.6 and v5.6.1 are names of legitimate product out in 2015. We need this level of detail (menu Pages: pages) to the feature address that may be different between one-off releases.

    V4.3 pages ' 09 was the last product of Pages who have supported intradocuments bookmark linking. You understand, that if you had Pages ' 09 installed before any installation of v5 Pages, product Pages ' 09 is now sitting in your Applications folder: location of iWork ' 09. Use only if you have because it will give you much more control over the functionality of your document you will have with v5.6.n Pages. Features such as pages face to face, alternating left/right page and the linked text boxes.

    When you build a table of contents in the v5.6.1, Pages you can select and Format Panel will change to reflect two tabs: Table of contents and the text. The Table of Contents tab has checkboxes for the paragraph styles that you want to appear in your table of contents and page numbers (# s) where paragraph TOC styles are used in your document. Only these page numbers, when activated, enable by clicking on them and direct you to this page in your document Pages. Unfortunately, the number of page links are disabled in exported PDF documents.

Maybe you are looking for

  • Private browsing can be disabled?

    Is it possible to disable the temporary private browsing function, so it cannot be accessed or used on a mobile device. However, I want to be able to put on sometimes.

  • Mac Pro freezes on the screen saver 10.11.5

    Have a Mac Pro and have a problem when the system freezes and locks up and must power cycle back.    He had related app so tested, but also happens with no apps running third and now thinking seems to be related screensaver.  I have turned off the sc

  • 7.6.0.105 Skype crash after forced update.

    So Skype auto just updated for me and whenever I try to open Skype it opens then crashes immediately. I tried to uninstall and reinstall restarting the computer but the same result... it doesn't let me do anything just, it hangs at startup

  • Where to find driver for Toshiba rfbus bluetooth dongle

    Hello I wonder if anyone knows where I can download the drivers for toshiba rfbus bluetooth dongle driver.

  • code 24

    "receive the error message" driver of security processor Leon "what does?