How to open file system file from Apex?

Hi,
Can someone help me to find how to open a pdf file e.g. test.pdf from apex when someone click on a button ABC?
The file is located in /C/
Thanks in advance
Dip

You can use the Onclick event and window.location to show the file when the user clicks a button.
<input type=button onClick="window.location= 'file:///C:/Documents%20and%20Settings/rchamarthi/Desktop/test.pdf' + document.form1.cmuds.value;" value="Open File">The actual location of the file is "C:/Documents and Settings/rchamarthi/Desktop/test.pdf"
Since the location is treated as a URL, remember that it should be URL encoded.
Hence all spaces should be replaced by '%20' (32 being the ASCII for space and 20 in hex -> 32).

Similar Messages

  • How to open local system folder from the browser

    Hi All,
    I'm working on some stuff, wherein the user downloads the files from internet to his local machine. I'm able to catch the path of the folder where user wants to download the file from SaveAs prompt. Now my requirement is , i want to provide a link button or
    a button on the web page and assign this is folder path dynamically so that when the user clicks on it, it should open the local system folder where he has downloaded the files.
    string myDocspath
    =Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
    string windir
    = Environment.GetEnvironmentVariable("WINDIR");
    System.Diagnostics.Process prc
    = new System.Diagnostics.Process();
    prc.StartInfo.FileName = windir + @"\explorer.exe";
    prc.StartInfo.Arguments = myDocspath;
    prc.Start();
    Work fine with local system, if i host the application in IIS , the above code snippet wont work
    Thanks in advance,
    Suraj Kumar 
    Software Engineer

    Hello,
     local resources is disabled in all modern browsers due to security restrictions.
     if the reply help you mark it as your answer.
     Free No OLE C#
    Word,  PDF, Excel, PowerPoint Component(Create,
    Modify, Convert & Print) 

  • How to open jpg, tiff files in camera raw from elements 10 organizer

    How to open JPG, TIFF files in camera raw from Elements 10 organizer.

    Thanks for that Damead, I agree with you that Organiser is real pain (there is a total lack of intuitiveness if that is  the correct word).
    For my own work I use 'Lightroom' for around 90% of the time, only going into PSE10 for the 10% difficult bits the Lightroom can't handle.
    I only needed to sort out the JPEG file opening method within PSE10 for some freinds in a small Photo Group that I run in Woodhall Spa, UK. 50% of the 12 members are beginners & a number of them do not have Raw capability on their Camera's, but now they can get their JPEG's into Camera Raw within PSE10 they have the same simple tabular form of adjustment sliders (not as many as in Lightroom of cause) but it gets over the labourious problem of going thru the PSE10's individual tool selection process each and every time since we are trying to get everyone in the Group working with individual Tools rather than the 'Auto' functions. We do this so that they learn what they are doing rather than staying 'dumb&happy' within Auto all the time & they also learn how to get more detailed control for each photo.
    Ref. your comments on file handling/usage, I agree with your comments. Its far and away much more preferable to set up a file structure in 'Finder" (or in 'Explorer' if still using Windows) that you understand so you always know how to find the files. Also, I also never ever use the Camera Auto Load programme but physically 'drag & drop' photo files direct from the 'card' into the file system so I always know thier place (ie: they go into the location I want, not that which the Auto Loader wants).
    As regards your comment about 'Lightroom', I don't have any problems at all since I just imported the whole of my photo file structure into the Lightroom Library Catalouge and then it automatically shows up on the LHS of the screen, still in that format, so you can search it direct within Lightroom and display all of the photo's in variuos arrangements and sizes; everything is as easy to find as it is in 'Finder' plus of cause you have all the 'Tagging' possibilities to use as well. As you add more new files into the 'Finder' structure, all you need to do in Lightroom is reimport, starting 1 level up from the new files and Lightroom will find the new files that need loading (ignoring the older ones already in the Library at that or lower levels) then 1 click and its done.
    Your comments about getting others to follow a set file structure is very pertinant and also applies to evrything else that one ever does apart from just photo work; the times I have had to help others find info/files etc on their PC's because they don' know the location of anything is too many to contemplate.
    Regards

  • How to open a local file from javascript in a jsp-page

    Hi
    I have created an iview from a PAR file. In the par file I have a jsp-page with some javascript code. From the javascript coe I want to open a new window with an Excel file.
    I have tried window.open("c:
    test.xls", "test_window"), but it doesn't seem to work. I have created a small HTML page locally with the same command and there a new window opens with the Excel file.
    If I change the local file path with an URL it also works.
    Any idea how to open a local file ?
    Thanks
    /Jakob

    Jacob,
    I'm not 100% (but 99,9%) and it has to do with security ristrictions of the browser not allowing to have local workstation interation from the web. This is ofcourse very dangerous if the browser would allow it... So therfore it is blocked. What if somone would point to a file/executable that formats your drive so for that reason it is not allowed to have web interaction with a local file. Only with Java Applets this is possible but still with many limitations, and what I remember Google Gears and Adobe Air do have some limited web 2 local file interaction... So best and most simple solution you are left with is pointing to a url instead of a file on a c:\ drive.
    PS The reason why it works when you start the html from your local PC has todo with the fact that the browser detects that the html is not running in the web at that moment therefor allowing the access.
    Cheers,
    Benjamin Houttuin

  • How to Create a OLAP Cube in DEV using SSAS from Raw file system backup from Production?

    How to Create a OLAP Cube in DEV using SSAS from Raw file system backup from Production? I dont have a .abf file available. Two paritions in production are missing data. We were able to get back file system backup which contains the files for these two paritions.
    How do I create a cube in Dev using this file system backup.
    we are on SQL Server 2008R2.
    Thanks,

    How to Create a OLAP Cube in DEV using SSAS from Raw file system backup from Production? I dont have a .abf file available. Two paritions in production are missing data. We were able to get back file system backup which contains the files for these two paritions.
    How do I create a cube in Dev using this file system backup.
    we are on SQL Server 2008R2.
    Thanks,

  • How to open Adobe Reader file from another native IOS application?

    There is an existing thread, but I want to re-open it because I think this is an important feature that we need badly.  I was wondering if there is any plan to add this feature so we can open PDFs directly into Adobe from the web / other apps.
    How to open Adobe Reader file from another native IOS application?
    Basically, we just want to use a custom URL scheme to open a specific document in the App.  Currently, this only opens the app but does not load the file.
    APB

    Not to hijack the conversation but I can explain why this would be useful for both the above case and another.
    What I believe Pavel is talking about is setting up a "URL Scheme" for the Adobe Acrobat iOS application so that you can easily open a PDF specifically in Adobe Acrobat iOS from other native applications and even from web applications opened within Safari. This is particularly useful if your application requires some of the specific features in Adobe Reader iOS to grant them the best experience possible and you want to encourage this.
    Another case: If you're using Adobe Livecycle's document security modules (that encrypts PDF files so that Adobe Acrobat must "phone home" to decrypt and view the document), these PDF's can only be viewed inside the Adobe Acrobat application and appear as blank in most other PDF readers. Having a URL scheme allows your application utilising this functionality to have a 1 click step to view the PDF rather than the current non-user friendly process:
    - Within Safari, touch the PDF link (appears as blank in the default Safari PDF reader, which in itself is confusing)
      - Touch "Open in..."
      - Touch "Adobe Acrobat"
    We have an immediate need for this functionality for the example above. I can resubmit it in a separate post if necessary.

  • How to open or install fonts from a .suit file under Lion?

    How to open or install fonts from a .suit file under Lion? Thanks!

    although I believe I *have* used the .suit extension when I was creating suitcase files for TrueType fonts.
    You can get away with that because you haven't really changed anything. It's already a suitcase file, with a Type code of FFIL (the Creator code is mostly irrelevant). Adding .suit still tells the OS it's a suitcase.
    However, if you do something silly like change the Type code to LWFN (the outline portion of a PST1 set), then neither Font Book, or any other font manager knows what to do with it. It's recognizing the LWFN code, but the data structure of course doesn't match. The file is still a Mac legacy TrueType font. Suitcase Fusion 5 tosses this on the screen when I change the Type code to the wrong one:
    Changing the extension to something obviously wrong, like .otf produces the same message. It's trying to parse the data according to what the extension says it is, and nothing lines up.
    Trying to use .ttf or .ttc also doesn't work. A Mac legacy suitcase TrueType font is not built the same as a .ttf or .ttc font. Either is technically correct (it is a TrueType font), but that's the only similarity. What's happening in that case is Mac legacy TT fonts have all of the data in the resource fork. When you add .ttf or .ttc to the name, the OS and any font manager then tries to find the data in the data fork. Nothing there.

  • Hi  can any body please tell me how to open the .exe files in mac and why it is not supported with unarchiever app , also i am not able to run and dvd's in my mac its not accepting any cd's or dvd'd why do i need to do some settings for it ?

    Hi  can any body please tell me how to open the .exe files in mac and why it is not supported with unarchiever app , also i am not able to run and dvd's in my mac its not accepting any cd's or dvd'd why? do i need to do some pre defined  settings to run the cd's and dvd's ?

    A .exe file is a Windows executable. OS X does not run Windows programs. If you need to use .exe files then you will need to install Windows on your Mac:
    Windows on Intel Macs
    There are presently several alternatives for running Windows on Intel Macs.
    Install the Apple Boot Camp software.  Purchase Windows XP w/Service Pak2, Vista, or Windows 7.  Follow instructions in the Boot Camp documentation on installation of Boot Camp, creating Driver CD, and installing Windows.  Boot Camp enables you to boot the computer into OS X or Windows.
    Parallels Desktop for Mac and Windows XP, Vista Business, Vista Ultimate, or Windows 7.  Parallels is software virtualization that enables running Windows concurrently with OS X.
    VM Fusionand Windows XP, Vista Business, Vista Ultimate, or Windows 7.  VM Fusion is software virtualization that enables running Windows concurrently with OS X.
    CrossOver which enables running many Windows applications without having to install Windows.  The Windows applications can run concurrently with OS X.
    VirtualBox is a new Open Source freeware virtual machine such as VM Fusion and Parallels that was developed by Solaris.  It is not as fully developed for the Mac as Parallels and VM Fusion.
    Note that Parallels and VM Fusion can also run other operating systems such as Linux, Unix, OS/2, Solaris, etc.  There are performance differences between dual-boot systems and virtualization.  The latter tend to be a little slower (not much) and do not provide the video performance of the dual-boot system. See MacTech.com's Virtualization Benchmarking for comparisons of Boot Camp, Parallels, and VM Fusion. Boot Camp is only available with Leopard or Snow Leopard. Except for Crossover and a couple of similar alternatives like DarWine you must have a valid installer disc for Windows.
    You must also have an internal optical drive for installing Windows. Windows cannot be installed from an external optical drive.

  • How to open a .MAT file in LABVIEW

    Hey everyone,
    I currently have a .MAT image file which I would like to open in LABVIEW to apply some image filters. However, I am unsure as to how to open the .MAT file in LABVIEW. Ideally I would like to be able to open the .MAT file without using matlab, and it seems the only way to accomplish this task is through the mathscript node. I have attached an example of the image im trying to open, as well as the LABVIEW program which I would like to use on the image. Thanks for the feedback! =]
    Attachments:
    MAT_Image_Adjust.zip ‏1779 KB

    Hi Boiler,
    1) Do you have a choice in the format you export your data from MATLAB?
    "ASCII Format
    Complete the following steps if you want to import or export data between LabVIEW and the MATLAB® environment, the process is straightforward as long as you are using ASCII format.
    From the MATLAB® environment to LabVIEW
    To save a vector or a matrix Xin ASCII format with tab delimiter, enter the following in the command window or m-script file in the MATLAB® environment:   
    >>SAVE filename X -ascii -double -tabs
        This creates a file whose name is filename, and it contains the data X in ASCII format with a tab delimiter.
    Import the file into LabVIEW using the Read From Spreadsheet File VI located on the Programming»File I/O palette.
    2) Have you tried using the mathscript node? Did you get any errors?
    "Binary Format
    Complete the following steps if you want to import or export data between LabVIEW and MATLAB®.
    From the MATLAB® environment to LabVIEW
    To read a .mat file in LabVIEW would require a VI to parse the file. This may be easier if each variable is saved to a separate file.
    " -- this was done here, no ideas if it still works,
    I want to read a Matlab MAT file into labview
    Hope this helps, James
    Kind Regards
    James Hillman
    Applications Engineer 2008 to 2009 National Instruments UK & Ireland
    Loughborough University UK - 2006 to 2011
    Remember Kudos those who help!

  • How to open a log file form a frame in linux

    Hy,
    Can anyone knows how to open a pdf file in linux from java?? and also a conf file(when I try Runtime.getRuntime().exec("path") -gives me an error like -I don't have the right to open that file , how can I open that file as root??)
    Thanks in advance

    Are you familiar with java.awt.Desktop?
    http://java.sun.com/javase/6/docs/api/java/awt/Desktop.html
    Try its open() method.

  • How to open a pdf file only in one computer

    I would like to sell pdf publications by allowing  the user to open them only in one computer. I learnt that this has been done  the past when I bought  some publications but I don't know the way to do it. Could you help me?
    thank you
    Marco

    thank you for your support
    Best Regards
    Marco
    Da:     Mylenium <[email protected]>
    Per:    MARCO1 <[email protected]>,
    Data:   09/10/2013 11:09
    Oggetto:        How to open a pdf
    file only in one computer
    Re: How to open a pdf file only in one computer
    created by Mylenium in Downloading, Installing, Setting Up - View the full
    discussion
    You will havwe to sign up for some service that supports rights
    management, use protected PDFs via LiveCyle/ Acrobat Connect or learn how
    to create your own ePub stuff using Digital Publishing Suite. In any case,
    it will probably cost you money upfront before you make any revenue.
    Mylenium
    Please note that the Adobe Forums do not accept email attachments. If you
    want to embed a screen image in your message please visit the thread in
    the forum to embed the image at
    http://forums.adobe.com/message/5746873#5746873
    Replies to this message go to everyone subscribed to this thread, not
    directly to the person who posted the message. To post a reply, either
    reply to this email or visit the message page: [
    http://forums.adobe.com/message/5746873#5746873]
    To unsubscribe from this thread, please visit the message page at [
    http://forums.adobe.com/message/5746873#5746873]. In the Actions box on
    the right, click the Stop Email Notifications link.
    Start a new discussion in Downloading, Installing, Setting Up at Adobe
    Community
    For more information about maintaining your forum email notifications
    please go to http://forums.adobe.com/message/2936746#2936746.
    Il messaggio trasmesso può contenere informazioni di carattere
    confidenziale rivolte esclusivamente al destinatario. Ne è vietato l'uso,
    la diffusione, la distribuzione o la riproduzione da parte di altre
    persone e/o entità diverse da quelle specificate. Nel caso aveste ricevuto
    questo messaggio per errore, siete pregati di segnalarlo immediatamente al
    mittente e cancellare quanto ricevuto.
    This electronic mail transmission may contain confidential information
    addressed only to the person(s) named. Any use, distribution, copying or
    disclosure by any other person and/or entities other than the intended
    recipient is prohibited. If you received this transmission in error,
    please inform the sender immediately and delete the material

  • How to open a text file

    hello
    if so have an idea on how to open a text file
    thanks

    File file=new File("[path to the text file]");
    String encoding="[encoding of the file]";
    BufferedReader reader=new BufferedReader(new InputStreamReader(new FileInputStream(file), encoding));
    // Do whatever you like with the reader
    // For example write the text file to the output
    String line;
    while ((line=reader.readLine())!=null)
    System.out.println(line);
    reader.close();Hope it helps,
    Marcin
    PS. This is not the write forum category to post this question.

  • How to open an .indd file in commands

    does any one know how to open an .indd file in commands from a plugin(without opening from the normal procedure..File -> Open ...)
    in my plugin I tried,
      SDKFileOpenChooser fileChooser;
    fileChooser.AddAllFiles();
    fileChooser.ShowDialog();
         It shows the dialog window to choose a file. but i don't know what to use that file to be apperead in Indesign application.
    If you have any idea please let me know..

    Here's a sample function I use:
    // Create an OpenDocCmd:
            InterfacePtr<ICommand> openDocCmd(CmdUtils::CreateCommand(/*kOpenDocCmdBoss*/ kOpenFileCmdBoss));
            if (openDocCmd == nil)
                break;
            // Get an IOpenFileCmdData Interface for the OpenDocCmd:
            InterfacePtr<IOpenFileCmdData> openFileData(openDocCmd, IID_IOPENFILECMDDATA);
            if (openFileData == nil)
                break;
            // Set the IOpenFileCmdData Interface’s data:
            openFileData->Set(docSpec, uiFlags, openFlags ,IOpenFileCmdData::kNotUseLockFile);
            // Process the OpenDocCmd:
            error = CmdUtils::ProcessCommand(openDocCmd);
            if (error)
                break;
    // Create a layout window for the new doc:
            InterfacePtr<ICommand> newWinCmd(CmdUtils::CreateCommand(kOpenLayoutCmdBoss));
            newWinCmd->SetItemList(UIDList(*openDocCmd->GetItemList()));       
            error = CmdUtils::ProcessCommand(newWinCmd);
    Make sure of error checks!
    OR Search for SDKLayoutHelper Class Reference

  • How to open an external file in Labview?

    Hi, Who knows how to open an external file in LabView? I want to open an .UDL file(data link API) which is a dialog window letting me input correlated database information, but I dont know how to open this type of file in my LabView Program.
    Thanks.
    Red

    A UDL is technically a text file, so you could open it with "Read Characters from file", put the result string into a string control, edit it and save it back using the "Write Characters to File".
    UDLs however have their own configuration dialog embedded in the Windows OS. You can use this dialog in your LabVIEW application. The attached VI shows how to create a new UDL. You can edit an existing UDL by switching the method node to PromptEdit and wiring in an open ADO connection reference.
    Attachments:
    ConfigureDatabaseConnection.vi ‏26 KB

  • How to open D7000 RAW file in elements 9

    how to open D7000 Raw file in elements 9

    Barbara B.
    Your suggestion to try another file resolved the Converter  issue.  I found that I can open any jpg or tif file in any album that appears in the
    Windows Explorer.  So the problem was not with the RAW Converter.  Instead, I found another problem.  The ENTIRE Album
    containing the file I had been trying to open  is missing from the Windows Explorer (and I cannot open the file from the Album
    showing in the Organizer --  while I'm in the Editor!).
    So -- can you give me any help with this new problem of an Album that shows in the Organizer but not the Windows Explorer?

Maybe you are looking for

  • Add-MailboxPermission for multiple users on multiple mailboxes

    I have a need to grant a large number of users full access to an equally large number of mailboxes. I've previously been able to do this easily in the management shell where I have multiple users for one mailbox (or vice-versa; one user for multiple

  • Create Mail Labels from Vendor Master - mail-out campaign

    I need to  send letters out to all vendors  of   a specific Account Type. Do any of you have experience with this and/or  can provide an easy solution? Thank you!

  • JProbe vs GC memory graphs

    Hello, When I look at the "Runtime Heap Summary" in JProbe (which shows memory usage) and compare it with graphs plotted in excel using GC output they look completely different. Using the GC output I plotted the before and after memory graphs and nei

  • Live Cam Notebook Pro VF0400 not working in IC(cube)

    Hello, Please help, i cannot use this cam to ic(cube). It is the reason why i purchase this prooduct for ic(cube) use with our client but it isn't working(ic(cube) does not recognize the cam). But it is working fine in yahoo messenger and skype. Any

  • Apple Carplay/Pioneer sph-da120 Problems

    Does anybody else have any problems with Apple Carplay on the Pioneer SPH-DA120 head unit? I have issues with my connection dropping constantly. I have replaced and checked the connecting wires and have the latest updates on both my Pioneer unit and