Set default filename for file save dialog on Save button click

Hi,
I am using AxAcroPDF (version 9.0) control to view pdf files in windows forms (C#). The pdf loads into the viewer in the form. Now, when I click on the Save button in the viewer, a Save dialog pops up with a default filename having complete path info.
If I have loaded the pdf file into AxAcroPDF viewer with filename:
"C:\Documents and Settings\KB_Kravi\My Documents\CustomerList.pdf"
then in the save dialog, the default filename will be:
"C_Documents_and_Settings_KB_Kravi_My Documents_CustomerList.pdf"
Is there any option to set the default filename in the save dialog to some short name, instead of this lengthy name?
Thanks,
Ravi.

Hi,
I've found a solution.
public void Open(string filePath)
axAcroPDF.LoadFile(filePath);
//this will set the correct name in the save file dialog.
axAcroPDF.src = filePath;
Thanks for your help.
Freedon

Similar Messages

  • Set default filename for file save dialog

    Hi,
    I am using AxAcroPDF control to view pdf files in windows forms.
    Is there any option to set the default filename in the save dialog?
    Thanks for your help.
    Freedon

    Hi,
    I've found a solution.
    public void Open(string filePath)
    axAcroPDF.LoadFile(filePath);
    //this will set the correct name in the save file dialog.
    axAcroPDF.src = filePath;
    Thanks for your help.
    Freedon

  • How to set default path for file open in SQL Developer

    Hi,
    I am new to Oracle SQL Developer. Everytime when I open a file, it will default to the install directory. It is hurtingmy hand because I have to click back to the folder where I put my sql statements.
    Is there any way to set the Home or Work button to point to the location I like? or add anther button to point to my folder? I just don't want to click 5 to 10 times to open a file.

    There are a few things. One is that you can set a working directory for any files you run in the SQL Worksheet i.e. @myfile.sql will pick up this directory.
    You can also set a preference for exporting files.
    Also if you use File -> Open, it should remember where you were the last time, so you hunt the first time, then it remembers for the next time. There is a bug for ctrl-O that always goes back to the original directory, but that has been fixed for the next patch release, so ctrl -O will also remember where you were last.
    The differences here are because we are dependent on the IDE from JDeveloper, and so we don't have full control over the Save and Open dialogs. We are aware of this frustration and are planning to change this for a future release.
    Regards
    Sue

  • Setting default filename for servlet-based download

    I'm new to servlet programming and am attempting to download a file from the server to the client. When I am prompted to open the file from it's current location or save it to disk, the correct filename appears. However, when I click ok and the Save dialog appears, the default filename isn't the actual name of the file but instead contains the name of the package the servlet is located in. Can anyone tell me how I can change my code to have the default filename appear instead of the package name. Thanks.
    Here is the code to call the servlet located in the package named 'frosttwo':
    WebgapBeanFactory wgbf = WebgapBeanFactory.getWebgapBeanFactory();
    String path = wgbf.getTransferFileDirectory();
    String filename = path + request.getParameter("file");
    System.out.println(filename);
    response.sendRedirect("/servlet/frosttwo.Servlet1?file=" + filename);
    Here is the code contained in the servlet:
    public class Servlet1 extends HttpServlet {
    private static final String CONTENT_TYPE = "text/html";
    /**Initialize global variables*/
    public void init(ServletConfig config) throws ServletException {
    super.init(config);
    /**Process the HTTP Get request*/
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    String file = null;
    try
    file = URLDecoder.decode(request.getParameter("file"));
    String filename = file.substring((file.lastIndexOf(File.separatorChar) + 1), file.length());
    response.setContentType("application/octet-stream");
    response.setHeader("Content-disposition", "attachment;filename=" + filename);
    File f = new File(file);
    FileInputStream is = new FileInputStream(f);
    ServletOutputStream s = response.getOutputStream();
    byte[] buffer=new byte[8192];
    int length=buffer.length;
    while((length=is.read(buffer))!=-1)
    s.write(buffer,0,length);
    s.flush();
    catch (IOException ex)
    System.err.println("There was an error sending file " + file);
    ex.printStackTrace();
    catch (Exception ex)
    System.err.println("There was an error sending file " + file);
    ex.printStackTrace();
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    doGet(request, response);
    /**Clean up resources*/
    public void destroy() {
    Thanks again.

    I use something like this for res.setHeader and it works fine for me. In the save dialog box it puts this filename there. But if its not able to find the filename then sometime it used to put servletname instead of filename:
    res.setHeader("Content-Disposition","multi-part attachment;filename=\""+
    fname+"\";");
    hope it helps
    vinod

  • Default settings for File Chooser dialog

    I reach the file chooser dialog by selecting File-Open File.
    Under the toolbar-options menu in the Open File Dialog, I can select to have a bookmark icon appear on the toolbar.
    How do I set a default to have the Bookmark icon always appear?
    Firefox 11 on openSuSE 12.1

    I don't think so, if I hide the Menu bar I don't see a Bookmarks Menu.
    In this picture http://dl.dropbox.com/u/50261731/Open_File%20Menu%20.png an arrow points to an Options menu button. Select that Button and a list of options opens, one of which is "Show Bookmarks". I would like the Show Bookmarks option to be "ON" by default.
    Be aware that I am running SuSE 12.1 and I believe this Menu is provided by KDE integration "kmozillahelper", so my menu may be different from the default Firefox menu.

  • Default location for file browse dialog

    OK, I know this is not solely an APEX issue, but is there a way that one can specify a starting location when invoking the file browse dialog?

    I don't think there is a possibility to modify the file browse item. It is a security issue.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • How to get a file save dialog box on button click

    Hi All,
    I have  some text  and I want to write this text in to a  file.Then I want to save this file to my local system using a file save dialog box so that I can choose the location where I want to save this file.Please tell me how can I do this in WebDynpro.
    If I cannot get the File save Dialog Box then how can I give the path while creating the new file so that it is created on my local system  as the application is running on server.
    Regards
    Rahul

    Hi Rahul,
    Sometime back I was also facing the same requirment and there are only two solutions to it one is what Armin suggested to use the file download UI element the other one you can get from this link How to write a file on our local machine using Web Dynpro
    Regards
    Sid

  • File Open Dialog Box  on Button Click

    Hi
    I am devloping some webpages using JSF and RichFaces..
    I would like to appear File open Dialog box to choose single file and multiple files and another Folder chooser dialog box to choose the folder content..
    Both the operation should be performed while choosing the Button Choose File and Choose Folder...
    I have already tried Input type = file and aphace tomohawk..
    But i all the components are coming with text box and browse button..
    I dont need that. I need to open the dialog box once i clilck my choose file r folder button and it should work browser indepent.....

    HTML doesn't provide you the possibility to select multiple files or select folders at a single browse. Thus JSF can't do any much for you. Best what you can do is to write a signed applet or web start application which does the task. The Mojarra Scales component library has a ready-to-use component which embeds an applet which does that task. Check [https://scales.dev.java.net/multiFileUpload.html].

  • Setting the title for File download dialog when using content-disposition

    I am trying to send a file from server to client (browser). I am setting the content type of the resopnse and using the "content-disposition" header and giving the filename.
    But the issue is, when it is downloading and the dialog box is showing the progress bar, The title of the dialog box is showing something like "40% of localhost:9080.....". It doesn't show the file name in the title bar. Also, if the URL is very long (I am passing some get parameters and the servlet name is also long), I get junk characters like small boxes.
    How to set this title in the servlet?

    Is there a reason why you have to use FileReference.Save versus File.browseForSave?  In Adobe AIR, the File class, which extends the FileReference class,    provides more capabilities and has less security restrictions than the FileReference class.  Using File.browseForSave, it has a title:String parameter which is a string that is diplayed in the title bar of the dialog box.

  • Setting Default applications for file types

    I recently got NeoOffice for my mac and im trying to set file types to open automatically instead of CTRL clicking then open with then the program. Ive had trouble with that to recieving wrong types of files from people on aim and then having to open it with iphoto
    please help

    I'm using 10.4.9 and there is no "Change All"-Option. There is always a checkbox "Always Open With", but it is only related to the single selected file. On a second Mac (same OS version), there is the same behavior.
    Bug???
    Powerbook G4   Mac OS X (10.4.8)  

  • How to set default permissions for files and folders

    We have mac and windows computers on a network where we use Mac OSX Server 10.4 to share files. When files are created on windows computer, no problem, all users can read/write these files. However on our 2 macs (1 10.3 and 1 10.4), other users are blocked from using the files, only the owner has "read/write", group and others are "read only". As far as I can tell, file sharing is turned on ok in Workgroup Manager for the folders we share files from. How can we establish sharing for all users on our network?

    Niel's suggestion is good. You might also try posting your question in the Tiger Server forums. I'm sure Tiger Server has several ways of dealing with this.

  • Extending flash: how do I set default values for filenames

    Hi,
    I am trying to set default values for filenames
    <choosefile> and <popupslider>s that will show up when
    my XMLpanel first loads in my jsfl extension file. It seems that I
    can only set default values for textbox items.
    How do I do this for filenames and popups?
    As a workaround, I also tried using a flash object dialog box
    to look like a <choosefile>, or any jsfl command, but then
    how do I return those values back to the XMLpanel that calls them.
    and pass the data back to my jsfl script.
    lemme know if you know a way,

    Create two constants for the Allocate Mode input (right click > create > constant). Place one in the true case of the case structure, and place the other one in the false case. Wire them to the same tunnel (border of the case structure), then wire the tunnel to the Allocate Mode terminal of the AO Config. I don't have Traditional DAQ installed, but that should do it.
    Misha

  • How do I set the default folder for file - open file... ?

    When I save a file, photo, etc., the default folder for OPENING a file becomes the last folder I SAVED to - even after closing and reopening Firefox. Is there a way to maintain the same default folder for opening files?
    Thanks.

    Originally posted by: kwarner.uneedspeed.net
    Well... I found over 200 bugs none of which seemed to talk about setting
    the default folder. I probably missed the relevant bug in the spew.
    I ask a question here as a last resort -- after I've done what I think
    is an appropriate search for answers.
    But thanks for your help in any case.
    Daniel Megert wrote:
    > DemonDuck wrote:
    >
    >> When I need to open a file not in the workspace, I use File -> Open File.
    >>
    >> But the default folder it opens is in C:\Documents and
    >> Setting\Administrator
    >>
    >> I would like File -> Open File to first open in someplace more
    >> reasonable -- like the workspace.
    >>
    >> How do I set the default folder for File -> Open File ????
    >
    >
    > Is your '?' key broken? Check bugzilla there's a feature request
    > regarding your question.
    >
    > Dani

  • Need to specify default filename for SaveAs

    I am using the command app.execMenuItem("SaveAs"); in the click event of a button. Is there anyway that I can specify a default filename for the user? I do want the user to get the Save As window and the ability to change the name if possible.
    The form is generated by the RenderForm Java script, and the name being generated as a default for the SaveAs window is RenderForm.pdf
    Thanks,
    Velvet

    Chris, I think you missed this one.
    I think you want to change the name when calling app.SaveAs via javascript from the client not on the server. Since app.executeMenuItem("saveAs") will not take any parameters to suggest a file name. I think you will have to use doc.saveAs which will allow the name to be specified. This would require a trustedFunction which may or will not work unless you have known users. You will also need to prompt for the file name before making the call.
    Here is some untested code to get you started...
    You will need to create a trustedFunction (see AcroJS.pdf for details) ..
    saveFunc = app.trustedFunction(function (filename) {
    app.beginPriv();
    try {
    event.target.saveAs({cPath: filename});
    } catch (err) {
    app.alert("Error: " + err);
    app.endPriv();
    Code for your event...
    var suggestedName = "MyPDFName.pdf";
    // Note This will only work if you know where they will be saving it
    var cPathToSaveTo = "/c/temp/";
    var cResponse = app.response({
    cQuestion: "What name would you like to use for this PDF?",
    cTitle: "File Name",
    cDefault: suggestedName,
    cLabel: "File Name:" })
    if(cResponse != null)
    saveFunc(cPathToSaveTo + cResponse );
    Hope this helps.
    Rich Ruiz
    Novanis

  • How to Set default value for taxonomywebtagging control with terms and nested terms

    Hi,
    I have created taxonomy control in custom aspx page and I am able to select terms but I am trying to setup default value to that control.
    Can anybody let me know how to set the default value for TaxonomyWebTagging control in custom.aspx page with nested terms?
    Any help would be greatly apprecited.
    Control code in aspx page:
    <td>
    <asp:Label runat="server" ID="lblLanguages">Field A: </asp:Label><asp:Label runat="server" ID="rfvlblLanguages" CssClass="errorMsg" ForeColor="Red">*</asp:Label>
    </td>
    <td>
    <Taxonomy:TaxonomyWebTaggingControl ID="term" Width="385px" runat="server" /></td>Mapping metedata code:TaxonomySession session = new TaxonomySession(SPContext.Current.Site);
    //Set the Business Unit Field
    SPSite site = SPContext.Current.Web.Site;
    TermStore termStore = session.TermStores["Managed Metadata Service"];
    Group group = termStore.Groups["GROUPName"];
    TermSet termSet = group.TermSets["TERMSETNAME"];
    Term term = termSet.Terms["TermA"];
    Guid termGuid = term.Id;
    term.SspId.Add(termStore.Id);
    term.TermSetId.Add(termSet.Id);
    term.AllowFillIn = true;
    term.AnchorId = countryGuid;
    term.IsMulti = true;
    Thank you.
    AA.

    Hi,
    According to your description, you want to set default value for TaxonomyWebTaggingControl.
    I have a test in my environment. It could be achieved by setting the Text Property of TaxonomyWebTaggingControl.
    Here is the code snippet:
    TaxonomySession session = new TaxonomySession(SPContext.Current.Site);
    SPSite site = SPContext.Current.Web.Site;
    TermStore termStore = session.TermStores["Managed Metadata Service"];
    Group group = termStore.Groups["GroupA"];
    TermSet termSet = group.TermSets["A"];
    Term term = termSet.Terms["A1"];
    TaxonomyWebTaggingControl1.SspId.Add(termStore.Id);
    TaxonomyWebTaggingControl1.SSPList = termStore.Id.ToString();
    TaxonomyWebTaggingControl1.TermSetId.Add(termSet.Id);
    TaxonomyWebTaggingControl1.TermSetList = termSet.Id.ToString();
    TaxonomyWebTaggingControl1.AllowFillIn = true;
    TaxonomyWebTaggingControl1.IsAddTerms = true;
    TaxonomyWebTaggingControl1.IsMulti = false;
    TaxonomyWebTaggingControl1.Text = string.Format("{0}|{1}", term.Name, term.Id.ToString());
    Here is a detailed article for your reference:
    http://blog.bugrapostaci.com/2010/09/23/taxonomywebtaggingcontrol-sharepoint/
    Feel free to Reply the test result.
    Thanks
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Patrick Liang
    TechNet Community Support

Maybe you are looking for

  • Best practice for mouseless ADF applications

    I am developing an ADF application where the users do not want to use the mouse. So I would like to know if there are a best practice for this? I am already using the accessKey functionality and subforms defaultCommand But I have had problems setting

  • F110 - Error Msg "No payment due to delete flag or posting block"

    When I use F110 To auto payment a AP open item, the system show the message "Vendor <Vendor Code> <Company Code>: No payment due to delete flag or posting block" in job log. The AP open item information : amount 480. bline date : 2008/09/29 payment t

  • Airport Express audio cutout, even through ethernet.

    Hi all, I have my laptop wirelessly connected to my linksys router. My airport express is wired to my stereo, and wired to my linksys router. Music will very often cut out and give me a -3256 error. This is very irritating. Help Thanks, Mark

  • Index On In query columns

    Hi Alll, I have one query...can we have Index on: example: SELECT col1, col2 FROM (SELECT Col1 as A, Col2 as B           FROM tb) t1,         (SELECT *           FROM ts) t2 WHERE t1.col1 = t2.col2Question can we have a virtual on Index on t1's colum

  • How to represent # in hyperlink URLs

    I have a series of URLs that I want to use in hyperlinks, that all have a hash character in them. The hash character is necessary to load the page properly. However, when I enter the URL "as is", the hash becomes %23 in the address bar, and the page