How to read image present in a csv file ---- required urgently

Hi,
I have a task. where i will be given a csv file which consists of text and images. Reading text is ok but how can i read images present in the csv.
Does anybody have any suggestions.
Regards,
Nag.

what format are the images in?
do you know the size of the image?
How will you know if a character that shows up as ',' is really part of the image or not?
If you know the size, it can be done, just treat the whole file as a 'binary' file and go at it from that perspective.
if you have control over the format, it would be better to only store the name of the image in the csv file and just have the full path name in the portion that is in the csv file. then the actual file can hold the binary format specific data.
if you don't, then you need to know the size of the image before you start loading the image into a memory buffer. you will also need some sort of 'delimiter' or keyword that says an image is coming next
ie:
%%image_block_follows%%,5016,asdfasd399c9e939d9c9
where 5016 would be the number of bytes following the next comma. imbedded commas would not be treated as separators until you get to byte relative + 5017, and the bytes described above would probably look a bit more unreadable.

Similar Messages

  • How to read the and Write the PDF file give me the solution

    Hi all,
    How to read the and Write the PDF file give me the solution
    My coding is
    import java.io.File;
    import com.asprise.util.pdf.PDFImageWriter;
    import com.asprise.util.pdf.PDFReader;
    import java.io.*;
    import java.io.FileOutputStream;
    public class example {
    // public example() {
         public static void main(String a[])
              try
              PDFReader reader = new PDFReader(new File("C:\\AsprisePDF-DevGuide.pdf"));
                   reader.open(); // open the file.
                   int pages = reader.getNumberOfPages();
                   for(int i=0; i < pages; i++) {
                   String text = reader.extractTextFromPage(i);
                   System.out.println("Page " + i + ": " + text);
    // perform other operations on pages.
    PDFImageWriter writer = new PDFImageWriter(new FileOutputStream("c:\\new11.pdf"));
                   writer.open();
                   writer.addImage("C:\\sam.doc");
                   writer.close();
                   System.out.println("DONE.");
    reader.close();
              catch(Exception e){System.out.println("error:"+e);
              e.printStackTrace();
    I get the pdf content then it returns the string value but ther is no option to write the string to PDF, and we only add a image file to PDF,but i want to know how to wrote the string value to PDF file,
    Please give response immtly
    i am waiting for your reply.
    thanks,
    Suresh.G

    I have some question flow
    How library to use this code.
    I try runing but have not libary.
    Please send me it'library
    Thank you very much!

  • How can i import contacts from a csv file to "iCloud Contacts"?

    How can I import contacts from a csv file to "iCloud Contacts"?

    The only way I know of to import cells from a csv file is by creating a new file.  But then you can select the desired cells and copy them to the other file.  I just did it to be sure it works.
    1. Create the new spreadsheet file via the upload command.
    2. Select the cells (table) that you want to move to the other file and press command+C (copy).
    3. Close the new file and open the existing file.
    4. Select the top/right cell of the area to receive the copied "table" and press commant+V (paste).
    I hope this is what you're trying to do!

  • How to import data from excel or csv files to Oracle table

    hello everybody,
    I am new here and new in Oracle. I would like to know the steps how to import data from excel or csv files to Oracle table.
    Let say I already have table inside the Oracle. Then my user give me the sets of data inside the Excel Worksheet.
    So, how can I import the excel data into Oracle table.
    Thank you in advance.
    cheers,
    shima

    Even easier. Download JDeveloper 11G from this site.
    Set up the database connection, right click on the table, select Import->Excel and specify your file to load it. On the import pop-up, you must view and update each tab indicating Columns, Data Types, and DML.
    Columns -- move the selected columns that you want to load to the box on the right
    Data Types -- select column name from second column to which the data for each column of the import file should load
    DML -- click this tab to generate the INSERT SQL
    Once done click 'Insert'

  • How to read the content of a text file (by character)?

    Guys,
    Good day!
    I'm back just need again your help. Is there anyone knows how to read the content of a text file not by line but by character.
    Please help me. Thank you so much in advance.
    Jojo

    http://java.sun.com/javase/6/docs/api/index.html
    package java.io
    InputStream.read(): int
    Reads the next byte of data from the input stream.
    Implementation:
    InputStreamReader
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes them into characters using a specified charset. The charset that it uses may be specified by name or may be given explicitly, or the platform's default charset may be accepted.

  • Help on how to read the content of an XML file from the payload

    I have a receiver channel / mail adapter, that sends e-mails with a XML attachment.
    I’m trying to write a Bean, that should make it possible to rename the attached XML file dynamically.
    In the Bean I want to read the content of the attached XML file, it could be the “order number”.
    The filename should then be “Order number”.XML.
    <u><i>Can anyone help me with how to read the content of the XML file from the payload.</i></u>
    <i><b>Frank</b></i>

    hi,
    check this: http://jakarta.apache.org/poi/

  • How to read the content of ms-word file use pure java???

    how to read the content of ms-word file use pure java???

    hi,
    check this: http://jakarta.apache.org/poi/

  • How can read/write FORMSWEB.CFG & DEFAULT.ENV file entries programatically?

    Environment: Forms 9i (Web)
    As : Oracle 9i As
    How can read/write FORMSWEB.CFG & DEFAULT.ENV file entries programatically?

    I guess you cannot. There is an enhancement request to get the name of the config-section as a GET_APPLICATION_PROPERTY.
    What you could do is add extra parameter(s) to your form and pass the necessary formsweb.cfg parameters in this form parameter. See Get formsweb.cfg section name in Forms for more info and an example.

  • How to read contents of more than 2 files.

    hi all
    help me.
    How to read contents of more than 2 files.
    For reading a file contents we uses normally FileInputStream
    For reading two file contents we uses normally SequenceInputStream
    But which class we have to use for reading contents of more than 2 files at a time
    thanks in advance.

    SequenceInputStream can be used for reading any number of input streams (not at once, but one after the other).
    This involves making an Enumeration that returns the input streams you want to read. Depending on what you want to do, it might be just as easy to read them one after another.
    Or consider making a Vector of your input streams and using its elements() method. Like this:(untested)Vector<InputStream> inVec = new Vector<InputStream>();
    inVec.add(new FileInputStream("foo.dat"));
    inVec.add(new FileInputStream("bar.dat"));
    inVec.add(new FileInputStream("baz.dat"));
    // later...
    SequenceInputStream in = new SequenceInputStream(inVec.elements());

  • How to read SYstemstate level 266 dump trace file?

    Hi I have simple question regarding documentation availability.
    How to read SYstemstate level 266 dump trace file?
    I tried googling it but didnt find any good article?

    Hi,
    It is supposed to graph frequency content vs time, and the display I get comes all black. Look at the attachments for the load state, the first one is the legacy SW and the second one is the modified one.
     I put probes on them, and the legacy one gets the 250,000 from the Value embedded. The modified one it is supposed to get it from the sample rate path, please let me know if this is enough info, thanks. 
    LabVIEW Intermediate I level!
    Attachments:
    sample rate-load state legacy.JPG ‏174 KB
    sample rate-load state modified.JPG ‏198 KB

  • How to read iCal events from SQLite Cache file?

    I need to figure out how to read event entries in the Cache file stored in /Library/Calenders/ as my actual events have been corrupted due to a file system problem. The example below shows the information I have for each entry, where the event in the entry was Bon Jovi Concert, however I am confused how I can read the date and time of the event, information I believe is stored as 218215639,219613081,219524400,219540600. Any help is greatly appreciated.
    INSERT INTO "ZCALENDARITEM" VALUES(0,NULL,0,NULL,0,5,NULL,6,4039,NULL,0,0,0,0,0,0,2,23,0,0,0,0,6,0,21821563 9,219613081,219524400,219540600,NULL,NULL,NULL,NULL,NULL,'local_AFB8D342-2DAE-4F A1-A9A6-3FA9B28B5C7C','Bon Jovi Concert',NULL,NULL,NULL,'Europe/London',NULL,'0E17BBB6-0E76-4024-8DD7-60E43D38D 35B');

    OK, here we go ... I hope. I have tried it on my iCal, with about 2000 entries, and it worked. I cannot guarantee that it will work for you.
    Make a new text file from sql as before, but using this modified command to get additional data for each event:
    sqlite3 Desktop/Hope 'select ZSTARTDATE, ZCALENDARITEM.ZTITLE, ZENDDATE, ZNODE.ZTITLE, ZISALLDAY, ZRECURRENCERULE, ZISDETACHED from ZCALENDARITEM inner join ZNODE on ZCALENDARITEM.ZCALENDAR = ZNODE.Z_PK where ZSTARTDATE not null' >hope.txt
    I suggest you make a new user account, then copy the text file hope.txt and the script to the Public/Drop Box folder for that account. Log on to the new account and copy the two files from the drop box to the Desktop. Start iCal and make new calendars to match those in your ordinary account. Double click the script to open it in Script Editor and CHANGE THE DATE RANGE in the "set ThePeriod" line. Stand well back and click the run button. Every 50 records processed it will pop up a progress box, which will pop down again after a second. Go for lunch.
    When it is finished see if things look OK in iCal. If they do export each of the calendars, copy them to the drop box of your normal account and return to your normal account to import them.
    If there is an error make a note of the error message and line number, find that line in the text file, and post it here with a couple of lines either side.
    Note that for recurring items iCal normally only makes a single event, the first occurrence, then uses a recurrence rule to calculate if the event should be displayed in the current window. If there are any recurring events in the period you have selected where the first occurrence is before the period they will not be recreated. Where however you have changed a single occurrence of a recurring event iCal makes a new, detached, event. Any of these in the period will be detected. If their original event was also in the period they will now appear in the iCal display as duplicates. For easy spotting of these, I have prefixed "XX-" to the title of any detached events.
    AK
    <pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:400px">on run
    set ThePeriod to {date ("jan 1 2008"), date ("dec 31 2008")} --CHANGE THIS BEFORE RUNNIN
    set TheFile to open for access (path to desktop as text) & "temp.txt"
    set TheContents to read TheFile --until return
    close TheFile
    set TheLines to paragraphs of TheContents
    set OldDelim to AppleScript's text item delimiters
    set AppleScript's text item delimiters to {"|"}
    set LCount to 0
    set ACount to 0
    set RCount to 0
    set DCount to 0
    set SCount to 0
    set HowMany to (count of TheLines)
    try
    repeat with ThisLine in TheLines
    if (count of ThisLine) is 0 then exit repeat
    -- Start Date, Title, End Date, Calendar, All Day, Recurs, Detached
    set LCount to LCount + 1
    set Details to text items of ThisLine
    set MyStartDate to FixMyDate(item 1 of Details)
    set MyTitle to item 2 of Details
    set MyEndDate to FixMyDate(item 3 of Details)
    set MyCalendar to item 4 of Details
    set MyAllDay to item 5 of Details
    set MyRecurs to item 6 of Details
    set MyDetached to item 7 of Details
    if MyAllDay is "1" then set ACount to ACount + 1
    if (count of MyRecurs) > 0 then set RCount to RCount + 1
    if MyDetached is "1" then set MyTitle to "XX-" & MyTitle
    if MyDetached is "1" then set DCount to DCount + 1
    if (MyCalendar is not "Birthdays") and (MyStartDate ≥ item 1 of ThePeriod) and (MyStartDate ≤ item 2 of ThePeriod) then
    tell application "iCal"
    tell calendar MyCalendar
    set ThisItem to make new event at end of events with properties {summary:MyTitle, start date:MyStartDate}
    end tell
    tell ThisItem
    if MyAllDay is "1" then set allday event to true
    if (count of MyRecurs) > 0 then set recurrence to MyRecurs
    set end date to MyEndDate
    end tell
    end tell
    else
    set SCount to SCount + 1
    end if
    if (LCount mod 50) = 0 then
    set the_message to "Processed " & (LCount as string) & " of " & (HowMany as string)
    display dialog the_message buttons {"Cancel"} giving up after 1
    end if
    end repeat
    on error TheError
    display dialog "Error: " & TheError & " about line " & LCount
    end try
    set AppleScript's text item delimiters to OldDelim
    display dialog (LCount as string) & " lines processed" & return & "All Day: " & (ACount as string) & return & "Recurs: " & (RCount as string) & return & "Detach: " & (DCount as string) & return & "Skipped: " & (SCount as string)
    end run
    on FixMyDate(MyDate)
    date (do shell script "date -r " & MyDate & " -v+31y +%e'/'%m'/'%y' '%T")
    end FixMyDate
    </pre>

  • How to read the TEXT TABLE (or) .CSV in HSQLDB Standalone using Java

    Hi, I like to use the text tables in our application. And like to use the HSQL Database Engine as Standalone. I created the text tables, those are stored in the disk as ".CSV" files. But i am unable to read that text table (.CSV) when i relogin and gave the CSV file path as URL along with "jdbc:hsqldb:file". So can anybody give me the tips how use the text tables.
    Regards,
    Vinay

    You need to make a URLConnection to the page you want, and get the input stream from that page.
    The contents of the input stream (use a reader to get them) will give you the raw HTML code. Use a parser to get the actual content. I dont know of a parser offhand, but you can search for one.

  • How to read images in jsp from an absolute path not from the web app?

    hello there
    i want to read images from an absolute path on the hard disk not from the images folder in the web application
    how to do that?
    thank you

    Ok. You don't give the servlet the full path of an image. You just give an image id in query string. E.g.
    http://my.server.com/imageServlet?id=12Id can be whatever: number as well as name.
    Then, in your servlet You get this id, then read an image file that is mapped for this id and sends it to browser via servlet output stream.
    On the jsp page you write sth similar to:
    <img src="http://my.server.com/imageServlet?id=12"/>and your image will be displayed using your servlet. The image file path is needed only in the servlet code to open the stream to file (image file can be stored wherever you want in file system), read it and write to output stream. Read the tutorial accessible via link I provided in the previous post.

  • How to read Image data from oracle DB?

    How to read a oracle database object ORDSYS.ORDImage from oracle
    database?
    I can get a oracle.sql.STRUCT object from the database, but i can not
    find the way to convert data to a image object(like oracle.ord.im.OrdImage)
    I had used "OrdImage imgObjj1 =
    (OrdImage)rs.getCustomDatum(1, OrdImage.getFactory());"
    it's a example from oralce.
    But OracleResultSet.getCustomDatum() method is already deprecated,
    i can't find a new method to instead of it.
    Who can help me ? Thank you!
    [email protected]

    More than likely, this is the interface you will use:
    java.sql.Blob
    http://java.sun.com/j2se/1.4/docs/api/java/sql/Blob.html
    Once you get the blob, construct a Raster objects from the Bytes you receive from the blob. Then you can create an Image, ImageIcon, BufferedImage, whatever with the Raster object.
    Good luck!

  • How to read images from local hard disk and display in tile layout

    Dear Folks,
    I have 100 images in a folder @ local hard disk (E drive).
    I would like to display them in Tile view of 3X3.
    I have options (Radio buttons) to chnage the layout at runtime to 4X4 , 5#5 and 6X6.
    Also when the change in layout happens, I wanted to make use of backgroudLoading of image view so that user do not want to wait till the entire tile loads.
    How do I achive this requiremet?
    Sample code if any of great help. Thanks in advance.
    Edited by: JavaFX_Duo on Jul 9, 2009 12:02 PM

    1. So I would like to know which is the {color:#3366ff}best way to load local images in ImageView{color}.I'm no expert, but is there a reason that you are using Swing to do the loading?
    2. secondly, currently the system displays all images only after the completion of creating all images. {color:#3366ff}How to display images as and when they are created.{color} So that the user has a feeling that the images are loading.JavaFX Image class let you display a lightweight placeholder, and you can bind the progress to some kind of visual indicator. I don't think you can display an image that is partially loaded.
    def PATHS: String[] = [
        "C://Ariel Atom//ariel-atom-1.jpg",
        "C://Ariel Atom//ariel-atom-2.jpg",
        "C://Ariel Atom//ariel-atom-3.jpg",
        "C://Ariel Atom//ariel-atom-5.jpg"
    function getImage(path: String): Image {
        Image {
            url: "file:///{path}"
            backgroundLoading: true
    Stage {
        title: "Image Tiles"
        width: 1024
        height: 800
        scene: Scene {
            content: [
                Tile {
                    columns: 2
                    tileWidth: 400
                    tileHeight: 400
                    content: for (i in [0..3]) {
                        ImageView {
                            image: getImage(PATHS)

Maybe you are looking for

  • How to Print a View...

    Hi I just want to take a print out of my view and i know that in previous version we could write the following code on View's Button: WDPrintService.getPrintService().print(wdControllerAPI); but don't know in CE 7.1. Thanks...

  • Upgrade Release 11.5.10.2 to Release 12

    Hi All, I am planning to upgrade from 11.5.10.2 to R 12. Our current RDBMS version is 9.2.0.5. But we are having two application instances on same box that resides on same OS RHEL 3. So while the upgrade process we have to make changes in OS also. i

  • Creating a Factory in ABAP.

    HI , I have a requirement to implement the Factory pattern for my class. I have declared my class as private so that direct instantiation is avoided. A factory class has been created to instantiate my class , but i cannot instantiate my class since m

  • How does UCMhome\weblayout\resources\bundle.js get populated in 11g?

    Hi, I am working on a feature in a component of the UCM 11g,which requires an asynchronous service request to the CONTENT SERVER.This is achieved through YUI async call. This call is in a function which in turn is included in a common include resourc

  • ITunes displaying asian languages one day, boxes the next

    My music is almost entirely made up of Japanese and Korean music. A lot of the song titles/band titles are in kanji and hangul, which iTunes used to not have a problem with. It just recently started displaying boxes instead of the characters and in m