How can I open a PDF File and integrate it on my view?

Hi everybody,
I try to solve the problem like this:
- Creating a context attribute "pdf" type byte
- Creating a view UI Element "MyPdf" type interactive form binding on the context attribute "pdf"
- Inserting the following code in the wddoinit:
IPrivateView.IcontextElement contextEle = wdContext.currentContextElement();
byte bytes = contextEle.getPdf();
try
  File file = new File("C:/text.pdf");
  FileOutputStrem os = new FileOutputStream(file);
  os.write(bytes);
  os.close();
  contextEle.setPdf(bytes);
catch (IOException e)
  e.printStackTrace();
I'm running it on a local machine with Netweaver 7.1 and get the following error message:
java.lang.ClassCastException: class java.lang.Byte:null incompatible with interface com.sap.......
If I delete the view UI Element there is no error message. What am I doing wrong???

Hi,
I'm sorry but it doesn't solve the problem. The error message is the same and it only appears if I have included the interactive form in the view.
If I delete the interactive form, there is no error and it seems that the coding in the wddoinit() Method works.
I've found a simple tutorial that describes my intention. But it works on webDynpro for Abap and uses Function Modules.
http://wiki.sdn.sap.com/wiki/display/WDABAP/ASimpleWebDynproApplicationtodisplayapdffileinthebrowser+window
Anybody know a similar tutorial but for WebDynpro for Java?

