Open a document through FileSystem

Hello guys,
I'm building an HTML5 extension for Photoshop that will serve as a version control for your PSD files. It will soon be avaliable in GitHub =)
The thing is, when the user click on a previous version, the extension should open that version as a new document in Photoshop.
Since Photoshop's API can only open files that exists on the disk (at least that is what i found out), i tried to use FileSystem and FileWriter to retrieve the data from the web and write it into a new PSD on the user's local disk.
Whoever, when i try to get the path from the file i just created (using fileEntry.fullPath), it returns me a path from inside the sandbox (quite a lot of googling told me that's the way things works when writing files from javascript). Then, Photoshop can't find the file.
What should i do?
I am using Photoshop CC, Eclipse, Mac OSX 10.7.5.
The code on my JS is that:
window.requestFileSystem(window.TEMPORARY,1024*1024*1024,onInitFs,errorHandler);
function on InitFs(fs){
     fs.root.getFile('tempVersion.psd',{create:true,exclusive:true},function(fileEntry){
          fileEntry.createWriter(function(fileWriter){
               fileWriter.onwriteend = function(e){
                    new CSInterface().evalScript("$._ext_PHXS,openDocument('"+fileEntry.fullPath+"')");
               var blob = new Blob([toWriteData]);
               //the toWriteData is an Uint8Array of the original PSD file.
               fileWriter.write(blob);
          },errorHandler);
     },errorHandler);
And my jsx it's like that:
openDocument : function(file){
     app.open(File(file));
Thanks for your time!

Hi,
You can manipulate local file with CEPEngine extension libreries, can download below:
http://forums.adobe.com/message/5894888#5894888
ten

Similar Messages

  • A friend wants me to put together on booklet that's been done in excel. I'm on a mac os 10. Do I need to download microsoft excel for mac or can I open the document through indesign?

    A friend wants me to put together on booklet that's been done in excel. I'm on a mac os 10. Do I need to download microsoft excel for mac or can I open the document through indesign?

    I second LibreOffice as it's the most recent fork, however NeoOffice and OpenOffice will also work.
    Just say No money to Redmond!
    Also the old Ready Set Go! will be having a Lion version out soon.
    It's a low cost page layout program (like Indesign but without the high price) and can make booklets etc better, import the excel grpahics from LibreOffice.
    http://www.diwan.com/ready/prsg.htm

  • Why I ca not open my document through adobe today ugent ??

    why I can not open my documents
    through adobe today ?

    This is a web forum not a chat room. Why did you mark your question as the answer?
    You still haven't given us much to go on? Are you opening these files from a website (clicking on a link)? I'm assuming they are pdf files, correct? If so, what web browser and operating system do you have?
    Remember, we aren't sitting there in the room with you so you need to be descriptive and answer all questions...

  • Cannot open Office documents through mapped drives - Opens Office start screen

    Hi all,
    So very strange issue here. (Windows 7 - Office2013 with Office365 subscription)
    We have a user who reported that when they opened anything in Word or Excel etc, it simply does not open and instead goes to the Word (for example) start screen where it asks if you would like to start blank document etc.
    Strange thing is, after some troubleshooting, I found that this issue only occurs when opening from the file server. Desktop is fine. Even stranger is that it only happens when opening the document via the mapped drives. When going through the full path
    in explorer it works fine.
    I have tried the below...
    Office repair and clean re-install
    Starting Word in safe mode - Recent docs that were opened from mapped drive do not work either
    Adding users server credentials in Windows credentials manager (though not sure how to add for mapped drive - only for full path)
    Disconnecting and re-adding mapped drives
    Logging into another computer with this user works fine.
    Logging in as another user on the laptop works fine too.
    Thanks
    Glen

    Hi,
    Since you have mentioned:
    "Logging into another computer with this user works fine.
    Logging in as another user on the laptop works fine too."
    It's just an issue with the specific user on the specific computer, probably the Windows Profile has been corrupted.
    The detailed steps to fix the corrupted user profile, please refer to this article below:
    http://windows.microsoft.com/en-hk/windows/fix-corrupted-user-profile#1TC=windows-7
    If your computer is on a domain:
    Open Microsoft Management Console by clicking the Start button
    , typing
    mmc into the search box, and then pressing Enter.‌  If you're prompted
    for an administrator password or confirmation, type the password or provide confirmation.
    In the left pane of Microsoft Management Console, click Local Users and Groups.
    If you don't see Local Users and Groups
    If you don't see Local Users and Groups, it's probably because that snap-in hasn't been added to Microsoft Management Console. Follow these steps to install it:
    In Microsoft Management Console, click the File menu, and then click
    Add/Remove Snap-in.
    Click  Local Users and Groups, and then click Add.
    Click Local computer, click Finish, and then click
    OK.
    Click the Users folder.
    Click the Action menu, and then click New User.
    Type the appropriate information in the dialog box, and then click Create.
    When you are finished creating user accounts, click Close.
    Restart the PC.
    Hope this helps.
    Regards,
    Melon Chen
    TechNet Community Support

  • Open PDF document through JavaFX

    Hello All,
    I want to open pdf document when user clicks on "Help" link in JavaFX. PDF document is usually locally stored on user's machine.
    How I can achieve this ?
    thnx in advance,
    Venky

    Will it work for Linux ?No, of course.
    I think you must do something like:
    var params = [ 'cmd', '/c', pdfFilePath ]; on Windows
    var params = [ 'open', pdfFilePath ] on Mac
    var params = [ 'gnome-open', pdfFilePath ] on Linux with Gnome
    var params = [ 'kde-open', pdfFilePath ] on Linux with KDE
    then your Runtime.getRuntime().exec(params);
    You can catch exceptions if you are not sure of the platform (particularly Gnome vs. KDE): if raised, try something else...
    That's how Processing does its open() function. (Untested in JavaFX...)

  • Open DMS document through Portal

    Hi Experts,
    I  develop one intereactive form in that i want to show attachement. I found many standard fms for that but i could not able execute same fms on portal. i used following code . This code works fine in backend but in frontend it could not work.
    CALL FUNCTION 'BAPI_DOCUMENT_CHECKOUTVIEW2'
              EXPORTING
                DOCUMENTTYPE    = WA_DOCLIST-DOCUMENTTYPE
                DOCUMENTNUMBER  = WA_DOCLIST-DOCUMENTNUMBER
                DOCUMENTPART    = WA_DOCLIST-DOCUMENTPART
                DOCUMENTVERSION = WA_DOCLIST-DOCUMENTVERSION
                DOCUMENTFILE    = DOCFL
                GETSTRUCTURE    = '0'
                DOCUMENTFILES   = DOCFILE.
    Here in this fms i could not pass rfc destinations so by default it pass "SAPGUI" but in case of frontend it would not pass anything.
    Regards,
    Gurprit Bhatia

    Ans.

  • Can't open webi documents

    Hi,
    We can't open webi documents on BO XI 3.0. We have the following error message :
    com.businessobjects.wp.om.OMReportElementContainer
    (Error: INF)
    But we can open deski documents through infoview.
    Any ideas ?

    We are seeing this error now and it has happened again after restarting the SIA and Tomcat. We will try rebooting whole server tonight.
    SAP KB 1326991 suggests:
    Cause
    The CMSClusterMembers entry in the registry is not updated.
    Resolution
      WARNING   ***********
    The following resolution involves editing the registry. Using the Registry Editor incorrectly can cause serious problems that may require you to reinstall the Microsoft Windows operating system.
    Use the Registry Editor at your own risk. It is strongly recommended that you make a backup copy of the registry files before you edit the registry. For information on how to edit the registry key, view the 'Changing Keys And Values' online Help topic in the Registry Editor (Regedit.exe).
    Make sure that the CMSClusterMembers entry is updated in the registry. Or you can edit it manually.
    The CMSClusterMembers entry can be modified from HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 12.0\Enterprise\CMSClusterMembers.
    Restart Server Intelligence Agent (SIA).
    Has anyone tried this - what is meant by 'updating' the registry entry? Updating to what?
    thanks
    Keith
    XI 3.1 SP2

  • OPENING AND GETTING MS WORD ACTIVE DOCUMENT THROUGH CLIENT_OLE2

    I am opening a word document through webutil host command. Now I need to get the active document of the opened word file.
    How it is possible?. Since I need to fire Callback trigger 'MY_TRIGGER' I can not define 'Word.Application' and get the
    'ACTIVEDOCUMENT'.
    DECLARE
    PID WEBUTIL_HOST.PROCESS_ID;
    app CLIENT_ole2.OBJ_TYPE;
    ADOC CLIENT_ole2.OBJ_TYPE;
    BEGIN
    PID := WEBUTIL_HOST.NonBlocking_With_Callback('D:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE C:\MYWORD.DOC','MY_TRIGGER');
    --APP := CLIENT_OLE2.CREATE_OBJ('WORD.APPLICATION');     
    --ADOC := CLIENT_OLE2.INVOKE_OBJ(APP,'ACTIVEDOCUMENT');          
    END;

    hi
    i did not get u very well but i am trying to help u.what do u want to achieve?
    check this code.
    DECLARE
    app CLIENT_OLE2.OBJ_TYPE;
    docs CLIENT_OLE2.OBJ_TYPE;
    doc CLIENT_OLE2.OBJ_TYPE;
    selection CLIENT_OLE2.OBJ_TYPE;
    args CLIENT_OLE2.LIST_TYPE;
    BEGIN
    -- create a new document
    app := CLIENT_OLE2.CREATE_OBJ('Word.Application');
    CLIENT_OLE2.SET_PROPERTY(app,'Visible',1);
    docs := CLIENT_OLE2.GET_OBJ_PROPERTY(app, 'Documents');
    doc := CLIENT_OLE2.INVOKE_OBJ(docs, 'add');
    selection := CLIENT_OLE2.GET_OBJ_PROPERTY(app, 'Selection');
    -- insert data into new document from long item
    CLIENT_OLE2.SET_PROPERTY(selection, 'Text', :long_item);
    -- save document as example.doc
    args := CLIENT_OLE2.CREATE_ARGLIST;
    CLIENT_OLE2.ADD_ARG(args, 'c:\temp\example.doc');
    CLIENT_OLE2.INVOKE(doc, 'SaveAs', args);
    CLIENT_OLE2.DESTROY_ARGLIST(args);
    -- close example.doc
    args := CLIENT_OLE2.CREATE_ARGLIST;
    CLIENT_OLE2.ADD_ARG(args, 0);
    CLIENT_OLE2.INVOKE(doc, 'Close', args);
    CLIENT_OLE2.DESTROY_ARGLIST(args);
    CLIENT_OLE2.RELEASE_OBJ(selection);
    CLIENT_OLE2.RELEASE_OBJ(doc);
    CLIENT_OLE2.RELEASE_OBJ(docs);
    -- exit MSWord
    CLIENT_OLE2.INVOKE(app,'Quit');
    END;sarah

  • Before this last upgrade, when I would create a file and do a "Save As" it would always open "My Documents" by default, which is what I prefer. But since the upgrade it opens in some annonomus file, to which I have to go through several steps to get to My

    Before this last upgrade, when I would create a file and do a "Save As" it would always open "My Documents" by default, which is what I prefer. But since the upgrade it opens in some anonymous file, to which I have to go through several steps to get to My Documents, and I can't seem to select the default in my preferences. HELP PLEASE!!!

    Before this update of what software from what version to what version using which OS?

  • Can't open documents through the finder

    Hi,
    I hope this isn't the wrong forum for this question.
    I have a new Mini Core Duo running OS X 10.4.5.
    I've installed MS Office 2004 (including the latest patches).
    If I try to open a Word (or Excel, Powerpoint, etc.) document by double-clicking on it in the Finder, I get an "operation could not be completed" message box (the error code is -10660).
    If use Word to directly open the document it works fine.
    I am pretty new to OS X so I am not sure where I should even start looking for the problem...
    Any tips would be appreciated!
    BT
    G5 20", Mac Mini Core Duo 1GB + 100 GB Mac OS X (10.4.5)
    G5 20", Mac Mini Core Duo 1GB + 100 GB   Mac OS X (10.4.5)  

    I found my problem:
    http://blog.wilsonet.com/archives/2003/12/31/error-code-10660/
    I moved the trial version (included with the OS) to the trash, then installed the full version of office.
    I guess whatever keeps track of file associations got confused - the Finder was still trying to use the trial version of Office, so all I had to do was empty the trash and the problem disappeared!

  • IPhoto Library locked in Yosemite; You do not have permission to open the document "iPhoto Library"

    Long story to get to the iPhoto part but may help someone who is in-the-know about what can be done for me...
    I turned on my computer a few weeks ago (iMac 27" late 2012, 2.9GHz Intel core i5) to access some photos in iPhoto and it would not load to the home screen but gave me the Disc Utilities Menu. From memory the options I had were; (1) Restore from Time Machine Back-up, (2) Re-install OSX, (3) Get online Help, (4) Repair or Erase using Disc Utility.
    I tried Repair in option 4... no success.
    I tried option 1 as I have my internal HDD backed up to an external HDD via Time Machine in case anything goes wrong... no success.
    I tried option 2 (which was Mavericks) and it loaded and took me to my desktop.
    When I tried to opened the iPhoto app in the dock there were no photos in it.
    After searching forums and the internet they suggested it may have been an iPhoto upgrade issue so I tried to update iPhoto but found it was already up-to-date.
    After looking, I found that the "iPhoto Library" in "Pictures" had a red circle with the white dash through it and was locked. When the "iPhoto Library" folder was double clicked I got the message "You do not have permission to open the document “iPhoto Library”.
    In all the trouble I have upgraded to Yosemite 10.10.3 (with Photos 1.0) and am obviously still having the same warning/error message come up when the iPhoto Library folder is clicked.
    Right click won't allow me to view package contents.
    The "Import" function in the "Photos" app won't do anything with the folder, and the "iPhoto Library" folder looks and functions the same in all of the back-ups on my external HDD Time Machine.
    I don't care if I need to use "Photos" or "iPhoto" but I do need to get the photos out because they are irreplaceable. If had know this problem was possible (especially while using Time Machine) I would have manually stored and backed my photos up in folders on another external HDD.
    Any help would be greatly appreciated, feel free to ask any additional Questions (but this is the first time I have posted in the forum so hopefully I can work out what is going on if you do reply to this post )
    Cheers.

    Thanks for the suggestion. I had tried this earlier with no success either. Even with the padlock unlocked I can't even change the tab that says "OPEN WITH". I still get the... "You do not have permission to open the document “iPhoto Library” message. You may also it continues to say "Fetching" where it should say my user name at the bottom.

  • Won't Open Any Documents

    Hi all,
    I'm pretty new to Illustrator and I'm currently using Illustrator CS6 v16.0.0 x32 on Windows 7. I'm having an issue where it's not letting me open any documents or basically use it... hence the long description:
    When I load the program, everything looks okay. But when I go to File --> New (to create a new file, or even use one from a template) the program crashes. I get an error message that says: "Adobe Illustrator has stopped working - A problem caused the program to stop working correctly. Please close the program." This error has occurred even when opening existing .ai or .pdf files so I can't open anything at the moment.
    Originally, v16.0.2 was working and then I installed the v16.0.3 update. I didn't use it for a few days after the update and then I created a new document but it started crashing and not saving. I was able to isolate it to at least changing rectangle colors. For example, I drew a box filled with red and saved the file. Then I drew another box filled with blue on the same artboard and when I went to save the file the program would crash. However, I was able to save when I drew multiple red boxes. But once I put a blue box, it wouldn't work. [I don't recall what the error message was, if there was one, since I now have a different issue where I can't open anything]
    I wasn't exactly sure what was causing that so I thought I would uninstall Illustrator and install the v16.0.2 update to it and leave it at that for the moment. So I used the Windows Remove Program and removed Illustrator. I also at some point ran the Adobe Cleanup tool for removing trial versions just to have all my bases covered. I also removed anything else from Adobe that came with Illustrator (like Bridge, Reader, Acrobat, AIR, etc) just in case. Some of those programs probably did not come bundled with Illustrator.
    I re-downloaded the files from Adobe (the Akamai Download Manager kept crashing so I had to do the regular download) and then I extracted them and ran it. It initialized the install and everything seemed to install fine, the same way I did it the first time. I put in the serial number, etc and then I was not able to open any documents. I ran the v16.0.2 update and had the same problem.
    So then I uninstalled everything again and used the Adobe Download Manager to download the trial version of Illustrator CS6 and was not able to open any documents there either once it was installed. This leads me to believe it may be something specific to my computer or some setting somewhere?
    Does anyone have any ideas?

    Hi Myelenium,
    Thanks for the info about Event Viewer!
    It's showing this message:
    Faulting application name: Illustrator.exe, version: 16.0.0.682, time stamp: 0x4f6e762b
    Faulting module name: AGM.dll, version: 4.26.20.19822, time stamp: 0x4f56925c
    Exception code: 0xc0000005
    Fault offset: 0x0024ed0b
    Faulting process id: 0x1a58
    Faulting application start time: 0x01cddf8abaeab2fc
    Faulting application path: C:\Program Files\Adobe\Adobe Illustrator CS6\Support Files\Contents\Windows\Illustrator.exe
    Faulting module path: C:\Program Files\Adobe\Adobe Illustrator CS6\Support Files\Contents\Windows\AGM.dll
    So I searched the forums for any previous AGM.dll posts and tried resetting the preferences (through Alt+Ctrl+Shift) and deleting the entire Adobe Illustrator CS6 Settings folder. I opened Illustrator again and moved some panels around to save a new AIPrefs folder but I was still unable to open any documents.
    Then I tried the next step listed here:
    http://forums.adobe.com/message/4687911#4687911
    And removed the Printer that I usually use and it seems like that did the trick! Yay!

  • POSTING G/L account documents through custom program

    While posting the documents through the tcode fb01,
    when I tick at PA segement button ASSIGNMENT TO
    PROFITABILITY SEGMENT screen opens, DERIVATION
    BUTTON is activated/enabled . But through a custom program when session is
    processed and when PA segement button is ticked on
    ASSIGNMENT TO PROFITABILITY SEGMENT screen, DERIVATION BUTTON is not visible. I can only see Continue, Next Page, Delete Assignment, and Cancel buttons. Where do I need to check this problem?

    Hi,
    Nope, in standard SAP you can not do that.
    You would need to develop your custom program for it.
    Regards,
    SDNer

  • How to open a document from a known path from Plugin, I am using CS4

    Hi
    I have some files in one of the location and wanted to open through plugin
    I have a piece of code which does not throw any error nor opens the document
    I get the message "Before" and "After"
    i would like to know where am i going wrong
    Code below: 
    const ASUnicode *s = (ASUnicode *) "C:\\test.ai";AIColorModel colorModel = kAIUnknownColorModel;
    ai::FilePath path;
    path.Set(ai::UnicodeString(s),
    false);ActionDialogStatus dialogStatus = kDialogNone;
    AIBoolean forceCopy=
    false;sADMBasic->MessageAlert("Before");
    error = sAIDocumentList->Open(path, colorModel, dialogStatus, forceCopy, &document);
    sADMBasic->MessageAlert("After")
    Experts, Please help me
    Thanks
    Srinivas

    hi
    Thanks for the quick reply,
    i tried using that but it resulted in compilation error
    const ASUnicode *s = (ASUnicode *) "C:\\test.ai";ai::FilePath path(s,true);
    Error 5 error C2664: 'ai::FilePath::FilePath(const ai::UnicodeString &,bool)' : cannot convert parameter 1 from 'const ASUnicode *' to 'const ai::UnicodeString &'
    Thanks
    Srinivas

  • When I try to open up a PDF document, i get the following error message: "There was an error opening this document. The network path was not found" AArrgh please help as I need to open up my documents. Thanks.

    When I open up a PDF Document all i get is an error message saying: "There was an error opening this document. The network path was not found" I dont know how to fix this, so looking for some advice please, as I really need o open up my documents.
    Thank for any help.

    The documents I’m trying to read are already saved on my computer, under various different headings, I know that we have a server, so I only assume these documents are saved on here, as I said before I’m not good with all this techno stuff. I do my work each week ( on a payroll system) and save the documents for each company, they automatically go to the correct place. I never request for them to be saved in a certain place ( well not that I’m aware of) . I then on occasions need to open up this information, it is then that I can’t read or open the documents. We do have a tech help, but they are off sick until the 5th Jan, hence me trying to work out if I can fix this problem through this help site. Its ADOBE Reader that I’m trying to use.

Maybe you are looking for

  • I need someone help me about "Call Failed".

    Excuse me. I live in Taiwan and my english is poor. I have a strange problem. When I receive a phone call or call out, I press the "Speaker" to talk then my phone shows "Call Failed" every time. I try to restore my phone, but the "Speaker" still don'

  • How to know the customer item in Basket in Adventure Works sample db

    Dear all, In AW sample DB there is a ShopingCartItem table where user can place product they want to buy. In from that ShopingCardItem there seems to be no information a USer ID which place them in or is there somewhere ? regards

  • Goldengate inserting first and then performing delete, not  in actual order

    Hello Experts, i am doing one direction replication by goldengate and what i did is i inserted a row on source and it get replicated on target after that i inserted one more row and the detele it immediatly and found unique key constrain error at rep

  • Price of a routeur ISR2 licence

    Hi, I am about to purchase a Cisco router 2921 ISR2. I read all the documentation about the installation of a fully featured licence but I dont't manage to find any mention about the price of that licence. So my question is : is that licence free or

  • Solaris 10 on Dual Athlon MP, can't install, keeps rebooting

    Hi All, I've been trying to install Solaris 10 onto my machine: Tyan Thunder K7X (AMD 760MP Chipset) 2x AMD Athlon 2400+ 2,5 GB Memory Adaptec 2100S Raid Controllers When the installation CD boots, you see a couple of dots appearing, then some text s