Retrieving an image from the database and printing it

Can anybody help please
i dont know how to retreive an image from a image database and send to the printer.
The image is stored in the database in cells ( not as a path to a file).

Hi,
I want to print a gif image.
How can i get this done?
I am trying graphicsobject.drawImage(....),it prints the image only once.If i try second time the image wont be printed,where as if i switch off and then switch on the printer and try again ,then it will print.I am facing the same problem with a HP Laser Jet as well as a thermal Printer.Actually i want to print a bar code.
some body pls help me to sort this issue.
Regards,
ciju
[email protected]

Similar Messages

  • Loading an Image from the database and display it on browser

    I do not know if this is even possible.
    At the moment, to load an image inside an Html page you need to use the <img src=""> tag. and in the src you put the path of the image. Now I would like to save an image inside the database.
    An option to still display the image on the browser would be that my service object, would load the object from the database (saved as blob) then save it somewhere on the Server, and the still use the <img> tag to load the image from that location.
    However I was wondering wheather there is another way to do it without saving this image on the server. that is loading the bytes from the database (or a location on the server) and provided these bytes to the jsp page to display the image.
    Is this possible? or?
    regards,
    sim085

    hmm ... ok .. that sounds good .. but that means that
    a servlet must exsist at all time to display the
    required image.Servlets are usually instantiated by the servlet container upon an incoming request.

  • How to retrieve characters like '£' from the database and write to xml file

    Hi ,
    I have a requirement to retrieve the data from database and write to files in XML format.
    I am able to do so successfuly by using XMLElement tag and writing to file through UTL_File package.
    All characters like <&@^ get converted properly, but when it comes to multibyte chars like '£', they are not able to get converted as it is.
    Can somebody please advise me how to go ahead.
    Regards

    Thanks odie.
    The nls_charset for my database is WE8ISO8859P1 and database version is Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi.
    The data (with pound sign) is sitting in one of the columns of the table and when i query it directly, I am able to view it properly.
    However when I use the below code to retrieve in XML format and print it to file, it gets changed. This file is also passed to one of the application GUI where this XML gets processsed and it is not visible properly.
    below id the sample abstract of code I am using.
    Declare
    l_file UTL_FILE.FILE_TYPE;
    l_clob CLOB;
    l_buffer VARCHAR2(32767);
    l_amount BINARY_INTEGER := 32767;
    l_pos INTEGER := 1;
    Begin
    SELECT XMLElement("case",
    XMLElement("comments",
    XMLElement("comment",
    XMLElement("comments",a.COMMENTS)
    ).getClobVal() val1 into l_clob
    FROM TO_COMMENTS a
    l_file :=
    UTL_FILE.fopen (XMLDIR,
    test.xml,
    'w',
    32767);
    LOOP
    DBMS_LOB.read (l_clob,
    l_amount,
    l_pos,
    l_buffer);
    UTL_FILE.put_line (l_file, l_buffer);
    l_pos := l_pos + l_amount;
    END LOOP;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    DBMS_OUTPUT.NEW_LINE('Reached end of file');
    END;
    The comments column given contains the character like pound.
    And once the file is generated and i see using the vi editor, the char is not viewable properly like £
    And when the same is passed to GUI application to be processed, its not viewable propely in GUI from IE as well like �.

  • I am using the database connectivity toolkit to retrieve data using a SQL query. The database has 1 million records, I am retrieving 4000 records from the database and the results are taking too long to get, is there any way of speeding it up?

    I am using the "fetch all" vi to do this, but it is retrieving one record at a time, (if you examine the block diagram) How can i retrieve all records in a faster more efficient manner?

    If this isn't faster than your previous method, then I think you found the wrong example. If you have the Database Connectivity Toolkit installed, then go to the LabVIEW Help menu and select "Find Examples". It defaults to searching for tasks, so open the "Communicating with External Applications" and "Databases" and open the Read All Data. The List Column names just gives the correct header to the resulting table and is a fast operation. That's not what you are supposed to be looking at ... it's the DBTools Select All Data subVI that is the important one. If you open it and look at its diagram, you'll see that it uses a completely different set of ADO methods and properties to retrieve all the data.

  • How do i store and fetch image from the Database(Access)

    i am facing one problem in inserting the image into the database.the steps i followed as
    1)i have created one database(access) as "Image" and into that one table as "Image" and field as "image"
    type of the field is ole object.
    2)i have inserted one image into the image field through "database.vi"
    3)now i am trying to get the image from the database by "Fetching Example.vi"
    4)it will succesfully retrieve the image from that field .
    5)but when i close the both programs and reopen those that time i am unable to get retrieve the image.
    Attachments:
    Add_to_Database.vi ‏78 KB
    Fetch_from_database.vi ‏67 KB

    I would like to suggest different approach for saving the images in the database.
    I was working on Medical Imaging Company. The way we save the images in real-time was by writing the name and path of the images to database.
    The images themselves where saved directly to disk.
    I don�t think that access is very good in taking care of GBytes of data.
    It happens some time that the database gets damage. If you have the images separately you can create fix procedure. (We had one).
    Good Lack,
    Amit Shachaf,

  • Can BI Publisher read the images from the Database?

    Hi All,
    Can BI Publisher read the images from the Database?
    if yes how it can be achieved?
    Thanks
    Aravind

    Hi,
    There is an example in oracle db. Use the schema PM (Print Media).
    Select the corresponding table that contains the column AD_PHOTO.
    In your RTF template simply to print the image stored in the db use:
    <fo:instream-foreign-object content-type="image/jpg"> <xsl:value-of select="AD_PHOTO"/>
    </fo:instream-foreign-object>
    RUn the RTF template and it should show you all.
    Cheers
    Jorge
    p.s. If this answers your question then please grant the points and close the thread

  • How do you copy images from the internet and paste them on Microsoft Word

    I'm trying to copy images from the internet and trying to paste them on to Microsoft Word and Powerpoint for an assignment but it's not working. I tried to use copy and paste and then paste special but nothing is working. Saving the image onto documents and trying to open them on Microsoft Word still doesn't work.
    PLEASE HELP!!!
    Thank you

    Hi Lily, and welcome to Apple Discussions.
    A screenshot can capture almost anything you're viewing. Hold the command and shift keys down, then press the 4 key and release all keys. Hold down the mouse button and drag the cursor to the size/area of the image you want to capture. Release the mouse button and you've captured the image. Remember that it is the individual's responsibility to respect copyright laws.

  • Display Image from the database but prevent it from refreshing on every pages

    Hi there,
    I can see there are many discussions around this but my query is slightly different. I'm writing this on behalf of one of my developers. (sorry for my ignorance on techie stuff.. :-))
    A logo is being displayed on a few pages, which is called from the database. However, the problem is that  - this logo refreshes every time when you traverse to each page causing a performance issue or sometimes slow loading of the image.
    My question is - how do we stop it from loading on each page from the database?.  I would rather load once when the main page loads initially and then maintain this on other pages too.
    We can keep this logo on a file system (FS)  and display it via CSS/HTML/frame but since we want to keep it flexible/dynamic where a user can upload a new one whenever it changes and hence DB seems to be the suitable option (in my opinion).
    Can someone please help?
    If you need any further info around the coding how it is being done at present, pls let me know.
    Thank you

    read this http://docs.oracle.com/cd/B28359_01/appdev.111/b28393/adlob_tables.htm#g1017777
    you can cache lobs in the database too
    you can also upload the pic in your file system using utl_file package and then put the image in the working directory mentioned in i.war
    you can then reference the image and it will not be stored in the database and will be cached
    Regards,
    Vishal
    Oracle APEX 4.2 Reporting | Packt Publishing
    Vishal's blog

  • I want to download an image from the url and image is in byte format

    hi
    i want to download an image from the url
    http://www.tidelinesonline.com/mobile/j2me_v1?reqType=imageJoin&imageCount=1&month=1&day=1&year=2008&id=1&imageWidth=230&imageHeight=216&imageDepth=8&imageUnits=feet&imageType=JPG&msisdn=456
    first 5 digits will be the length of the image,we need to download except first 5 digits and display an image file
    i need to finish this today
    pla reply if any body knows solution for this.
    thanks in advance
    Mraj

    You do not need to do anything - iPhoto always keeps the original and you can revert to it at any time
    If you want to be able to see the original and the cropped version in iPhoto at the same time duplicate the photo (this does not really duplicate but simply starts a new edit stream for the photo - command-d) and crop the duplicate
    LN

  • How to paste an image from the database by creating a new page?

    Hai,
    i'm trying to paste more than 6 images in two pages...
    The condition is that i want to paste only 3 images in a page.
    When the first 3 images were pasted... i want a new page to be automatically created and the next or 4th image will be pasted on the
    next page...
    i have codings for creating a new page and for pasting the image...
    But how shall shall i paste the 4th image in the next page...
    Can any one plzz explain me...

    >
    Hi, I'd like to display a dynamic image from the web inside a JLabel or any other swing component it could work in. I've been looking on the Swing tutorials and others forums, all I can have is that a JLabel can load an Icon object, defined by an image URL, but can this URL be like "http://xxxxx/image.jpg" somehow or can it only be a local image URL?>
    I do not know why you start talking about an image on the web then go on to show concerns about whether it will work for a 'local' URL.
    But perhaps this answer will cover the possibilities.
    So long as you can from an URL to the image, and the bytes are available for download (e.g. some web sites wrap a direct call to an image in HTML that embeds the image), the URL based icon constructors will successfully load it.
    It does not matter if that URL points to
    - a web site,
    - a local server ('localhost'),
    - an URL representation of a File on the local file system, or
    - it is inside a Jar file that is on the application's run-time classpath.
    How you go about forming a valid URL to a 'local resources' (or indeed what you regard as local resources) is another matter, depending on the form of the project, and how the resources are stored (see list above).
    Probably the main reason that examples use images at a hard coded URL on the net is that it makes an 'image example' self contained. As soon as we compile and run it, we can see the result. I have posted a few examples like that on these forums.
    Edit 1:
    BTW - Welcome to the Sun forums
    Edited by: AndrewThompson64 on Apr 21, 2009 12:15 PM

  • I want to download and image from the url and image is in byte format

    hi
    i want to download the image from the url:
    http://www.tidelinesonline.com/mobile/j2me_v1?reqType=imageJoin&imageCount=1&month=1&day=1&year=2008&id=1&imageWidth=230&imageHeight=216&imageDepth=8&imageUnits=feet&imageType=JPG&msisdn=456
    can any one help me to do this i need to finish this today plz help me.
    first 5 character 09593 is the length of the image we need to substract image length from total length.
    thanks in advance
    M.Raj
    Edited by: Mraj.Bangalore on May 15, 2008 12:01 AM
    Edited by: Mraj.Bangalore on May 15, 2008 12:01 AM

    hi
    thanks for the reply,
    that works only if .png file is there in the path.
    i worked it out, it is working fine now
    try
                   httpConn = (HttpConnection)Connector.open(url);
                   is=httpConn.openInputStream();
                   responseCode = httpConn.getResponseCode();
                   if(httpConn.getResponseCode() == 200)
                             ByteArrayOutputStream bStrm = null;
                             byte[] data = new byte[512];
                             int contentLen = httpConn.getHeaderFieldInt("Content-Length", 0);
                             if(contentLen > 0)
                                  response = new byte[contentLen];
                             else
                                  bStrm = new ByteArrayOutputStream();
                             int count = 0, tmp =0;
                                  while ((count = is.read(data)) >= 0)
                                       if( contentLen > 0 )
                                            for(int i=0;i<count && tmp+i < contentLen;i++)
                                                 response[tmp+i] = data;
                                            tmp += count;
                                       else
                                            bStrm.write(data, 0, count);
    //                                    if( aborted)
    //                                         break;
                                  data = null;
                                  System.gc();
                                  if( contentLen <= 0 )
                                       response = bStrm.toByteArray();
                                       bStrm.close();
                                       bStrm = null;
                                       System.gc();                                   
                        else
    //                          main.showAlert("ERROR","Connection failed.Please access again later");
    //                          main.changeToMain();
              catch(Exception e){
                   response = null;
                   responseCode = 0;
    //                main.showAlert("ERROR","Connection failed.Please access again later");
    //                main.changeToMain();
              catch(OutOfMemoryError e){
    //                main.showAlert("ERROR","Not enough memory, please disable some apps or delete files and try again.");
    //                main.changeToMain();
              finally
                   System.out.println("Before Creation"+response.length);
                   img = Image.createImage(response, 5, response.length-5);
                   System.out.println("After Creation");
                   CanvasImageFile canvas = new CanvasImageFile(this);
                   midlet.display.setCurrent(canvas);
                   try
                        if( is != null )
                             is.close();
                             is=null;
                   catch(Exception ex){
    //                     main.showAlert("ERROR","Connection failed.Please access again later");}
                             if( httpConn != null )
                             try {
                                       httpConn.close();
                                  } catch (IOException e) {
                                       // TODO Auto-generated catch block
                                       e.printStackTrace();
                             httpConn=null;

  • I need to download image from the url and the image is in byte format.

    hi
    i need to download image from the url
    http://www.tidelinesonline.com/mobile/j2me_v1?reqType=imageJoin&imageCount=1&month=1&day=1&year=2008&id=1&imageWidth=230&imageHeight=216&imageDepth=8&imageUnits=feet&imageType=JPG&msisdn=456
    first 5 digits will be its length,we need to download except 5 digits.
    can any one know how to do that.
    thanks in advance
    Mraj

    hi
    i need to download image from the url
    http://www.tidelinesonline.com/mobile/j2me_v1?reqType=imageJoin&imageCount=1&month=1&day=1&year=2008&id=1&imageWidth=230&imageHeight=216&imageDepth=8&imageUnits=feet&imageType=JPG&msisdn=456
    first 5 digits will be its length,we need to download except 5 digits.
    can any one know how to do that.
    thanks in advance
    Mraj

  • Manupulate the data from the database and update it back

    hi. i was wondering if it is possible to manupulate the data that we get from the resuletSet and do some manupulation and and again update it back to the same row and column. i tried to do it but could not get it. eg. i want to increase the salary by 10% for all the employee in the salary table. i dont want to use the SQL statement. instead i want to use the java program to increase the salary by 10%.
    what i did was, i selected all the records in the table in the resultset and then i stored the salary one by one through the loos using rs.next() and manupulated the salary by the formula
    salary=salary + salary*10/100.
    then i want to update all the employee with this new salary. i dont know whether it is possible or not.
    i tried to have an UPDATE statement in the while loop with rs.next with the condition but the loop gets terminated once it tries to execute the UPDATE statment and doesnot give any result.
    any help or suggestion will be highly appreciated.

    Here's the general long hand way of doing it. You should also look into your JDBC driver and the use of updateable ResultSets for more effeciency.
    public class SalaryObject {
        private int rowId = 0;
        private double salary = 0.0;
        public void setRowId(int rowId) {
            this.rowId = rowId;
        public int getRowId() {
            return rowId;
        public void setSalary(double salary) {
            this.salary = salary;
        public double getSalary() {
            return salary;
    }Withing your dataccess class:
    Vector salaries = new Vector();
    ResultSet rs = statement.executeQuery("SELECT rowId, salary FROM YOUR_SALARY_TABLE)
    if (rs != null) {
        while(rs.next()) {
            SalaryObject salaryObject = new SalaryObject();
            salaryObject.setRowId(rs.getInt("rowId"));
            double newSalary = rs.getDouble("salary");
            newSalary += newSalary*10/100;
            salaryObject.setSalary(newSalary);
            salaries.add(salaryObject);
        Iterator iter = salaries.iterator();
        while(iter.hasNaxt()) {
            SalaryObject salaryObject = (SalaryObject) iter.next();
            updateSalary(salaryObject.getRowId, salaryObject.getSalary);
        public int updateSalary(int rowId, double newSalary) {
            Connection con = new java.sql.Connection();
            String sql = "UPDATE YOUR_SALARY_TABLE SET salary = ? WHERE rowId = ?"
            PreparedStatement pStmt = con.prepareStatement(sql);
            int success = 0;
            try {
                pStmt.setDouble(1, newSalary);
                pStmt.setInt(2, rowId);
                success = pStmt.executeUpdate();
            } catch (SQLException sqle) {
                // handle exception
            } finally {
                try {
                    if (pStmt != null) pStmt.close();
                    if (con != null) con.close();
                } catch (SQLException sqle) {}
        }

  • Ok. Add me to the moron list. I guess I am an over zealous trash emptier. Can I retrieve those images from the vastness by entering my time machine and restore the library from a previous date (when I wasn't a moron?)

    Ok. Add me to the moron list. I guess I am an over zealous trash emptier. Can I retrieve those images by entering my time machine and restoring the Iphoto library from a previous date (when I wasn't a moron?)

    Masters is where you want to be. They'll be in there in folders based on the date and time they were imported.
    Regards
    TD

  • Subject Retrieving Word docs from the database thru reports

    I have saved Word documents in an Oracle 7.3 database using OLE
    thru Forms. I want to retrieve the docs in the reports
    automatically as the particular report runs..How can i retrieve
    these docs in from the developer reports...Can any one help me
    in this problem
    null

    bumping to the top!

Maybe you are looking for