Calling a new shell to run mySQL from an input file

I'm trying this.
Runtime r = Runtime.getRuntime();
     Process pr = null;
     try
     String str="cmd C:\\mysql\\bin\\mysql -u root < C:\\java\\jfb\\myfile.txt /C";
     pr = r.exec(str);
     pr.waitFor();
     catch (Exception e)
     e.printStackTrace();
nothing is getting updated in my database. myfile.txt is correct. i'm really wondering about the String str being correctly formatted. thank you.

it's need not to be
c:\windows\system32\cmd.exe /c C:\\mysql\\bin\\mysql -u root < C:\\java\\jfb\\myfile.txt it could be like this.
cmd /c C:\\mysql\\bin\\mysql -u root < C:\\java\\jfb\\myfile.txt but remember, /c must come next to the cmd. in some environments, this wont work. i dun knw why if it's so use the following.
cmd start  /c C:\\mysql\\bin\\mysql -u root < C:\\java\\jfb\\myfile.txt /Cheers,
-MadGuy
[A Guy From the pearl of Indian Ocean... A Srilankan...]

Similar Messages

  • Shell or perl script from OS command_Sender File Channel

    Hi All,
    I am trying to execute a perl script from the File Sender Channel(NFS), OS command Before Message Processing. The script works fine if i run it from the shell. But when PI calls the script,  the script does not get executed. The audit logs mention that the OS command has been called.
    I tried using:
    1) /<fullpath>perlScript.pl /<fullpath>filename.dat
    2) perl /<fullpath>perlScript.pl /<fullpath>filename.dat
    Both these commands work fine when i execute them on the shell.
    I am on solaris and PI 7.0. The permission for the perl script and input files are all 777.
    FYI.. i am using this perl script to transpose a complex file and make it # delimited file.
    I have already read the blogs for OS command and executed some sample scenarios successfully.
    I tried to call a shell script that does the same functionality as the perl script. Even that does not work.
    Also, wrote a shell script to call the perl script inside it. No luck.
    eg:
    touch /fullpath>/create_before.dat
    perl /<fullpath>perlScript.pl /<fullpath>filename.dat
    touch /<fullpath>/create_after.dat
    In this case, the create_before.dat and create_after.dat is getting created but the perl is not called. I know this because i cant see the output files of the perl script.
    Regards,
    Balaji
    Edited by: Balaji M on Oct 30, 2008 2:36 PM

    Hi,
    The problem is fixed. The shell or perl both have logic to transpose a non industry starndard file to the delimited file which PI can use an FCC to pick up.
    This was the fix:
    we need to mention the shell the script is going to be run in.
    In the shell script we mentioned --> *#!/usr/bin/bash* as the first line
    normally, when we use the command -- which bash on the unix command prompt, it tells us the path for the bash used.
    another option --> #!/usr/bin/ksh
    again, on the command prompt -- which ksh command will tell us what ksh is being used.
    If the script is a simple one that does copy or move commands, i believe we need not use the commands above. But is a good practice to have them in the script.
    Regards,
    Balaji
    Edited by: Balaji M on Nov 3, 2008 4:38 PM

  • Loading a table from multiple input files using sqlldr

    Hi,
    For my project i need to load into a table by joining two input files using sqlldr. For example,
    I have a file1, which has values
    name,salary,ssn
    and file2 which has values for
    ssn,location,country
    now i need to load these values into a table say employee_information by joining both input files. both input files can be joined using ssn as common field.
    Any idea how to do this??
    Thanks in advance
    Satya.

    Hi,
    What is the size of the files. If possible mail me the sample files, And the structure of table. Is the <ssn> from first file and second will have seperate columns in the table or we have to merge it.
    SKM

  • Create two identical idocs from one input file with BPM

    Hello all .
    My issue is the following.
    I have a scenario where an input file is mapped to an IDOC .
    The problem is that i need to create a second - almost identical - mapping to the same IDOC type and when the input file is receive both of them should be sent .
    I suppose that BPM is needed for this scenario, but are there any examples or tips i should follow?
    Thank you all in advance .

    Rucinski and Sarvesh, thank you both for your answers , they are very helpful.
    I have started trying Rucinski's method, because I would better avoid redoing the mapping on the second IDOC (it is pretty hard and critical) . But I have a problem.
    When i run the senario, the system replies (for the second IDOC)
    "Unable to interpret IDoc interface NEW_IDOC_MI"
    The reason for this is that in the Interface Determination i have two entries for the inbound interface,
    Orders.orders05 and
    NEW_IDOC_MI,
    which is wrong. I should be using the original  Orders.orders05. But this can't be done, because in tha case the Interface Determination, requests a Condition to be entered. Any suggestions on this ?
    Sarvesh, is there any way to duplicate the IDOC, keeping the mapping that is allready done ?

  • Multiple replacements from an input file with 1.4 Regex

    hi,
    i'm trying to make multiple replacments to a source file <source> using a second input file <patterns> to hold the regex's. the problem i'm having is that the output file only makes the last replacement listed in the input file. Example if the input file is
    a#123
    b#456
    only b is changed to 456 and a remains.
    the second debug i've got shows that all the replacements are in memory, but i'm not sure how to write them all to the file.
    the syntax is Java MyPatternMatcher <source> <patterns>
    import java.util.regex.*;
    import java.io.*;
    import java.util.*;
    public class MyPatternResolver {
         private File patternFile;
         private File sourceFile;
         private Vector patterns = new Vector();
         public MyPatternResolver(String sourceFile, String patternFile) {
              this.sourceFile = new File(sourceFile);
              this.patternFile = new File(patternFile);
              loadPatterns();
              resolve();
         private void loadPatterns() {
              // read in each line if File
              FileReader fileReader = null;
              try {
                   fileReader = new FileReader(patternFile);
              } catch(FileNotFoundException fnfe) {
                   fnfe.printStackTrace();
              BufferedReader reader = new BufferedReader(fileReader);
              String s = null;
              String[] strArr = new String[2];
              try {
                   while((s = reader.readLine()) != null) {
                        StringTokenizer tokenizer = new StringTokenizer(s, "#");
                        for (int i =0; i < 2; i++) {
                             strArr[i] = tokenizer.nextToken();
                             //Debugging Info
                             System.out.println("Token Value " + i + " = " + strArr);
                             //End Debugging Info
                        patterns.add(new PatternResolver(strArr[0], strArr[1], sourceFile));
              } catch(IOException ioe) {
                        ioe.printStackTrace();
         private void resolve() {
              Iterator iterator = patterns.iterator();
              while(iterator.hasNext()) {
                   PatternResolver pr = (PatternResolver) iterator.next();
                   pr.resolve();
         public static void main(String[] args) {
              MyPatternResolver mpr = new MyPatternResolver(args[0], args[1]);
         public class PatternResolver {
              private String match, replace;
              private File source;
         public PatternResolver(String s1, String s2, File f) {
              this.match = s1;
              this.replace = s2;
              this.source = f;
         public File resolve() {
              File fout = null;
              try {
         //Create a file object with the file name in the argument:
         fout = new File(sourceFile.getName() + "_");
         //Open and input and output stream
         FileInputStream fis = new FileInputStream(sourceFile);
         FileOutputStream fos = new FileOutputStream(fout);
         BufferedReader in = new BufferedReader(new InputStreamReader(fis));
         BufferedWriter out = new BufferedWriter(new OutputStreamWriter(fos));
         // The find and replace statements
         Pattern p = Pattern.compile(match);
                   Matcher m = p.matcher(replace);
                   //Debugging Info
                   System.out.println("Match value = " + match + " Replace value = " + replace);
                   //Debugging Complete
                   String aLine = null;
                   while((aLine = in.readLine()) != null) {
                   m.reset(aLine);
                   //Make replacements
                   String result = m.replaceAll(replace);
                   out.write(result);
              out.newLine();
                   in.close();
                   out.close();
              } catch (Exception e) {
                   e.printStackTrace();
    return fout;

    If your aim is to learn about regex, then its okay.
    Otherwise you might want to check the utility "sed" (stream editor) which does something similar what you are up to. It is a POSIX (.i.e. UNIX) utility, but it is available (in several versions) for other platforms (including Windows) too. (Cf. Cygnus or Mingw).

  • Can I boot my new MacBook Pro running ML from SL on an external drive

    I have a new MBP with Mountain Lion.  I want to put Snow Leopard, I have the full install DVD, on an external drive.  Can I boot from that drive so I can run a few old applications that won't run in Mountain Lion?

    As per Mende1's suggestion: install your Snow Leopard (with Rosetta) into Parallels and run your PowerPC applications (which ones are they?):
                                  [click on image to enlarge]
    Full Snow Leopard installation instructions here

  • How to add new table into running extract pump and replicat files

    Hi all, i am very much confused how we should add a new table for replication into extract pump and replicat parameter files without stopping them manually? Is there any way where we can add them without disturbing functionality of OGG?
    Experts help required on this
    Thanks in advance

    Hi,
    You can stop and restart the extract process after modifying the extract prm files. the current and last reading point details available checkpoint tables ,or it can get it from info command itself , so you can start the extract process at the point of particular RBA or SEQ no, but you make sure the retention period of your archive log files, because all the transactions are moved in to archive log location, so extract process will fetch the data from archive log also,
    Documentation states:
    If Extract abends when a long-running transaction is open, it can seem to take a long time
    to recover when it is started again. To recover its processing state, Extract must search
    back through the online and archived logs (if necessary) to find the first log record for that
    long-running transaction. The farther back in time that the transaction started, the longer
    the recovery takes, in general, and Extract can appear to be stalled.
    Why archive logs?
    GG reads online redo logs in default but when they are all switched, and for some reason in the meantime GG stopped (abended) it doesn't have the last transaction as transaction was in online log that switched. That is why you need archive logs, so that GG can reach this old transaction in archive log.
    E.g you have two online logs, your transaction is at the begining of the first log. Extract abends. Transactions keep coming to database first online log switches to second, second switches to first and first again to second. You start GG but transaction you finished processing on is no longer in first online log. But it is in archive log.
    What to do?
    1) Start Oracle in archive log mode
    2) Make sure you have available space for archive logs
    GG will look into Oracle default location for archive logs when it abends and transaction is no longer in online log.

  • Call a method with complex data type from a DLL file

    Hi,
    I have a win32 API with a dll file, and I am trying to call some methods from it in the labview. To do this, I used the import library wizard, and everything is working as expected. The only problem which I have is with a method with complex data type as return type (a vector). According to this link, import library wizard can not import methods with complex data type.
    The name of this method is this:   const std::vector< BlackfinInterfaces::Count > Counts ()
    where Count is a structure defined as below:
    struct Count
       Count() : countTime(0) {}
       std::vector<unsigned long> countLines;
       time_t countTime;
    It seems that I should manually use the Call Library Function Node. How can I configure parameters for the above method?

    You cannot configure Call Library Function Node to call this function.  LabVIEW has no way to pass a C++ class such as vector to a DLL.

  • Call a javascript function (in ASPX) page from a javascript file

    I have a javascript file (viewer.js) situated in Scripts/viewer.js My
    default.aspx has a javascript functions that calls a c# function in the
    default.aspx.cs ( it sends a http webrequest)
    Now I want to call from the viewer.js the function in default.aspx which calls the c# function.
    How can I handle this in my viewer.js?
    I need to do this because I work with 3D objects and the select event is on the viewer.js
    When I select the 3D object it needs to call the function in default.aspx...
    Scripts/viewer.js
    function ClickPickItem(item) {
    $("#properties").show();
    /*Call function App() */
    Default.aspx
    function App() {
    PageMethods.Connect(callback);
    Default.aspx.cs
    [WebMethod]
    public static string Connect()
    string rsp = DigestAuthFixer.GrabResponse("http://<username>:<password>@nextbus.mxdata.co.uk/nextbuses/1.0/1");
    ... CODE TO MAKE HTTPWEBREQUEST}
    Sorry if I'm not clear enough
    I don't see another option like this
    What I need to do?
    Thanks!

    If my understanding is not wrong, you are trying to call a Javascript function in a separate script block from a linked Javascript page. rite?
    When it comes to Javascript, all scripts will be posted to the client side browser and we can access any method between pages provided those JS files are linked to the page.
    So you can directly call
    App()
    function from your
    ClickPickItem()
    function.
    Please try and let us know your result.

  • SELECT top two longest running steps from a log file

    Simplified example.
    Our jobs write records to our own internal log file. I want to write a query that will pull log records for a specific job, between specific dates. This will help determine if the job is running slower than usual and to find the steps within the job that
    are the longest running.
    Jobs are identified by the Type field. Type=1 is a specific job name.
    Each job writes a DESC=START record to the log at the beginning of the job. the Desc=START record will be updated at the end of the job with the ENDDT.
    I want to pull the top two longest running steps (ENDDT-BEGINDT) for each job (Type) where the step startdr and enddt falls between the START startDT and end dt.
    I also want to always pull key step names, like DESC=START and DESC=xya for each job.
    LOG RECORDS
    DESC,TYPE,BEGINDT,ENDDT
    START,1,2014-10-22 07:56:56.000,2014-10-22 09:56:56.000
    aaa,1,2014-10-22 07:57:56.000,2014-10-22 08:57:56.000
    bbb,1,2014-10-22 08:57:56.000,2014-10-22 09:01:56.000
    ccc,1,2014-10-22 09:01:56.000,2014-10-22 09:56:56.000
    xya,1,2014-10-22 09:55:56.000,2014-10-22 09:56:56.000
    START,1,2014-10-21 11:56:56.000,2014-10-22 02:56:56.000
    aaa,1,2014-10-21 11:57:56.000,2014-10-22 01:57:56.000
    bbb,1,2014-10-22 01:57:56.000,2014-10-22 02:56:56.000
    ccc,1,2014-10-22 02:56:56.000,2014-10-22 02:56:56.000
    xya,1,2014-10-22 09:55:56.000,2014-10-22 09:56:56.000
    Desired result set.
    If pulling job type 1 records for last 2 days, would end up with this result set. START and xya are always pulled and then the top 2 longest running steps for each of the START records.
    DESC,TYPE,BEGINDT,ENDDT,Duration
    START,1,2014-10-22 07:56:56.000,2014-10-22 09:56:56.000
    aaa,1,2014-10-22 07:57:56.000,2014-10-22 08:57:56.000
    ccc,1,2014-10-22 09:01:56.000,2014-10-22 09:56:56.000
    xya,1,2014-10-22 09:01:56.000,2014-10-22 09:56:56.000
    START,1,2014-10-21 11:56:56.000,2014-10-22 02:56:56.000
    aaa,1,2014-10-21 11:57:56.000,2014-10-22 01:57:56.000
    bbb,1,2014-10-22 01:57:56.000,2014-10-22 02:56:56.000
    xya,1,2014-10-22 09:55:56.000,2014-10-22 09:56:56.000
    I am asking for help in how to create this query. Thanks

    Hi TheBrenda,
    According to your description, I have written a sample query and tested it in my local environment.
    The following sample query is for your reference:
    --create table log_records
    CREATE TABLE log_records ([DESC] varchar(10),[TYPE] int,BEGINDT datetime,ENDDT datetime)
    --insert values to table log_records
    INSERT INTO log_records VALUES
    ('START',1,'2014-10-22 07:56:56.000','2014-10-22 09:56:56.000'),
    ('aaa',1,'2014-10-22 07:57:56.000','2014-10-22 08:57:56.000'),
    ('bbb',1,'2014-10-22 08:57:56.000','2014-10-22 09:01:56.000'),
    ('ccc',1,'2014-10-22 09:01:56.000','2014-10-22 09:56:56.000'),
    ('xya',1,'2014-10-22 09:55:56.000','2014-10-22 09:56:56.000'),
    ('START',1,'2014-10-21 11:56:56.000','2014-10-22 02:56:56.000'),
    ('aaa',1,'2014-10-21 11:57:56.000','2014-10-22 01:57:56.000'),
    ('bbb',1,'2014-10-22 01:57:56.000','2014-10-22 02:56:56.000'),
    ('ccc',1,'2014-10-22 02:56:56.000','2014-10-22 02:56:56.000'),
    ('xya',1,'2014-10-22 02:56:56.000','2014-10-22 02:56:56.000')
    --run the following main query to get top two longest running steps
    WITH A AS
    (SELECT BEGINDT,ENDDT FROM log_records WHERE [DESC]='START'),
    B AS
    SELECT LR.[DESC], LR.TYPE, LR.BEGINDT BEGINDT1, LR.ENDDT ENDDT1, A.BEGINDT BEGINDT2, A.ENDDT ENDDT2,DATEDIFF(SECOND,LR.BEGINDT,LR.ENDDT) AS timediff,ROW_NUMBER() OVER(PARTITION BY A.BEGINDT ORDER BY DATEDIFF(SECOND,LR.BEGINDT,LR.ENDDT) DESC ) AS rn FROM log_records LR JOIN A
    ON LR.BEGINDT >= A.BEGINDT AND LR.ENDDT<=A.ENDDT
    SELECT [DESC],[TYPE],BEGINDT1 BEGINDT,ENDDT1 ENDDT FROM B WHERE rn<4 or [DESC]='xya' ORDER BY BEGINDT2,rn
    The result of the main query is:
    DESC      TYPE     
    BEGINDT                                             
    ENDDT
    START   1              2014-10-21 11:56:56.000                2014-10-22 02:56:56.000
    aaa         1              2014-10-21 11:57:56.000                2014-10-22
    01:57:56.000
    bbb        1              2014-10-22 01:57:56.000                2014-10-22 02:56:56.000
    xya         1              2014-10-22 02:56:56.000                2014-10-22
    02:56:56.000
    START   1              2014-10-22 07:56:56.000                2014-10-22 09:56:56.000
    aaa         1              2014-10-22 07:57:56.000                2014-10-22
    08:57:56.000
    ccc          1              2014-10-22 09:01:56.000                2014-10-22
    09:56:56.000
    xya         1              2014-10-22 09:55:56.000                2014-10-22
    09:56:56.000
    If you have any question, please feel free to let me know.
    Regards,
    Jerry Li

  • Having trouble with reading hex from an input file - please help

    Hi, I have a txt file with rows of hex, and I need to read each line and add it to an int array. So far I have:
    BufferedReader fileIn = new BufferedReader(new FileReader("memory.txt"));
                    int count = 0 ;
                    String temp = fileIn.readLine();
                    int file_in = Integer.parseInt(temp) ;
                    while(temp!=null) {
                         data[count] = file_in;
                         temp = fileIn.readLine();
                         file_in = Integer.parseInt(temp,16);// Integer.parseInt() ;
                         count++ ; /* increment counter */
                    } memory.txt:
    4004000
    4008000
    3FDF4018
    4108200
    3C104001
    FFFFFFE8
    4010C6C0
    FFFFFFE8
    94000000The above code crashes on the third input (my guess is becuase there are letters in and it can't parseInt letters.
    I think I need to parse it into an array of chars instead, however I don't know how to get from the string (temp) to the char array.
    can anyone help?

    ok turns out it's just a null pointer exception on the data[count] line, becuase I've only initialised the first two slots of data. i didn't see it before becase it was just throwing an error and i never printed it out.
    here's how I've defined data:
    in the class
    int[] data;just before the code to input the file data:
    for ( int i = 0; i < length; i++ )       
                    data [ i ] = 0;thinking this shoudl go through all the array and initialise it. but it gives a NullPointerException on the data=0; line.
    any ideas?
    Edited by: rudeboymcc on Feb 6, 2008 10:50 PM
    Edited by: rudeboymcc on Feb 6, 2008 10:51 PM

  • How to call a dos shell from a servlet

    How could I call a dos shell using a servlet so that java files could be compiled and the results be seen without having to call the browser each time? thanks for your kind attention. amaral

    I guess this might help....
    In one of your servlet classses create a runtime process and execute a command( the path to javac and the file to be compiled) wait for the process to finish a get the result and send it to the client.
    - XL

  • Design and code a new method to be exported from.... (please check my code)

    I'm working on my homework problem which is:
    Design and code a new method to be exported from ArrayStringLog (the file is given to me) called isEmpty with the following signature public boolean isEmpty()
    I created a new class and named it homework2, here is the method:
    public class homework2
           public boolean isEmpty()
      // Returns true if this StringLog is empty, otherwise returns false.
        if (lastIndex == (- 1))
          return true;
        else
          return false;
    }now how can i get it exported from ArrayStringLog? that's the part that I didn't understand
    Edited by: memee4eva on Sep 30, 2009 11:53 PM

    I think your isEmpty() method should go into the ArrayStringLog class. That way the method will be exposed by the altered ArrayStringLog class.
    Am I right in thinking that an ArrayStringLog instance has a lastIndex member?
    You might like to compare what you have with this:
        /** Returns true iff this StringLog is empty. */
    public boolean isEmpty()
        return lastIndex == -1;
      }

  • How to create a swatch library from multiple png files?

    Illustrator CC
    I am having a difficult time trying to create a new swatch libray of patterns from multiple png files. The way I am doing this is very slow and repetitive and seems silly for a tool as advanced as the latest CC suite including illustrator.
    What it seems I must do is open all the png files in Illustrator, creating multiple workspaces, drag one png file into the swatch window, then save that window as a library, close the existing window to reveal the next png file, open the user library I just created, drag the next image into the currently active swatch window, then drag the previous swatch/s from the user library into the current active swatch window, resave and replace the user defined swatch library (now with two images in there)fromthe updated current active swatch panel/window, close the existing workspace to reveal the next image file, and then repeat the process again, slowly building the user defined swatch library up by adding one image at a time and then adding back into the Swatch panel the previously built up library of swatches again one at at time.  (you can select all from the existing  user defined library and drag over into swatch panel, but this creates at least one  duplicate on each cycle for as soon as you click on the first swatch in the library, it adds itto the current swatch panel and then when you select all swatches to drag across it includes the first swatch and copies it again)
    This is a very slow process to build up a swatch library. For some reason you cannot drag swatches directly into  the user defined library you have created, only into the active swatch window for each workspace. I searched the web and forums  for answers but could find none. There must be an easier way,  just can't find it.
    Ideally, the best option would be a swatch window  option that allows the import directly from a list of selected files in the finder.
    Any ideas out there?

    Monika,
    Thank you for responding, however I am not exactly clear on what you mean by "libraries are plain AI files". For example, I cannot find a file with the same name as my user defined library name that I have created. I can find the preinstalled swatches listed under Adobe Application Support... Library... Swatches, but a user defined folder is not present and the library sets that I have already created are not visible. I have tried searcing my Mac for a (name).ase file and still no luck (at least for the name I was looking for). I can open the user defined library from the Swatch library icon on the bottom left of the Swatch panel, but when I open this I cannot drag and drop add new swatches directly to this library. As stated above, I have to add each pattern, one at at time to the normal swatch panel, then add back the previous ones I have saved from the user defined library to the swatch panel and then save threm all as an updated user defined library. Thus by repeating this process, it builds up the user defined library one at a time.
    I am using Illustrator CC if this makes a difference.

  • Installing xcode 4.3.1 for lion is not working , it's opening the Xcode from the dmg file

    After installing the Xcode from the developer site for the lion and run it , the installation started perfect with out any problems , at the end a message pop to remove the old version of Xcode to trash , i have clicked OK , then clicked finish and tried to search for the xcode in the Hard desk using Finder , but it i did not find it !!!
    so i run the installation again but this time it's ruining the Xcode from the dmg file direct with out runing the installation , if i try to eject it will show a pop message that the xcode is begging used by another application
    any help please ...

    It's not there or in any were in the hard desk , it's running only from the dmg file , I'm downloading the Xcode now from the app store but it will take a long time , so I will have to wait

Maybe you are looking for

  • ST-PI Add-on for BW 3.1 to BW 3.5 PREPARE/UPGRADE

    We're trying to Add-on ST-PI as a part of our PREPARE and UPGRADE from BW 3.1 to 3.5. We are currently in the IS_SELECT PHASE and have ST-PI 003C_620. I downloaded the ST-PI 003C_640, SAPCAR'd it in the upgrade directory, but it still seeks to find t

  • HTTPS with Client Authentication not available in EHP1?

    Hi Guys, I am not seeing this option in PI 7.1 EHP1. At SOAP Adapter (Sender Communication Channel) under "HTTP Security Level"you are able to configure "HTTPS with Client Authentication". any help would be appreciated Thanks, Srini

  • Authentication rerror on weblogic

    hi, I had created a user in weblogic with provider as OpenLdapAuthenticator and made it default. Now i am not able to start the weblogic server..

  • Lightroom vs Nikon Capture NX

    Hello All, I've been using Lightroom forever - as a beta user - and now. I just sold my finepix S1 pro and am using a new D300 shooting Raw+jpg Fine and I shoot Raw with my Finepix S2 (RAF) files as well. I spoke with a Nikon rep and they told me tha

  • Pixelated output of image

    Hello - I am running into a problem that I think I've had, and solved, in the past year. But I don't remember how I solved it... I have hi-quality jpg images that I've placed into my document. When I print the image at a size such as 2"x3", the image