Firefox save image to .txt file when dragging to desktop

Hello,
when dragging an image to desktop firefox not save to .JPG, .GIF or .PNG but creates a .txt file :-/
No probleme with other browsers !
Video demo : http://videobam.com/OTMPC
Any idea ?

Hey SMed79,
Thank you for your question. I understand that you are dragging and dropping an image to the desktop and are seeing a txt file. Try this not in a private window.
Please see the application stored options on your Firefox menu bar to see if there is a preference stored that saves this. I was unable to reproduce this.
The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information. <br>
'''Note''': ''This will cause you to lose any Extensions and some Preferences.''
*Open websites will not be saved in Firefox versions lower than 25.
To Reset Firefox do the following:
#Go to Firefox > Help > Troubleshooting Information.
#Click the "Reset Firefox" button.
#Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
#Firefox will open with all factory defaults applied.
Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
Did this fix your problems? Please report back to us!
Thank you.

Similar Messages

  • Every time I try to download the new version of Adobe Flash Player it saves as a .txt file and I do not know how to get it to save in the correct format.

    Every time I try to download the new version of Adobe Flash Player it saves as a .txt file and I do not know how to get it to save in the correct format.

    Please post in the Adobe Flash Player forum.

  • Unable to upload txt file when creating new message

    Hi Expert,
    We installed SolMan 7.1, but we are not able to upload txt file when
    create a new message, detailed steps as below:
    1. Click on “New
      Message” under “Common Tasks” in the left side
    2. Click on
      “Attachment” under “Create Message”
    3. Click on “Add”
      under “Attachment”
    4. Select file and
      click on “OK”
    5. But as the result, it says “No attachments. Select Add to
      upload a new attachment.”
    Could you please help advise the reason and solution?
    BR
    Takashi

    Hi Vikram,
    Thanks for your reply.
    I have tried again and found that, it seems if the file size is 0, it can't be uploaed; if the size if bigger than 0, then it can be uploaded.
    So I close this discussion now. Thank you!
    BR
    Takashi

  • Firefox saves images to wrong location, but only when using "View Image"

    For a while, I have had the problem above. I can save images just fine if I don't use the "view image" function first, with the images going to the intended folders.
    Just to clarify, unlike some of similar problems I have seen described here, I am perfectly happy with Firefox remembering where I wish my pictures to go, on a site to site, or model to model (within the same site) basis.
    The problem lies in that if I use the "view image" function, either in a new tab, or in the existing one, Firefox will often prompt me to save in a random folder where I have previously saved a picture. It will even suggest folders that I have not accessed for days.
    Example:
    I save image A to folder A, by right clicking the image and selecting "save image as".
    I then (immediately after this), right click image A again, select "view image", then right click the resulting picture, and select "save image as". Now there is a fine chance that it want me to save the image to some other (previously used) image folder, even if I have not used the folder for a while, and even though I have just saved the same image to folder A.
    This problem persists with multiple image file types, on multiple sites (I just tried it with someones avatar in this forum, and it wanted me to put it with my holiday pictures from 3 weeks ago).
    I appreciate any assistance you can give - jinxie
    FYI; If I "one-click" a file (like an mp4) to download it, it goes to my main / default download folder as normal.

    This is because Firefox will track where you have saved images or other files from the website domain. Then whenever you select to save the file to your computer, Firefox will start the Save As wizard in the latest folder that you have used last time.
    Here is an example:<br>
    If you save an image from the domain <code>123.com</code> into the folder <code>123</code> it will save there. Then you save an image from the domain <code>456.com</code> to the folder <code>456</code>. Next you save a different image from the domain <code>123.com</code>. The save as wizard will assume that you want to save it with the other image from that domain and will automatically start in the <code>123</code> folder.<br>
    This can make saving files faster and more organized, however not everyone wants this feature enabled.
    To disable this feature you can do the following:
    #Go to <code>about:config</code> in Firefox
    #Locate the <code>browser.download.lastDir.savePerSite</code> string
    #Change the value to <code>false</code>
    This should fix the issue, but please report back if it doesn't.

  • MIclient gets closed ,generates the HTTPError.txt file when save ispressed

    We have created an application which displays data in a table .When the application is launched through mobile client and the save button is pressed after making any change in the existing data than the client gets closed and an HTTPError.txt file gets generated which displays the following trace.
    <?xml version="1.0" encoding="UTF-8"?><!-- Server Error Page --><XBCML version="2" supportBits="42" xmlns:SAP="SAP"><Localization dateFormat="MM/dd/yyyy" decimalSeparator="." groupingSeparator="," locale="en_US"/><Client name="" version="" supportBits="6A"/><Server supportBits="537205" workProtectMode="%WORKPROTECTIONMODE%"><Exception text="An error has occurred: Failed to process the request. [] " callStack="java.lang.IllegalArgumentException: No InternalState found for id &quot;110&quot;. List of available states { [0]-CONSISTENT (0); [101]-NEW (101); [102]-MOIFIED_LOCAL (102); [103]-MOIFIED_GLOBAL (103); [104]-REMOVED_LOCAL (104); [105]-REMOVED_GLOBAL (105); [201]-INSERTED (201); [202]-UPDATED (202); [203]-DELETED_LOCAL (203); [204]-VALUE_DELETED_GLOBAL (204); [299]-HARD_DELETED (299); [301]-REJECTED_INSERT (301); [302]-REJECTED_UPDATE (302); [303]-REJECTED_DELETE (303); }
         at com.sap.tc.mobile.cfs.mbosync.InternalSyncState.getByShortValue(InternalSyncState.java:1169)
         at com.sap.tc.mobile.cfs.mbosync.MBOChangeListener.transistNodeWithClientModify(MBOChangeListener.java:205)
         at com.sap.tc.mobile.cfs.mbosync.MBOChangeListener.beforeUpdate(MBOChangeListener.java:651)
         at com.sap.tc.mobile.cfs.pers.cache.DefaultPersistenceManager.validateUpdate(DefaultPersistenceManager.java:1523)
         at com.sap.tc.mobile.cfs.pers.impl.spi.cache.AbstractPersistable.mdDoModify(AbstractPersistable.java:197)
         at com.sap.models.SORDER_HEADER.setVKORG(SORDER_HEADER.java:346)
         at com.sap.app.customercomp.wdp.IPublicCustomerComp$IQueryResultElement.wdSetObject(IPublicCustomerComp.java:2021)
         at com.sap.tc.webdynpro.progmodel.context.MappedNodeElement.wdSetObject(MappedNodeElement.java:74)
         at com.sap.tc.webdynpro.progmodel.context.NodeElement.wdSetObject(NodeElement.java:649)
         at com.sap.tc.webdynpro.progmodel.context.AttributePointer.setObject(AttributePointer.java:421)
         at com.sap.tc.webdynpro.clientserver.data.PendingUserInput.transportPendingUserInput(PendingUserInput.java:676)
         at com.sap.tc.webdynpro.clientserver.data.PendingUserInput.transport(PendingUserInput.java:364)
         at com.sap.tc.webdynpro.clientserver.data.DataContainer.transportPendingUserInput(DataContainer.java:318)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.transport(ClientComponent.java:579)
         at com.sap.tc.webdynpro.clientserver.phases.TransportIntoContextPhase.execute(TransportIntoContextPhase.java:54)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequestPartly(WindowPhaseModel.java:161)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doProcessRequest(WindowPhaseModel.java:109)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:96)
         at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:469)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:52)
         at com.sap.tc.webdynpro.clientimpl.scxml.client.SmartClient.executeTasks(SmartClient.java:612)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.doExecute(ClientApplication.java:1431)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.doProcessing(ClientApplication.java:1251)
         at com.sap.tc.webdynpro.serverimpl.core.sessionctx.AbstractExecutionContextDispatcher.delegateToApplicationDoProcessing(AbstractExecutionContextDispatcher.java:158)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.sessionctx.ExecutionContextDispatcher.dispatchToApplicationDoProcessing(ExecutionContextDispatcher.java:88)
         at com.sap.tc.webdynpro.serverimpl.core.sessionctx.AbstractExecutionContextDispatcher.dispatch(AbstractExecutionContextDispatcher.java:81)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.dispatch(ApplicationSession.java:507)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.dispatch(ApplicationSession.java:527)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doApplicationProcessingStandalone(ApplicationSession.java:458)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:249)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:699)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:231)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:231)
         at com.sap.tc.mobile.mwd.runtime.fwk.dispatcher.http.WebDynproRequestHandler.handleRequest0(WebDynproRequestHandler.java:157)
         at com.sap.tc.mobile.mwd.runtime.fwk.dispatcher.http.WebDynproRequestHandler.handleRequest(WebDynproRequestHandler.java:110)
         at com.sap.tc.mobile.mwd.runtime.fwk.dispatcher.http.AbstractRequestHandler.handleRequest(AbstractRequestHandler.java:306)
         at com.sap.tc.mobile.mwd.runtime.fwk.dispatcher.http.SimpleHttpServer.handleRequest0(SimpleHttpServer.java:247)
         at com.sap.tc.mobile.mwd.runtime.fwk.dispatcher.http.SimpleHttpServer.handleRequest(SimpleHttpServer.java:215)
         at com.sap.tc.mobile.mwd.runtime.fwk.dispatcher.http.SimpleHttpServer.run(SimpleHttpServer.java:164)
         at java.lang.Thread.run(Unknown Source)
    "/></Server></XBCML>
    The applicationhas been built according to the mobile application development steps for Mobile application for laptops through NWDS.As i m new to it please help me to solve the issue .

    Thotheolh wrote:
    I was thinking that the String format of the key retrieved in the getKey() of treating it literally as a byte[].It does not work like that.
    >
    Example is that you retrieve the String key = "B@12rty]"; The only way you would get this is if you had taken the toString() method on an array of bytes. The toString() method of an array does not give one a String representation of the content of the array - it just gives you a pseudo reference to the array which is of little practical use.
    How do you convert the String into byte[] byte as exactly "B@12rty]" so that when you do a do a System.out.println(byte); it would return "B@12rty]" rather than other things.See my comment above.
    >
    In simple terms , treating the String as a byte[] by literally taking the String is the byte[] without converting it into something else so to save the trouble.Strings contain characters. Bytes are not characters so Strings should not be used as containers for bytes.

  • Visual Studio opening files when dragged and dropped in WPF app debugging session

    I'm working on a WPF app (using VS2013 CE) which is intended to manage media files (TV Shows, movies, etc) and as part of this I am enabling the user to drag and drop media files on to the running app (by adding AllowDrop="True" and PreviewDragEnter="Window_PreviewDragEnter"
    to my Window definition).
    The problem I have is that when I drag files onto the app in a debugging session Visual Studio then opens the file(s) when I stop debugging... this is seriously annoying as when I am testing with large media files (> 1GB) it just locks up VS for minutes
    at a time while it tries to open the file or files. When I run the app outside the debugger this does not happen - it's only when I'm in a VS debugging session.  The only way I can stop this happening is to kill VS completely from Task Manager then restart
    it - this is also very annoying but often I need to do this as it will freeze up for 5-10 minutes while it insists on loading the files in VS.
    I understand the app, whilst debugging, is running in the context of VS but why does VS then have to try to open the files when debugging is finished?   I have looked through the options but can't see anything to switch this off and no amount of searching
    has turned up anything - can anyone put me out of my misery with a solution to this annoying issue?

    Hello nzmike,
    Does Visual Studio behaves like the following image shows and just hangs when opening your media file?
    Do you have any other computer which installs Visual Studio? Can you reproduce this on it?
    In order to troubleshoot this issue I think we need to locate the root reason of your issue. The problem can related to the following:
    1. Your project is corrupt and VS then trys to load that file when debug finished.
    2. Your VS is corrupt and caused this problem.
    So please do something below:
    1. Try clean and rebuild your project.
    2. Switch to some other PCs and use VS and your project there, check if the problem can be reproduced.
    3. You can backup your VS setting and try some commands: devenv /resetsettings and devenv /resetuserdata
    Details about VS command:https://msdn.microsoft.com/en-us/library/xee0c8y7.aspx
    And based on th research of the above second step, if you can reproduce this issue on more than one PC, the problem is pending on your project and I need you to share a simple sample which can reproduce this issue. We will need to investigate the project
    in detail.
    Best regards,
    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Firefox saves pages as two files on desktop

    Why does Firefox save two files / folders on my desktop when I use the"Save Page As" option to save a visited website on my desktop?
    Can this be modified? I hate having to handle two files / file groups when I want to save a file for quick access, or for re-sending to others.
    Thanks!

    Don't use "say page as" ...see instructions on how to create shortcuts from this link, using the icon to the left of the address bar will only create one icon on the desktop
    http://support.mozilla.com/en-US/kb/creating+a+desktop+shortcut+to+a+web+page

  • How to encypt a .txt file and how to decrypt a same .txt file when i need

    My requirement is i want to encrypt a .txt file and
    keep it in some folder. In that file we put database connection
    information. when ever we need that file we have to access it and decrypt
    it. with that decrypted values we have make connection with database.
    i am sending a code in which i wrote both encyption and decrytion in same file, but i want to do it separately.
    Please help me regarding this.
    package com.businessobjects;
    import java.io.*;
    import java.security.*;
    import javax.crypto.*;
    public class EncryptDecrypt
         public static void EncodeIt()
              try
              // generate Cipher objects for encoding and decoding
              Cipher itsocipher1 = Cipher.getInstance("DES");
              Cipher itsocipher2 = Cipher.getInstance("DES");
              // generate a KeyGenerator object
              KeyGenerator KG = KeyGenerator.getInstance("DES");
              System.out.println("Using algorithm " + KG.getAlgorithm());
              // generate a DES key
              Key mykey = KG.generateKey();
              // initialize the Cipher objects
              System.out.println("Initializing ciphers...");
              itsocipher1.init(Cipher.ENCRYPT_MODE, mykey);
              itsocipher2.init(Cipher.DECRYPT_MODE, mykey);
              // creating the encrypting cipher stream
              //System.out.println("Creating the encrypting cipher stream...");
              /*FileInputStream fis = new FileInputStream("Original.txt");
    FileOutputStream fos = new FileOutputStream("Encypt.txt");
              CipherInputStream cis1 = new CipherInputStream(fis, itsocipher1);
              // creating the decrypting cipher stream
              //System.out.println("Creating the decrypting cipher stream...");
              byte[] b1 = new byte[8];
    int i1 = cis1.read(b1);
              while (i1 != -1)
                   fos.write(b1, 0, i1);
                   i1 = cis1.read(b1);
    fis.close();
    fos.close();*/
    // writing the decrypted data to output file
    FileInputStream fis1 = new FileInputStream("Encypt.txt");
    FileOutputStream fos1 = new FileOutputStream(Decypt.txt");
    CipherInputStream cis2 = new CipherInputStream(fis1, itsocipher2);
              byte[] b2 = new byte[8];
              int i2 = cis2.read(b2);
              while (i2 != -1)
                   fos1.write(b2, 0, i2);
                   i2 = cis2.read(b2);
    fis1.close();
              fos1.close();
    //cis1.close();
              cis2.close();
              catch (Exception e)
              System.out.println("Caught exception: " + e);
    With regards
    Pavankumar.

    here is the solution you wanted it
    uses password based encryption
    but your requirements are for very badly
    designed code
    This is the encryption part
    it converts the inputfile original.txt
    into the outputfile encrypt.txt which
    contains the original encrypted
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import javax.crypto.Cipher;
    import javax.crypto.spec.PBEKeySpec;
    import javax.crypto.spec.PBEParameterSpec;
    import javax.crypto.SecretKey;
    import javax.crypto.SecretKeyFactory;
    public class PWBEncryption {
        // Salt
        static byte[] salt = {
            (byte)0xc7, (byte)0x73, (byte)0x21, (byte)0x8c,
            (byte)0x7e, (byte)0xc8, (byte)0xee, (byte)0x99
        // Iteration count
        static int count = 20;
        public PWBEncryption() {
        // params:
        // password   -> the pasword used to create the key
        // inputfile  -> the file containing the stuff to be encrypted
        // i.e. original.txt
        // outputfile -> the file that will contain the encrypted stuff
        // i.e. encrypt.txt
        public static boolean doIt(char[] password,String inputfile,String outputfile){
            try{
                // Create PBE parameter set
                PBEParameterSpec pbeParamSpec = new PBEParameterSpec(salt, count);
                PBEKeySpec pbeKeySpec = new PBEKeySpec(password);
                // create secretkey
                SecretKeyFactory keyFac = SecretKeyFactory.getInstance("PBEWithMD5AndDES");
                SecretKey pbeKey = keyFac.generateSecret(pbeKeySpec);
                // create cipher
                Cipher pbeCipher = Cipher.getInstance("PBEWithMD5AndDES");
                pbeCipher.init(Cipher.ENCRYPT_MODE, pbeKey, pbeParamSpec);
                // read input
                FileInputStream fis = new FileInputStream(inputfile);
                byte[] input = new byte[fis.available()];
                fis.read(input);
                // encrypt
                byte[] output = pbeCipher.doFinal(input);
                // write encrypted output
                FileOutputStream fos = new FileOutputStream(outputfile);
                fos.write(output);
                return true;
            catch(Exception e){
                System.out.println(e.toString());
                return false;
    }This is the decrypt part
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import javax.crypto.Cipher;
    import javax.crypto.spec.PBEKeySpec;
    import javax.crypto.spec.PBEParameterSpec;
    import javax.crypto.SecretKey;
    import javax.crypto.SecretKeyFactory;
    public class PWBDecryption {
        // Salt
        static byte[] salt = {
            (byte)0xc7, (byte)0x73, (byte)0x21, (byte)0x8c,
            (byte)0x7e, (byte)0xc8, (byte)0xee, (byte)0x99
        // Iteration count
        static int count = 20;
        public PWBDecryption() {
        // params:
        // password   -> the pasword used to create the key
        // inputfile  -> the file containing the decrypted data
        // i.e. encrypt.txt
        // outputfile -> the file that will contain the decrypted data
        // i.e. decrypt.txt
        public static boolean doIt(char[] password,String inputfile,String outputfile){
            try{
                // Create PBE parameter set
                PBEParameterSpec pbeParamSpec = new PBEParameterSpec(salt, count);
                PBEKeySpec pbeKeySpec = new PBEKeySpec(password);
                // create secretkey
                SecretKeyFactory keyFac = SecretKeyFactory.getInstance("PBEWithMD5AndDES");
                SecretKey pbeKey = keyFac.generateSecret(pbeKeySpec);
                // create cipher
                Cipher pbeCipher = Cipher.getInstance("PBEWithMD5AndDES");
                pbeCipher.init(Cipher.DECRYPT_MODE, pbeKey, pbeParamSpec);
                // read input
                FileInputStream fis = new FileInputStream(inputfile);
                byte[] input = new byte[fis.available()];
                fis.read(input);
                // encrypt
                byte[] output = pbeCipher.doFinal(input);
                // write encrypted output
                FileOutputStream fos = new FileOutputStream(outputfile);
                fos.write(output);
                return true;
            catch(Exception e){
                return false;
    }runner
    public class RunRun {
        public RunRun() {
        public static void main(String args[]){
            char password[] = {'q','w','e','r','t','y'};       
            boolean enc = PWBEncryption.doIt(password,"C:\\original.txt","c:\\encrypt.txt");
            System.out.println("Encryption status == "+enc);
            boolean dec = PWBDecryption.doIt(password,"c:\\encrypt.txt","c:\\decrypt.txt");
            System.out.println("Decryption status == "+dec);
    }

  • The program making the flat txt file when creating payment proposal...

    Hello everybody!
    Do you know what is the program used by trx F110 (Automatic Payment transactions) to create the flat text file in the Operating System? I know that, in case of a payment method 'C' (check), SAP can print the check using the programs that appear at Printout/data medium tab (listed in the Form printing/DME box). But the issue is that the check is printing the street address of the vendor, not the one of the ALTERNATIVE PAYEE, in this case the payee is one of the vendor customers, but the check does not print the customer address.
    I would be glad if I could find the txt file creator program, due the information is sent to the printing program is at this file, so I become able to investigate the behavior of the program. Further beyond: do you know why F110 is not able to print the address of a customer of the vendor when making checks with alternative payee being one of their customers? Thank you and regards!

    Hi guys:
    Jeje, there was not standard program that made the txt file, but a Z program. The FI functional was able to locate it and then I modified it. Thank you anyway.

  • How to skip first 5 lines from a txt file when using sql*loader

    Hi,
    I have a txt file that contains header info tat i dont need. how can i skip those line when importing the file to my database?
    Cheers

    Danny Fasen wrote:
    I think most of us would process this report using pl/sql:
    - read the file until you've read the column headers
    - read the account info and insert the data in the table until you have read the last account info line
    - read the file until you've read a new set of column headers (page 2)
    - read the account info and insert the data in the table until you have read the last account info line (page 2)
    - etc. until you reach the total block idenfitied by Count On-line ...
    - read the totals and compare them with the data inserted in the tableOr maybe like this...
    First create an external table to read the report as whole lines...
    SQL> ed
    Wrote file afiedt.buf
      1  CREATE TABLE ext_report (
      2    line VARCHAR2(200)
      3          )
      4  ORGANIZATION EXTERNAL (
      5    TYPE oracle_loader
      6    DEFAULT DIRECTORY TEST_DIR
      7    ACCESS PARAMETERS (
      8      RECORDS DELIMITED BY NEWLINE
      9      BADFILE 'bad_report.bad'
    10      DISCARDFILE 'dis_report.dis'
    11      LOGFILE 'log_report.log'
    12      FIELDS TERMINATED BY X'0D' RTRIM
    13      MISSING FIELD VALUES ARE NULL
    14      REJECT ROWS WITH ALL NULL FIELDS
    15        (
    16         line
    17        )
    18      )
    19      LOCATION ('report.txt')
    20    )
    21  PARALLEL
    22* REJECT LIMIT UNLIMITED
    SQL> /
    Table created.
    SQL> select * from ext_report;
    LINE
    x report page1
    CDC:00220 / Sat Aug-08-2009 xxxxp for 02/08/09 - 08/08/09 Effective Date 11/08/09 Wed Sep-30-2009 08:25:43
    Bill to
    Retailer Retailer Name                  Name on Bank Account           Bank ABA   Bank Acct            On-line Amount  Instant Amount  Total Amount
    ======== ============================== ============================== ========== ==================== =============== =============== ===============
    0100103  BANK Terminal                  raji                           123456789  123456789            -29,999.98    9 0.00         99 -29,999.98
    0100105  Independent 1                  Savings                        123456789  100000002            -1,905.00     9 0.00         99 -1,905.00
    0100106  Independent 2                  system                         123456789  100000003            -800.00       9 -15.00       99 -815.00
    LARGE SPACE
    weekly_eft_repo 1.0 Page: 2
    CDC:00220 / Sat Aug-08-2009 Weekly EFT Sweep for 02/08/09 - 08/08/09 Effective Date 11/08/09 Wed Sep-30-2009 08:25:43
    Bill to
    Retailer Retailer Name Name on Bank Account Bank ABA Bank Acct On-line Amount Instant Amount Total Amount
    ======== ============================== ============================== ========== ==================== =============== =============== ===============
    Count On-line Amount Instant Amount Total Amount
    ============== ====================== ====================== ======================
    Debits 0 0.00 0.00 0.00
    Credits 3 -32,704.98 -15.00 -32,719.98
    Totals 3 -32,704.98 -15.00 -32,719.98
    Total Tape Records / Blocks / Hash : 3 1 37037034
    End of Report
    23 rows selected.Then we can check we can just pull out the lines of data we're interested in from that...
    SQL> ed
    Wrote file afiedt.buf
      1  create view vw_report as
      2* select line from ext_report where regexp_like(line, '^[0-9]')
    SQL> /
    View created.
    SQL> select * from vw_report;
    LINE
    0100103  BANK Terminal                  raji                           123456789  123456789            -29,999.98    9 0.00         99 -29,999.98
    0100105  Independent 1                  Savings                        123456789  100000002            -1,905.00     9 0.00         99 -1,905.00
    0100106  Independent 2                  system                         123456789  100000003            -800.00       9 -15.00       99 -815.00And then we adapt that view to extract the data from those lines as actual columns...
    SQL> col retailer format a10
    SQL> col retailer_name format a20
    SQL> col name_on_bank_account format a20
    SQL> col online_amount format 999,990.00
    SQL> col instant_amount format 999,990.00
    SQL> col total_amount format 999,990.00
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace view vw_report as
      2  select regexp_substr(line, '[^ ]+', 1, 1) as retailer
      3        ,trim(regexp_replace(regexp_substr(line, '[[:alpha:]][[:alnum:] ]*[[:alpha:]]', 1, 1), '(.*) +[^ ]+$', '\1')) as retailer_name
      4        ,trim(regexp_replace(regexp_substr(line, '[[:alpha:]][[:alnum:] ]*[[:alpha:]]', 1, 1), '.* ([^ ]+)$', '\1')) as name_on_bank_account
      5        ,to_number(regexp_substr(regexp_replace(line,'.*[[:alpha:]]([^[:alpha:]]+)','\1'), '[^ ]+', 1, 1)) as bank_aba
      6        ,to_number(regexp_substr(regexp_replace(line,'.*[[:alpha:]]([^[:alpha:]]+)','\1'), '[^ ]+', 1, 2)) as bank_account
      7        ,to_number(regexp_substr(regexp_replace(line,'.*[[:alpha:]]([^[:alpha:]]+)','\1'), '[^ ]+', 1, 3),'999,999.00') as online_amount
      8        ,to_number(regexp_substr(regexp_replace(line,'.*[[:alpha:]]([^[:alpha:]]+)','\1'), '[^ ]+', 1, 5),'999,999.00') as instant_amount
      9        ,to_number(regexp_substr(regexp_replace(line,'.*[[:alpha:]]([^[:alpha:]]+)','\1'), '[^ ]+', 1, 7),'999,999.00') as total_amount
    10* from (select line from ext_report where regexp_like(line, '^[0-9]'))
    SQL> /
    View created.
    SQL> select * from vw_report;
    RETAILER   RETAILER_NAME        NAME_ON_BANK_ACCOUNT   BANK_ABA BANK_ACCOUNT ONLINE_AMOUNT INSTANT_AMOUNT TOTAL_AMOUNT
    0100103    BANK Terminal        raji                  123456789    123456789    -29,999.98           0.00   -29,999.98
    0100105    Independent 1        Savings               123456789    100000002     -1,905.00           0.00    -1,905.00
    0100106    Independent 2        system                123456789    100000003       -800.00         -15.00      -815.00
    SQL>I couldn't quite figure out the "9" and the "99" data that was on those lines so I assume it should just be ignored. I also formatted the report data to fixed columns width in my external text file as I'd assume that's how the data would be generated, not that that would make much difference when extracting the values with regular expressions as I've done.
    So... something like that anyway. ;)

  • I want to save data to txt file on as ,how can do it ?

    hi~everyone
        i have some data in inner table ,i wantto save the data into TXT file on AS,   then i download the file from AS,how can come true it ?who can give me some demo or cues ,thank you very much!
    Message was edited by:
            deqiang zhang

    Check the example program using GUI_DOWNLOAD and it may help you
    report  zan_guidownload no standard page heading.
    tables : vttk.
    data : begin of i_vttk occurs 0,
           tknum like vttk-tknum,
           shtyp like vttk-shtyp,
           end of i_vttk.
    data : begin of i_down occurs 0,
           fld(255) type c,
           end of i_down.
    start-of-selection.
      select tknum shtyp from vttk into table i_vttk.
    end-of-selection.
    loop at i_vttk.
    concatenate i_vttk-tknum ',' i_vttk into i_down.
    endloop.
      call function 'GUI_DOWNLOAD'
        exporting
      BIN_FILESIZE                    =
          filename                        = 'C:\down.xls'
          filetype                        = 'ASC'
        append                          = 'X'
        write_field_separator           = ','
      HEADER                          = '00'
      TRUNC_TRAILING_BLANKS           = ' '
      WRITE_LF                        = 'X'
      COL_SELECT                      = ' '
      COL_SELECT_MASK                 = ' '
      DAT_MODE                        = ' '
      CONFIRM_OVERWRITE               = ' '
      NO_AUTH_CHECK                   = ' '
      CODEPAGE                        = ' '
      IGNORE_CERR                     = ABAP_TRUE
      REPLACEMENT                     = '#'
      WRITE_BOM                       = ' '
      TRUNC_TRAILING_BLANKS_EOL       = 'X'
      WK1_N_FORMAT                    = ' '
      WK1_N_SIZE                      = ' '
      WK1_T_FORMAT                    = ' '
      WK1_T_SIZE                      = ' '
    IMPORTING
      FILELENGTH                      =
        tables
          data_tab                        = i_vttk
      FIELDNAMES                      =
    EXCEPTIONS
      FILE_WRITE_ERROR                = 1
      NO_BATCH                        = 2
      GUI_REFUSE_FILETRANSFER         = 3
      INVALID_TYPE                    = 4
      NO_AUTHORITY                    = 5
      UNKNOWN_ERROR                   = 6
      HEADER_NOT_ALLOWED              = 7
      SEPARATOR_NOT_ALLOWED           = 8
      FILESIZE_NOT_ALLOWED            = 9
      HEADER_TOO_LONG                 = 10
      DP_ERROR_CREATE                 = 11
      DP_ERROR_SEND                   = 12
      DP_ERROR_WRITE                  = 13
      UNKNOWN_DP_ERROR                = 14
      ACCESS_DENIED                   = 15
      DP_OUT_OF_MEMORY                = 16
      DISK_FULL                       = 17
      DP_TIMEOUT                      = 18
      FILE_NOT_FOUND                  = 19
      DATAPROVIDER_EXCEPTION          = 20
      CONTROL_FLUSH_ERROR             = 21
      OTHERS                          = 22
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    Thanks
    Seshu

  • How to save Image to a file

    I create a bar chart using Jfreechart (chart library) and was wondering if there was a way that i could save this image to a file so that a user can later view the chart. I appreciate any dircetion you can give. Thanks.

    Hi,
    try this,
        try {
          ImageIO.write(myImage, theExtensionYouWishInString (e.g. "png"), new File(fileName));
        catch(IOException e) {
          e.printStackTrace();
         }where myImage is a BufferedImage.
    You should look in the API for supported image formats.
    regards,

  • Save image to a file got a blank image.

    I need to save graphics image of a component to a file. Following is what I did.
    1. Call createImage() from this component.
    2. Convert the image to a BufferedImage.
    3. Call ImageIO.write() to save it in a file.
    What I got from the result file is all blank. Following is the code.
    Please help. Thanks a lot!
    import java.io.*;
    import java.awt.*;
    import java.awt.image.*;
    import javax.imageio.*;
    import javax.swing.*;
    public class SaveLabelImage
         String jpg_out = "image.jpg";
         String dir_name = "c:\\temp\\";
         SaveLabelImage()
              // Use a label to display some text
              JFrame frame = new JFrame();
              JLabel label = new JLabel( "ABCDEFG", JLabel.CENTER );
              Container contentPane = frame.getContentPane();
              contentPane.add( label, BorderLayout.CENTER );
              frame.setSize( 300, 150 );
              frame.setVisible(true);
              File f_dir = new File( dir_name );
              if ( !f_dir.exists() ) f_dir.mkdir();          
              write_label( label, jpg_out );
    public void write_label( JLabel label, String out_fn )
              // Save the image to a file
              int w = label.getWidth();
              int h = label.getHeight();
              Image im = (Image)label.createImage( w, h );
              BufferedImage bimage = new BufferedImage( w, h, BufferedImage.TYPE_INT_RGB );     
              Graphics2D g2 = bimage.createGraphics();     
              g2.drawImage( im, null, null );                                             
              if ( bimage == null ) {
                   System.out.println( "Buffered Image is null!" );
                   return;
              try
                   String fn = dir_name + jpg_out;
                   File file = new File( fn );
    ImageIO.write( bimage, "jpg", file );          
                   System.out.println( "Image of Jlabel is saved in file " + fn );
              catch (IOException e) {;    }
         }     //write_label
         public static void main(String arg[])
              new SaveLabelImage() ;               
    }     // class SaveLabelImage

    I am able to get a good image file now. Thanks you very much.
    However I still have a few quesions.
    1. In my case, the label is visible on the screen, why I need to call the setVisible(true) again?
    2. Why use print() instead of paint()?
    3. I have to use BufferedImage.TYPE_INT_ARGB to create a new BufferedImage, otherwise the result image file is in black.
    4. I did not use the hints because it is very confusing. Fortunately, It worked without them.
    Following is a modified version of your code.
    import java.io.*;
    import java.awt.*;
    import java.util.*;
    import java.awt.image.*;
    import javax.imageio.*;
    import javax.swing.*;
    public class SaveComponentAsImage
    public static void saveComponentAsImage(
                             JComponent c,
                             int w, int h, int image_type,
                             String fn, String file_type )
              c.setSize(w, h);
    c.setVisible(true);
    c.validate();
    // use TYPE_INT_ARGB if you want alpha (transparency)
    BufferedImage image = new BufferedImage( w, h, image_type );
    Graphics g = image.getGraphics();
    // draw the graphics
    c.print(g);
    g.drawLine(0,0, c.getWidth(),c.getHeight());
    // write it out
    try {
    ImageIO.write(image, file_type, new File(fn));
    System.out.println( "Image is saved in file " + fn );
    } catch (IOException ioe) {
    System.out.println(ioe.getMessage());
    // cleanup
    g.dispose();
         public static void main(String arg[])
              JLabel l = new JLabel( "ABCDEFG", JLabel.CENTER );
              int w = l.getWidth();
              int h = l.getHeight();
              System.out.println( "label width=" + w );
              System.out.println( "label height=" + h );
              if ( w == 0 || h == 0 )
                   w = l.getPreferredSize().width;
                   h = l.getPreferredSize().height;
              System.out.println( "Preffered width=" + w );
              System.out.println( "Preffered height=" + h );          
              w +=100;
              h +=50;          
              String fn = "myImage.png";
              int image_type = BufferedImage.TYPE_INT_RGB;          
              saveComponentAsImage( (JComponent)l, w, h, image_type, fn, "png" ) ;     
              image_type = BufferedImage.TYPE_INT_ARGB;     
              fn = "myImage_ARGB.png";                                   
              saveComponentAsImage( (JComponent)l, w, h, image_type, fn, "png" ) ;     
    }

  • Illustrator also saves a new .ai file  when saving with batch

    When saving for Web as .png with a batch, illustrator also saves a new .ai file.
    The batch opens the .ai files from a specific map and saves them in another map.
    Is there a reason that illustrator does this ?
    Now I have to delete all the .ai files from the saving-map.

    Which version of Illustrator? Which Batch settings in detail?

  • Save in a txt file

    Hi!!! I managed to read a table row by row and now i want to store the values in a txt file. I dont know how to do that and i need to finish it tonight.
    I would appreciate any help u can give me.
    Cheers
    Maria
    import java.sql.*;
    import java.text.*;
    import java.util.*;
    import java.io.*;
    public class conPostgres {
    Connection con;
         Statement st;
         public conPostgres (String args[]) throws ClassNotFoundException,FileNotFoundException,IOException,SQLException
              String url = "jdbc:postgresql://eos:5432/ca1map";
              String usr = "ca1map";
              String pwd = "u01953677s";
              // Load JDBC driver
              Class.forName ("org.postgresql.Driver");
              //Connection to database
              System.out.println ("Connecting to Database URL = " + url);
              con = DriverManager.getConnection (url,usr,pwd);
              System.out.println ("Connected...Now creating a statement");
              st = con.createStatement ();
              st.close();
              con.close();
              ResultSet rs = st.executeQuery ("select * from Customer");
              if (rs!=null) {
              while (rs.next())
              int customerid = rs.getInt(1);
              String name = rs.getString(2);
              String city = rs.getString(3);
              String street = rs.getString(4);
              String postcode = rs.getString(5);
              rs.close();
              

    You can use the FileOutputStream class for that.
    PrintStream ps = new PrintStream(new FileOutputStream("test.txt"), true); // autoflush
    ps.println("a line");
    ps.close();The PrintStream just makes it easier to write text, just like you would use System.out.

Maybe you are looking for