How to read files from cq5..

Hi,
Here i want to get a pdf file from the "/content/myproj-data/docs/demo.pdf" path and then want to convert this into images...(I am using cq5.6.1)
Whenever i started this process using the File I/O stream, i am not able to get the pdf file from the above path .....whenver i took from the static localpath (d://files/demo.pdf) i am able to fulfill my requirement ..
Here whats happening is, when pass /content/myproj-data/docs/demo.pdf to the InputStream , it is changing as "\content\myproj-data\docs\demo.pdf" (Instead of "/" itz taking "\").
Is there a better way to read pdf file from cq5 and convert into image??
Please share!!!
Thanks in advance
Sony C.

what kind is the different machine?
if it is UNIX,you can use following code:
URL url = new URL("ftp",server,port,file);
InputStream reader = url.openStream();
reader.read()
if it is windows,you may be need to install a FTP agent.

Similar Messages

  • [Urgent] How to read files from different directories?

    I am new to Java Programming, I would like to know how to read files from directories other than the current one? (example as follows)
    ProjectDirectory
    |--MainDirectory
    |--MainProgram.java
    |--SupplementDirectory
    |--SupplementProgram.java
    |--Pictures
    |--Image.gif
    What should I write in the MainProgram.java so that I can use the supplementProgram.java from MainProgram and read the Image.gif file from the MainProgram.java?
    Thanks

    Run through the I/O tutorial here. It should get you up to speed on this sort of thing...

  • How to read file from server

    Hi,
    When i try to read file from server,the following message is displayed .
    ORA-29532: Java call terminated by uncaught Java exception: java.security.AccessControlException: the Permission (java.io.FilePermission /tmp read) has not been granted to EWMTRACKTEST. The PL/SQL to grant this is dbms_java.grant_permission( 'EWMTRACKTEST', 'SYS:java.io.FilePermission', ' /tmp', 'read' )
    ORA-06512: at "EWMTRACKTEST.GET_DIRLIST_EWM", line 1
    ORA-06512: at line 1
    thanks and regards
    P Prakash

    it seems obvious, user EWMTRACKTEST doesn`t have access to directory /tmp and the file under that.
    try to give read permission and try again.
    you could use command line like 'chmod' to grant permissions.

  • How to read file from remote machine

    Hello,
    Hi, i would like to know how to read text file from remote machine using java source code, any code ?
    Thanks very much;
    Best regards
    Kim

    On the server, perform the following steps:
    Parse the request and determine the file to serve
    Open a FileInputStream to the appropriate file
    Obtain a reference to the Servlet OutputStream
    Pipe the bytes from the file to the output stream
    Flush and close the streamYou might want to call HttpServletResponse.setContentType("application/octet") to indicate to the browser that a file download will be occurring. Do so before getting the reference to the Servlet's OutputStream.
    - Saish

  • How to read file from prsntn server in Inbound idoc FM.

    Hi Experts,
    I am new to idoc.
    I have requirment that i need to read a file from presentation and application server and put in inbound idoc FM.Idoc will be processed in batch.
    How can i put selection screen in FM and read the file?or how can i proceed  with the solution?
    Please help..
    Umesh

    Hi Umesh,
    My understanding on your requirement is to read a file from pres. server and pass the data to an IDoc function module. Am I correct?
    If this is the case then you can create a report which picks up the file from pres. server and then read data from the file and pass it to the parameters of the required function module.
    Hope this helps.
    Regards,
    -Sandeep

  • How to read file from server if I have a logical file path?

    Hi guys,
    I'm having a pretty "on the run" question,
    My program is currently reading a file from server using "open dataset" with file path like this (just example)
    /usr/interface/abc/bcd/testfile.dat
    Now I got a requirement to make it more consistent to read files, instead of reading that physical file name, I should read the files from a specific folder using logical path.
    So I go to T code "FILE" and created a logical path called ZABC_FILE_PATH, unix compatible, with physical path is (for example),
    /usr/interface/<sysid>/<client>/<filename>
    My question is, can I still use open dataset statement to read this? if yes, how do I do that? If no, there should be alternative way, please let me know what you think. Thanks,

    Thanks all, I figured it out.
    ONe thing is that typo double quote
    The other thing is the importing part, I need the full file path.
    CALL FUNCTION 'FILE_GET_NAME_USING_PATH'
      EXPORTING
        CLIENT                           = SY-MANDT
        logical_path                     = 'ZABC_MY_LOGICAL_FILE_PATH'
    *   OPERATING_SYSTEM                 = SY-OPSYS
    *   PARAMETER_1                      = ' '
    *   PARAMETER_2                      = ' '
    *   PARAMETER_3                      = ' '
    *   USE_BUFFER                       = ' '
        file_name                        =  v_1
    *   USE_PRESENTATION_SERVER          = ' '
    *   ELEMINATE_BLANKS                 = 'X'
      IMPORTING
        FILE_NAME_WITH_PATH              = v_what_I_need
    * EXCEPTIONS
    *   PATH_NOT_FOUND                   = 1
    *   MISSING_PARAMETER                = 2
    *   OPERATING_SYSTEM_NOT_FOUND       = 3
    *   FILE_SYSTEM_NOT_FOUND            = 4
    *   OTHERS                           = 5
    I really appreciate your contributions, thanks again!

  • How to read files from MIT-BIH arrhythmia database using labview

    hello friends,
    How can i read the files from MIT-BIH arrhythmia database using labview 8.6. These file extensions are in different format ie is .atr, .dat and .hea
     The link for the following database is below, any example vi for reading this data in labview would be very useful.
    http://www.physionet.org/physiobank/database/mitdb​/
    Message Edited by infra444 on 01-27-2009 07:01 AM

    You will find some help here.
    http://www.physionet.org/physiotools/matlab/#wfdb
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

  • How to Read file from Application in DMZ Server (page on DMZ)

    Hi All,
    i am trying open a file from application server from OAF page on DMZ server .
    i am getting the error 'either not supported file type or file is damaged '.
    i am taking the path of production server to read the file from DMZ server .
    Please let me know what is the issue .
    Thanks
    Raju

    Please post the details of the application release, database version and OS.
    i am trying open a file from application server from OAF page on DMZ server .Is the issue with all OAF pages or with specific ones only?
    i am getting the error 'either not supported file type or file is damaged '.Please check Apache log files for details about the error (error_log* and access_log*).
    i am taking the path of production server to read the file from DMZ server .What type of DMZ configuration you have?
    Thanks,
    Hussein

  • How to read files from the menu prompt

    Hi all the experts here, help me plz
    this is the menu
    R - Read a batch of student marks from a file
    D - Display a table of student results
    Q - Quit from the program
    when user press R the program has to read a file. The default file name is results1.txt
    but my teacher is gonna change the file name when she tests it.
    so i can't put the fixed file name. i have to read the file name from the command
    prompt
    The user will type the file name and i just have to read that file..but..its hard for the
    biginner...THX guys

    help me guys plz im really stuck man
         public char promptMenu()
              System.out.println ("R - Read a batch of student marks from a file");
              System.out.println ("D - Display a table of student results");
              System.out.println ("Q - Quit from the program");
              char answer = Keyboard.readChar();
              return answer;
    after user press 'R'
    then i have to read a file whatever the user enters..

  • Dynamic Routing? how to read files from 2 different directories?

    i need to do that..pick files but from 2 different locations..
    any simple idea?
    yes, the best simple is to have 2 bpels listenening to each directory...
    can i create only 1 BPEL?
    i heard about Dynamic Routing...too complex?
    Thanks!
    Pablo.

    Hi,
    I guess you can try it with Pick as the initial activity( With Create Instance Checked) and you map your two File Adapter to two On Message branches..
    I guess this should work but i am not sure how far this is reliable.. with Pick..
    Worth giving a try..
    Thanks,
    Jp

  • How to read files from current directory for applet

    I have an applet that needs to read some audio files located in its current directory on the server and I just can't seem to figure it out...maybe I am being dumb...any help?

    You can use the ListSorter File Adapter Configuration property to sort based on timestamp. Basically add the following property to the inbound JCA file:
    <property name="ListSorter"
    value="oracle.tip.adapter.file.inbound.listing.TimestampSorterAscending"/>
    <property name="SingleThreadModel" value="true"/>
    More info see section 4.2.6 in http://docs.oracle.com/cd/E23943_01/integration.1111/e10231/adptr_file.htm

  • Oracle read files from FTP Server

    Hi,
    Somebody knowns Oracle how to read files from FTP Server ? Which package I can use?

    Duplicate post
    Oracle read files from FTP Server

  • HOW TO DELETE FILES FROM ADOBE READER IF THEY ARE UNNECESSARY

    HOW TO DELETE FILES FROM ADOBE READER IF THEY ARE UNNECESSARY

    Hi,
    You might need to sign up at https://cloud.acrobat.com/ and choose 'Files' tab where you can find all the files.
    Select all the files you want to remove and choose 'Delete' option.
    Regards,
    Anubha

  • HOW TO DELETE ADOBE READER FILE FROM ADOBE READER

    HOW TO DELETE ADOBE READER FILE FROM ADOBE READER@ !@

    Your question make no sense. What exactly are you trying to do?

  • How to read data from a file in OSB

    hi guys,
    Recently, I've got a problem with reading file from specific location. I've actually followed this post OSB 11g - Read or Poll File in OSB - Oracle Fusion Middleware Blog, and then
    I know how to read a file. However, it does not as expected. Because, I've found no way to read data from the file. Therefore, no chance to manipulate the data like assigning to a variable, or extracting ....
    Hence, is there any way to read data from file by using proxy service in OSB ??? No Java code ???
    by the way, supposed that there is no way to read data from a file in OSB. So, What purposes will the way in the post above be used for?
    Many thanks in advance

    http://jakarta.apache.org/poi/hssf/index.html
    HSSF stands for Horrible Spreadsheet Format, but it still works!

Maybe you are looking for

  • Ideapad A1 07 on a reboot loop

    I recently got the tablet for a present. It works fairly well for the most part, but I have both noticed this: every time I start it up initially, it will go to my home screen, and then after a few seconds it will go through the startup screen with t

  • HT202213 can i use home sharing with my wife who has a different apple id

    Can I use home sharing with my wife who has a different apple id so we dont buy the same songs twice

  • Creation of a new Keychain Entry (Internet password) for Apple Mail

    I am working on a Mail Assistant to set up a new Mail Account for Apple Mail. My problem concerns the creation of the Keychain Entry for the POP Account with which Apple Mail is set up (by my custom Mail Assistant). I am able to create a Keychain Ent

  • Sound works for 10 seconds

    Just got my laptop back from the toshiba service depot of the many problems one was the speakers arent working. Sometimes randomly on bootup the sound will work but it only lasts for a short amount of time. The mute button on the laptop doesnt work b

  • [Solved] Xmobar UTF-8 problems

    Hey Folks! I've recently migrated from Debian, and I'm trying to use the same .xmobarrc I wrote for that installation in Arch.Debian did a bit more hand-holding and had a precompiled binary available in it's repo with all of the bells and whistles co