Similar Messages

  • How can I open a PDF file and enter a word in the Find field from the command line?

    Hi,
    I want to use a PDF file as the help file of another program.
    I have found somewhere an incomplete description of the command line parameters of Acrobat Reader.
    It described how to open a file and jump to its given page.
    I have written the following batch file based on that.
    rem Open pdf (prm1) with Acrobat reader at given page (prm2)
    "%adobe_rdr%\AcroRd32.exe" /N "zoom=73&page=%2=OpenActions" %1
    The following batch file opens the search dialog:
    rem Open pdf (prm1) with Acrobat reader
    rem and search for something (prm2)
    "%adobe_rdr%\AcroRd32.exe" /N "zoom=73&navpanes=1=OpenActions&search=%2" %1
    I need the simple find field instead of the complicated search window.
    Regards
                   Ferenc

    Not possible.

  • How can I open a PDF file on iPad?

    How can I open a PDF file on my iPad

    This document may be of help:
                     Opening PDF Files in Reader for iOS (iPhone and iPad)

  • How can I open a PDF file without first saving the file?

    How can I open a PDF file without first having to save the file?

    How can I open a PDF file without first having to save the file?

  • How can I open excel pdf files

    How can I open excel pdf files

    Hi mmart1957,
    Do you have Excel files, PDF files, or PDF files that have been converted to Excel? If you're working with PDF files, you'll need either Reader or Acrobat to open the files. If you have a converted Excel file, then you'll need Excel to open it.
    Best,
    Sara

  • How can I open a pdf file?

    I downloaded an ebook to a save file on my desktop. I cnnot open to read it. How can I open it.
    I down loaded Adobe, but the firefox does not recognize that it is there. Why?

    I do not see a PDF reader installed in your plugins; click on the "More system details..." to the right of your original question post to see a list of your plugins reported with your question post. I do not know what you downloaded from Adobe, but it appears to not be installed. Follow the instructions below under "Download complete installer...".
    #'''Update or Install Adobe Reader (PDF plugin):'''
    #*From within your existing Adobe Reader ('''<u>if you have it already installed</u>'''):
    #**Open the Adobe Reader program from your Programs list
    #**Click Help > Check for Updates
    #**Follow the prompts for updating
    #**If this method works for you, skip the "Download complete installer" section below and proceed to "After the installation" below
    #*Download complete installer ('''if you do <u>NOT</u> have Adobe Reader installed'''):
    #**Use the links below to avoid getting the troublesome "getplus" Adobe Download Manager and other "extras" you may not want
    #**Use Firefox to download and SAVE the installer to your hard drive from the appropriate link below
    #**Click "Save to File"; save to your Desktop (so you can find it)
    #**After download completes, close Firefox
    #**Click the installer you just downloaded and allow the install to continue
    #***Note: Vista and Win7 users may need to right-click the installer and choose "Run as Administrator"
    #**'''<u>Download link</u>''': ftp://ftp.adobe.com/pub/adobe/reader/
    #***Choose your OS
    #***Choose the latest #.x version (example 9.x, for version 9)
    #***Choose the highest number version listed
    #****NOTE: 10.x is the new Adobe Reader X (Windows and Mac only as of this posting)
    #***Choose your language
    #***Download the file
    #***Windows: choose the .exe file; Mac: choose the .dmg file
    #*Using either of the links below will force you to install the "getPlus" Adobe Download Manager. Also be sure to uncheck the McAfee Scanner if you do not want the link forcibly installed on your desktop
    #**''<u>Also see Download link</u>''': http://get.adobe.com/reader/otherversions/
    #**Also see: https://support.mozilla.com/en-US/kb/Using+the+Adobe+Reader+plugin+with+Firefox (do not use the link on this page for downloading; you may get the troublesome "getplus" Adobe Download Manager (Adobe DLM) and other "extras")
    #*After the installation, start Firefox and check your version again.

  • How can I open a tdms file and replace a subset of data then save that change without re-writing the entire file again?

    Hi all,
    Is it possible to open a tdms file and make a small change an an array subset then save the file without having to save the whole dataset as a different file with a new name? That is to say, is there something similar to "Save" in MS Word rather than "Save As"... I only want to change a 1D array of four data points in a file of 7M data points.
    I am not sure if this make sense? Any help is apreciated.
    Thanks,
    Jack

    You can use either one, but for your application, I would use the synchronous.  It requires far less setup.  When you open the file, set both enable asynchronous and disable buffering to FALSE to enable you to use synchronous with arbitrary data sizes.
    Attached code is LabVIEW 2011.
    This account is no longer active. Contact ShadesOfGray for current posts and information.
    Attachments:
    UpdateTDMS.zip ‏20 KB

  • How can I open a PDF file from a swf?

    Hi all,
    I created presentation using Flash cs5, and I want to make a link that opens an external PDF file. I have done this with past version of Flash, but how can I do it using cs5?
    Many thanks in advance,
    HDsuperglide

    Sorry, just linking like before doesn't seem to work. When you select the link button all you get is a search browser looking for the pdf file you are trying to open.
    This is what I was told to use.
    on (release)
    GetURL("name of pdf.pdf","_blank") ;
    Does not work on CS5
    Anyone have a real thoughts.

  • How can i open a pdf file with pdf paramter that extention is not ".pdf" in ie?

    for example: open in ie with url: "c:\\a.efb#toolbar=0 ", but it can not see anything,the "a.efb" is a sure pdf file that just change the file ext. however i can open  the file in ie without paramters!
    my english is not well,if you know what i say ,please write the answer,thanks!

    I do not know why you want to open a local file in IE, and not directly in Adobe Reader.
    Does it work if you rename the file extension to .pdf?
    If yes, then maybe it will work if you create a file association for .efb as AcroExch.Document to open with AcroRd32.exe

  • How can I open a .pdf file in a browser on a click on a push button

    I am using oracle 10g developer suit for form designing.
    There is a .pdf file in the application server.
    I want it to open it in a browser when a push button is clicked.
    Could you please tell me how can I do that?
    Regards

    hi
    u can use web.show_document() for that.
    but if you want to open pdf file only then use
    client_host()
    sarah

  • How can i open my pdf files on surface rt desktop

    i can't seem to open pdf files on the desktop

    Microsoft Surface has its own pdf reading software and there is a Reader Touch application. Have you downloaded the free Reader Touch applicaiton?

  • How can you open a PDF file in Preview or save it as Preview?

    .

    Drag and drop it onto Preview's icon, or select the file, *Get Info* on it, and in the *Open With...* menu in the Get Info window, select Preview.
    A PDF file that won't open in Preview is an Acrobat-only file, and there's nothing you can do about that.

  • How can I open a PDF file in Story without the format changing?

    I have tried to open my script that's a PDF file in Story and the format is not the same.  Could someone please tell me what I should do?

    I have tried to open my script that's a PDF file in Story and the format is not the same.  Could someone please tell me what I should do?

  • How do I open my PDF file if I forgot my password?

    How can I open my PDF file if it is password protected and I forgot the password?

    Adobe software won't let you do that.

  • I can't open my pdf files with adobe reader, adobe is not default

    I can't open my pdf file and when i select default program nothing happens, I try repair adobe reader, I try reinstall it, I installed older version, i try fix default programs but when I select my adobe reader nothing happens, there is still only windows media player (he is set as default). Please help me. I am already try all of those steps http://helpx.adobe.com/acrobat/kb/cant-open-pdf.html

    If Reader ISN'T in the list of prpgrams to open with, click "Browse"
    In the "Browse window" go to C/Program files [or Program Files (x86)]/Adobe/Reader 11/Reader
    Select "AcroRd32.exe" and click "Open"
    Make sure "Always use the selected program to open this kind of file" is checked and click "OK".

Maybe you are looking for

  • Trying to intall Adobe Air on Windows 7 Home Premium

    I successfully install Adobe Air, then there is no sign of the program anywhere even though it shows up to uninstall it in the control panel.  You cannot find it under a search or on the program list.  The only file that shows up is the adobe air ins

  • 1120: Access of undefined property but4.

    stop(); import flash.events.MouseEvent; but3.enabled; but3.addEventListener(MouseEvent.CLICK, pla); but4.enabled; but4.addEventListener(MouseEvent.CLICK, sto); function pla(e:MouseEvent):void { gotoAndPlay(1); function sto(e:MouseEvent):void { stop()

  • Check list for SD consultants!

    Hi, General question about gathering information from SD consultant prior for starting a CRM implementation. Apart from BBP, anybody suggest a checklist a CRM consultant should check with ERP consultant team? SD in particular?

  • IDOC or ABAP Proxy

    We are currently on WAS 6.40.  We have to send the PO's to our Vendor. This is a new functionality that we are trying to add in our R/3 System. Once this is done we will be exchanging the PO's with our vendor. Now my question is should I need to go f

  • Opening a page in a new window...

    I have discovered that if a page is being opened by clicking a link rendered using the Destination URI and the target frame is self, then it opens up in a new window. Why can't I duplicate this behavior using the pageContext.setForwardURL method?