Reading a PDF file generated through a R/3 program

is it possible ? From a portal application(PDK/WebDynpro..both in java language), could i call a RFC which generates and transfers a PDF file ?
any suggestion will be welcome!
tks!
André

Luis,
Yes, you can do that. The RFC should generate the output in the form of bytes[].
A pointer code for doing that will look like this:
wdThis.wdGetFile_PdfCustController().getFile();
* The previous line of code gets the output from the 
* suitable model attribute which contains the output
* returned by RFC.
byte[] pdfContent= wdContext.currentOutput_PrintElement().getFile();
try
    IWDCachedWebResource pdfResource=
           WDWebResource.getWebResource(pdfContent,WDWebResourceType.RTF);
    IWDWindow newWindow= wdComponentAPI.getWindowManager 
           ().createExternalWindow(pdfResource.getURL
           (), "ResultView", true);
    newWindow.open();
catch (Exception ex)
    wdComponentAPI.getMessageManager().reportException
           (ex.getMessage());
Bala
Message was edited by: Bala Krishnan

Similar Messages

  • PDF file generated through PDFWriter does not open

    i generate a pdf file using itext "itext-1.4.6.jar". this file opens in Acrobat reader 5,6,7. But i can not open it in Acrobat Reader 8.
    Plz tell me if there is some special reason associated with itext or Acrobat Reader.

    1) This is not an iText support board.
    2) What's the error message?

  • Problem with opening of PDF file, generated through smartform

    Recently, I have developed a new program where, the output of smartform will generate a PDF file, and then that PDF file will be mailed to concern persons,
    I have sucessuly done this in development server, and further testing I have transported this to Quality, in Quality i am able to generated a pdf file and able to send it to mail box of concern person, but when concern person tries to open the PDF file, it gives the error stating 'There was an error in opening the document, The file is damaged and could not be repaired'
    But same, I can able to read from development server.
    When I asked the Basis person, they are not aware about it, and , I have make it sure that, I have transported all request to Quality and nothing is pending in development.
    Can you please give me some idea to sort out this issue.
    Thanks in advance
    Rani

    Hi,
    I have same requirement.
    I need to cnvert smartform->pdf->send mail.
    The mail is send but the attachment is corrupted.
    Can you tell me what code you have written so its working in developement?

  • When I try to open an .ai/pdf file received through my email, it won't open and asks for a password. I have never set up any kind of password for email security, but have tried typing in my standard passwords. Nothing works. I wonder if it has anything to

    When I try to open an .ai/pdf file received through my email, it won't open and asks for a password. I have never set up any kind of password for email security, but have tried typing in my standard passwords. Nothing works. I wonder if it has anything to do with the use of my Wacom3 Tablet...I've been having trouble with it and was getting the same message when trying to open the User's Manual in my Applications/WacomTablet file on my hard drive. Any suggestions? I just downloaded the latest version for the Wacom and recently upgraded to Snow Leopard 10.6.7 (which I hate, and my CS3 hates, etc.)

    It sounds like you have a a password-protected PDF. The password was set by the person who encoded it.

  • Any tricks to store pdf file generated via jasper to oracle tables.

    i need to generate pdf file ..for records in a cursor..
    So i use jasper integration kit ... to accomplish the same...
    issue is .. i need to press a button and then pdfs file shoudl be generated...and stored in a table as a blob..My process does this..
    But since the process can be fired only on condition. on load before header...
    The result is i get my pdf file generated and stored in table ..but the page is a blank page..seems like it is some jasper page..
    http://127.0.0.1:82/apex/f?p=132:267:3324851978466855::::: The page looks empty...I will not want it to look empty...
    i will like after pressing a button immediatley it shows a page processing and when processing is done... it shifts to other page...
    I am putting the part of code which generates the pdf file ...any guidance or help shall be appreciated..
    So i hope you understood the issue..*Issue is when button is pressed i see a blank page..THough the below process is fired pdf file genrated and stored in oracle tables..as blob.. I will like instead of blank page it displays me some othe page..say like processing and once done it shoudl say processing complete..*
    Any guidance will be kindly appreciated..
    Thanks paul johny
    Below you will see the stored procedure i use..to generate the pdf files...
    create or replace procedure lordslave is
    cursor c1 is select subscribe_no from subscribers
    where subscribe_no > 296;
    l_blob BLOB;
    l_mime_type VARCHAR2 (100);
    begin
    for xxx in c1
    loop
    begin
    --xlog ('PRC_GET_REPORT_TUNNEL', 'url (orig):' || 'http://localhost:84/JasperReportsIntegration/report?_repName=test_repFormat=pdf_dataSource=def1_outFilename=tes.txt_repLocale=de_DE,repEncoding=UTF-8');
    xlib_jasperreports.set_report_url ('http://192.168.1.3:84/JasperReportsIntegration/report');
    xlib_jasperreports.get_report
    (p_rep_name => 'subinvx',
    p_rep_format => 'pdf',
    p_data_source => 'default',
    p_rep_locale => 'de_DE',
    p_rep_encoding => 'UTF-8',
    p_additional_params => 'Psubscribe_no='||390,
    p_out_blob => l_blob,
    p_out_mime_type => l_mime_type
    BLOB_LOADB (mid(),xxx.subscribe_no,'SUBSCRIBERINVOICE','mfilename',l_mime_type,l_blob);
    -- release resources
    DBMS_LOB.freetemporary (l_blob);
    -- stop rendering of APEX page
    apex_application.g_unrecoverable_error := TRUE;
    EXCEPTION
    WHEN OTHERS
    THEN
    xlog ('PRC_GET_REPORT_TUNNEL', SQLERRM, 'ERROR');
    RAISE;
    END;
    end loop;
    end;

    All you need to do - is that you should use the column data type as Long Raw.Why would you recommend using LONG RAW which has been deprecated in favour of BLOB for years?
    You can find a simple example of inserting a file into a BLOB column using JDBC here. The Oracle JDBC docs are also worth a read. Find out more.
    Cheers, APC
    Blog : http://radiofreetooting.blogspot.com/

  • PDF file handling through BPEL

    Hi,
    We are exploring BPEL as an option to handle PDF files generated by Oracle EBS (BI Publisher). Basically we want to achieve following:
    Pick up PDF files from certain location on UNIX box and then
    a. Spliting the PDF file into two or more files (depending on some data on PDF file itself, say customer number)
    b. FTP few of the splitted files to certain location on UNIX
    c. Print few of the splitted files onto a predefined network printer
    d. Upload PDF files in Oracle database (BLOB)
    e. Email/Fax PDF files as attachment to one or more recipient
    I understand this may be a weird requirement but it would be great if we can take advantage of BPEL flexible process management capabilities.
    Please give your inputs (whatever possible) as to whether above listed tasks are possible or not?
    br

    Hi Vanilla,
    I want to process the string that I get from the pdf.What do you mean "process"? What are you planning to do with it?
    And it is NOT a String. If you want a String representation (e.g., just the text, with no layout, font, etc. info), then you'd need to interpret the BYTES first and then build a String from the results.
    I can not process the bytes. So I think, I have to
    convert the bytes into string.Then you need to either learn the PDF spec and write code to interpret those bytes, or you need to find a 3rd party library that does this. You can't just expect to read the bytes into a Java String and have it work.

  • Problem reading attached PDF files

    <!--[if gte mso 9]><xml>
    </xml><![endif]--><!--[if gte mso 9]><xml>
    Normal
    0
    false
    false
    false
    MicrosoftInternetExplorer4
    </xml><![endif]--><!--[if gte mso 9]><xml>
    </xml><![endif]--><!--[if !mso]>
    <object
         classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id=ieooui>
    </object>
    <style>
    st1\:*{behavior:url(#ieooui) }
    </style>
    <![endif]-->
    <!--[if gte mso 10]>
    <style>
    /* Style Definitions */
    table.MsoNormalTable
    {mso-style-name:"Table Normal";
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-parent:"";
    mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
    mso-para-margin:0cm;
    mso-para-margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:10.0pt;
    font-family:"Times New Roman";
    mso-ansi-language:#0400;
    mso-fareast-language:#0400;
    mso-bidi-language:#0400;}
    </style>
    <![endif]-->
    Hello.
    At my work, we use JavaMail (version 1.4.1) in server
    programs, processing mails with attached files from customers. Mostly it is
    TIFF images, but it can also be PDF
    files, and the attached files are extracted and saved for further processing.
    Sometimes, we have a problem, reading attached PDF
    files. The files get saved, but is of size 0 bytes. If I forward it, however,
    using an Outlook client, the forwarded item can be read by our JavaMail program, and files saved OK.
    I have tried to forward it using JavaMail, but I cannot
    compose the mail parts, that fails, however - of the same reasons: I cannot
    read the them in:-)
    It looks like it's when the mail is send from a Mac.
    Anyway, the part to read is of content type "APPLICATION/APPLEFILE" whereas when it's forwarded, it's content
    type is "APPLICATION/OCTET-STREAM"
    The way, I read the part, is to check if the part is an
    instance of an InputStream, and then saving into a byte array, like this:
    h5. Object
    obj = part.getContent();
    if (obj instanceof
    InputStream) {
    InputStream
    inStream = part.getInputStream();
    byte[]
    buffer = new byte[BUFFER_SIZE];
    int
    bytesRead;
    BufferedOutputStream
    outBufStream = new BufferedOutputStream(new FileOutputStream(attFileName));
    while
    ((bytesRead = inStream.read(buffer)) != -1)
    outBufStream.write(buffer,
    0, bytesRead);
    inStream.close();
    h5. outBufStream.close();
    Problem
    is that .read() method always returns -1 when content type Is APPLICATION/APPLEFILE,
    so a file of 0 bytes are created.
    Interesting is perhaps, that debugging shows me that the
    part instance of the InputStream actually is a
    com.sun.mail.util.BASE64DecoderStream when it fails, and a
    com.sun.mail.util.QPDecoderStream
    when it works OK.
    So I have this idea, that I's a certain type of decoder
    stream we're missing? We use Java 1.6.0 update 10 and JavaMail 1.4.1. and since
    we use java 1.6 we use the JAF framework from that one, I guess?
    Hope you guys can help?
    Thanks in advance, Per Jensen
    [email protected]

    We have two (MS Exchange) servers (from trace log):
    Microsoft Exchange IMAP4rev1-server version 5.5.2650.23
    Microsoft Exchange Server 2003 IMAP4rev1 server version 6.5.7226.0
    - the first one is the one, we're using here, but I have tried on the other, newer version too, and it didn't help either.
    But I've found out a couple of interesting things:
    1: Debugging shows me, that the part instance of the InputStream actually is a com.sun.mail.util.BASE64DecoderStream when it fails, and if I forward the mail via Outlook as described earlier, and it can be read OK, the part is a com.sun.mail.util.QPDecoderStream instance.
    2: I can save the WHOLE message to a file, using message.getInputStream(), and when I opens the file I can find the individual attachments - as well as the bodytext, if any - as they are separated with the disposition, mimetype and filename fields, showed as plain text. And the attachments are showed as blocks of characters; I guess it's the ascii character representation of the bytes. Here's a snippet, note the first two sentences. They seemes to be added, somehow, when I dump the message to file(?):
    <START OF DUMPED FILE>
    This message is in MIME format. Since your mail reader does not understand
    this format, some or all of this message may not be legible.
    ------_=_NextPart_000_01C9A8A2.19479FE4
    Content-Type: text/plain;
         charset="iso-8859-1"
    Content-Transfer-Encoding: quoted-printable
    (The body text here)
    ------_=_NextPart_000_01C9A8A2.19479FE4
    Content-Type: application/applefile;
         name="first_attachment.pdf"
    Content-Transfer-Encoding: base64
    Content-Disposition: attachment;
         filename="first_attachment.pdf"
    AAUWAAACAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAASgAAABAAAAAJAAAAWgAAACAAAAADAAAA
    egAAABAAAAABAAAAigAAI6IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    AAAAAAAAAAA1NzE2NSBCTkhhdWcucGRmJVBERi0xLjMKJbe+raoKMSAwIG9iago8PAovVHlwZSAv
    Q2F0YWxvZwovUGFnZXMgMiAwIFIKPj4KZW5kb2JqCjIgMCBvYmoKPDwKL1R5cGUgL1BhZ2VzCi9L
    aWRzIFsgNCAwIFIgXQovQ291bnQgMQo+PgplbmRvYmoKMyAwIG9iago8PAovUHJvZHVjZXIgKEhh
    ...(and so on)
    DMgMDAwMDAgbg0KMDAwMDAwNTM1NSAwMDAwMCBuDQowMDAwMDA2NTA5IDAwMDAwIG4NCjAwMDAw
    MDc2NjUgMDAwMDAgbg0KdHJhaWxlcgo8PAovUm9vdCAxIDAgUgovSW5mbyAzIDAgUgovU2l6ZSAx
    MQo+PgpzdGFydHhyZWYKODgyNAolJUVPRgo=
    ------_=_NextPart_000_01C9A8A2.19479FE4
    Content-Type: application/applefile;
         name="second_attachment.pdf"
    Content-Transfer-Encoding: base64
    Content-Disposition: attachment;
         filename="second_attachment.pdf"
    AAUWAAACAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAASgAAABAAAAAJAAAAWgAAACAAAAADAAAA
    egAAABAAAAABAAAAigAAI9wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    AAAAAAAAAAA1NzE4MSBCTkhhdWcucGRmJVBERi0xLjMKJbe+raoKMSAwIG9iago8PAovVHlwZSAv
    Q2F0YWxvZwovUGFnZXMgMiAwIFIKPj4KZW5kb2JqCjIgMCBvYmoKPDwKL1R5cGUgL1BhZ2VzCi9L
    ...(and so on)
    <END OF DUMPED FILE>I understand that it's base64 encoded and must be decoded, and I have tried to copy/paste the blocks separately, run them through the com.sun.mail.util.BASE64DecoderStream, and saving them as PDF files, which works fine(!).
    As the solution seems to be painfull: Parse the mail to find where the attachments starts and stops and saving them as files, I hope you guys can send me on the right track?
    PS: The trace log when dumping the file shows everything OK, I think. Here's a bit of the log at the end of dumping the message:
    (...)MTUgMDAwMDAgbg0KMDAwMDAwNTg2NyAwMDAwMCBuDQowMDAwMDA3MDIxIDAwMDAwIG4NCjAwMDAw
    MDgxNzcgMDAwMDAgbg0KdHJhaWxlcgo8PAovUm9vdCAxIDAgUgovSW5mbyAzIDAgUgovU2l6ZSAx
    MQo+PgpzdGFydHhyZWYKOTMzNgolJUVPRgo=
    ------_=_NextPart_000_01C9A8A2.19479FE4--
    A10 OK FETCH fuldført.
    A11 FETCH 1 (BODY[TEXT]<40336.16384>)
    * 1 FETCH (BODY[TEXT]<40336> {0}
    20/03-09 15:18:21,445 3 Done, writing bytes to ByteArrayOutputStream. Size: 40336 bytes (..common.mail.MailUtil.dumpMessageToFile.dumpMessageToFile)
    20/03-09 15:18:21,445 3 Done, writing ByteArrayOutputStream to file. (..common.mail.MailUtil.dumpMessageToFile.dumpMessageToFile)
    A11 OK FETCH fuldført.

  • Hi... I would like to purchase a Tablet Sony Xperia Z 2 10.1 (the last one of the Z series) and I was told that Adobe does not support Sony anymore.... I need to be able to open and read Adobe PDF files and I would like to know if this tablet can still us

    Hi... I would like to purchase a Tablet Sony Xperia Z 2 10.1 (the last one of the Z series) and I was told that Adobe does not support Sony anymore.... I need to be able to open and read Adobe PDF files and I would like to know if this tablet can still use Flash Player...
    Is there anyo who can help me with this? I asked in the shop and I was told "yes of course" , but when I contacted Sony directly I was advised to check with Adobe as apparently in the recent months Adobe and Sony haven't been getting along anymore...

    You may be mixing up two entirely different Adobe products.
    1. Adobe Flash Player. Needed to view web pages designed with Flash. Not needed to view PDF files. Not available for Android (not just Sony).
    2. Adobe Reader. Reads PDF files. However, the Android can also read most PDF files without needing Adobe Reader.

  • Format of CSV file generated through iBot

    What is the default format of csv file generated through iBot (UNICODE / UTF) ?
    How can we configure a single iBot to generate CSVs, for example, in UTF format instead of UNICODE (assuming UNICODE is default).
    -Jimit

    Use this
    https://support.oracle.com/epmos/faces/ui/km/SearchDocDisplay.jspx?_afrLoop=324436281886916&type=DOCUMENT&id=1459947.1&displayIndex=1&_afrWindowMode=0&_adf.ctrl-state=130oxyc5cv_71
    Content:
    Goal
    Currently the CSV format in Agents always delivers the report results in tab delimited CSV. Is there a setting that can make the report result in a comma delimited CSV format when the reports are setup via Agents/iBots?
    Fix
    There is no setting that would make CSV output from an iBot be comma delimited as opposed to the tab delimited output from the web UI.
    There is an enhancement request for this functionality. for more information, see bug 13802667 - COMMA DELIMITED CSV FORMAT FOR AGENTS/IBOTS has been logged to include this feature in future release.
    As a work-around, you can to run a custom script from an Agent to convert tabs to commas. See chapter 4 (http://docs.oracle.com/cd/E21764_01/doc.1111/e18562/schedjobscripts.htm#BABGFBBD) of Oracle® Fusion Middleware Scheduling Jobs Guide for Oracle Business Intelligence Enterprise Edition 11g Release 1 (11.1.1) Part Number E18562-01 for more information on writing custom scripts.
    If helps pls mark

  • Problem in Reading a .PDF file

    HI Friends,
    I am reading a .pdf file from within java program using its java.io package.
    I am able to read the file, but when I print the line read from file on to the screen, it all garbage. Its not in readable characters.
    I guess its reagrding mismatch in Charcter Sets of original file and the stream with which I m reading the file.
    So,if u know the solution plz suggest me.

    Hello Simple@java
    Here's an exemple of a class that opens the File "rapport.pdf" located at the same place as the class.
    Of course AcroRd32.exe is the name of Acrobat Reader which allows to read pdf files. You can get it on : adobe.com(http://www.adobe.com/products/acrobat/readstep2.html)
    You will change "rapport.pdf" by the name of your pdf file.
    Then execute "test()".
    * Open the file "rapport.pdf"
    public class test
         public test()
              Runtime a = Runtime.getRuntime();
              try
                   a.exec("AcroRd32.exe rapport.pdf");               
              catch (Exception e)
                   System.out.println(e.getMessage());
    Good luck !

  • Is there any way to read the pdf file in java

    Hai,
    i need some advice from anyone that is there anyway to read the pdf file directly from java...
    Without converting to other files(txt,html)
    if it is possible please help me..
    Thank you

    Or use the Adobe one (search the adobe site). Or search this forum, this is one of the Top Ten Qestions Asked here.

  • How do I read a pdf file in Acrobat Reader (vs. Preview)?

    How do I read a pdf file in Acrobat Reader (vs. Preview)? I have a Mac OS, need to know the process to read a pdf file document in Acrobat Reader instead of Preview. Much thanks for suggestions.

    Right click the PDF. Choose "Open With..." Select Reader.
    Or.
    Right click and "Get Info"
    under "Opens with" change the default app to Reader, and click "Change all" to set the preference for ALL PDFs.

  • I have an older computer and could not read a pdf file so I just added the Adobe software for $14.95 and downloaded it but still can not open the reader.  If I can't open it, please refund my money.

    downloaded new software and still can't open files

    Hi [email protected] ,
    In order to read the PDF file, you need to download and install Adobe Reader. Please download it from the link below:
    http://get.adobe.com/reader/enterprise/

  • How do I convert a read only word doc to a read only pdf file?

    How do I convert a read only word doc to a read only pdf file?
    Thanks, Linda

    Hi Linda,
    I just tried it, and was able to convert a Word .doc to to PDF, in spite of the fact that it was marked Read Only. Here are the instructions for uploading and converting to PDF with Acrobat.com:
    http://help.adobe.com/en_US/Acrobat.com/Acrobat/WS396AAA88-4AA4-4a40-87B8-004A5DC1E131.htm l
    Kind Regards,
    Michelle

  • I cann't find the"define" option in adobe reader when I read a PDF file in iPad 3.

    I cann't find the "define" option in adobe reader when I read a PDF file in my iPad 3. I have already latest reader version and iOS 5.1.1 installed.

    I believe that I figured it out.
    holding finger over a word, will bring the copy/define menu
    holding finger where there is NO text, empty space or image, will bring up the annotation menu.
    but note that if you have a scanned document, where the words are actually an image, you will get the annotation menu, since there really is no text, just a bunch of pixels that look like text...
    you can turn scanned text into "real" text by using OCR functionality of the desktop version of Acrobat Pro (not Reader), it would then create a layer of invisible text under the image of the text.

Maybe you are looking for

  • Report for Purchase Price Variance

    Hi, Is there any standard report for finding Purchase Price Variance between Purchase Order and Material master regards, Mallik

  • Is this Logic or the OS?

    Been wondering about this one... When I option click on a midi track to open in a new window, it always opens the window behind the arrange window.. After the double click, the new window flashes for a split second and then gets placed behind the ope

  • Iphone rebooting continously and gives error 1611 when trying to restore

    hey , its ma 1st post in this forum . m in deep trouble rgt now i dont know whts goin on with ma iphone it was workin all fine n suddenly one fine day it starts rebooting cont. showing the apple logo again n again. i tried restoring it in itunes....i

  • Insert dblink table using views

    Hi all, I' using the next insert query to a dblink table: INSERT INTO dgy_doc_data@dgtry_dblk (user_id,                                      doc_xml_data,                                      created_by,                                      creation_

  • Duplicate records in a column of a table

    Hi, Can someone tell me how to get the duplicate records in a column of a table what is the sql query. Can anyone pls give an example