Opening a PDF File from WebDynpro

Hello Everyone,
I have a Webdynpro project and need to create a link on one of the views to display a .PDF document.
1.  Where should I store the PDF document within the webdynpro project?
2.  How do I open the PDF file?
I've created a link with action on the view and just need to know how to open it.
Thanks in advance for your help.
Mike

Hi Mike,
You can try one of the following methods:
Method 1:
1. Create a context attribute (say pdfsource) of type binary.
2. Create a file download control
3. Attach this attribute to the data property of file download control.
4. In the init method of the view or in some other method store the content of the pdf in the context attribute. And do the following code
     IWDAttributeInfo attInfo = wdContext.currentContextElement().node().getNodeInfo().getAttribute("pdfSource");
     ISimpleTypeModifiable type = attInfo.getModifiableSimpleType();
     IWDModifiableBinaryType binaryType = (IWDModifiableBinaryType) type;
     binaryType.setFileName("Test.pdf");
     binaryType.setMimeType(WDWebResourceType.PDF);
5. Now on click of File Download link, it will ask for "Open", "Save", or "Cancel" dialog box. You can choose open to open as a pdf document.
Method 2:
1. Write an action on click of the button or so.
2. In that action get the contents and store it in an byte array and open the pdf file directly as follows.
     byte[] PDFbytes = <source string>.getBytes();
     if(PDFbytes!= null) {                                IWDCachedWebResource pdffile= WDWebResource.getPublicCachedWebResource(                    PDFbytes ,                                 WDWebResourceType.PDF,                            WDScopeType.CLIENTSESSION_SCOPE,               wdThis.wdGetAPI().getComponent().getDeployableObjectPart(),
                "Some Title");                             wdComponentAPI.getWindowManager().createNonModalExternalWindow(pdffile.getURL(), "Some PDF").open();
Thanks and regards
RK

Similar Messages

  • Unable to open large PDF file from the Attachment list.

    Hi Gurus,
    Users had attached 10 PDF file in the work order attachment list and his supervisor is trying to open the PDF file from the work order attachment list and he is able to open 9 PDF files without any issue, but 1 PDF file is giving the error message as "Database error for <GET DATA FROM KPRO>" and then select ok, we are getting the below message.
    Window cannot find u201CC/Documents and Settings/b2m/SaoworkDir/5015851 Vendor data sheets B&P 2010 SDown XXX .PDFu2019. Make sure you typed the name correctly, and then try again. To search for a file, click the start button, and then click serch.
    Looks like this particular file is not transferring to the SAP work directory.
    Could you please check and suggest us as to how to fix it.
    Thanks & Regards,
    Srivas

    Hi,
    Thanks for your reply.
    We verified  your OSS notes it's not relevant to us Because our issue is while opening the PDF aatchement it is not transferring to my SAP Work Directory because of that reason we are getting the KPRO error. When I'm opening the other PDF files it's transferring to my SAP Work Directory and it's automatically open without any issue.
    Please check and suggest.
    Thanks,
    Srivas

  • How do I get Adobe Acorbat to open a .pdf file from a sharepoint library without having to checkout the file

    I have a customer that is using Adobe Acrobat pro version 10.1. When they try and open a .pdf file from a SharePoint site, the user is prompted to check out and open the file or open the file. Is there a way to get Adobe Acrobat to open the .pdf file without prompting to check out or open?
    Thanks
    Jim

    This is mostly a lion thing, rather than a PSE thing. To disable applications opening where they left off last time for all the programs on your computer, go to system preferences>general and untick this box:
    You can also do on a per-program basis, but it's more complicated and the best thing to do is to search around for directions on the web and see which way is least uncomfortable for you.
    There's an odd little glitch in PSE that it opens the last image you had open, even if you closed it before quitting last time. Adobe says this is correct behavior, but of course it isn't.

  • I cannot view PDF in Firefox at the first time but once I manually open the PDF file from my local computer, I can view other PDF files via Firefox webbrowser

    I install Adobe Acrobat 9 in my laptop which runs on windows 7. I use Firefox 3.6.8 and have the problem with the PDF file. The problem is I cannot open the PDF file in Firefox web browser at the first time I launch firefox. It shows a warning box without any message. Only OK button is shown so I can close it. However, if I manage to open the PDF file from my local computer by just using adobe acrobat itself then the PDF can be opened in the Firefox web browser. I followed the instruction on the mozilla help but nothing works for me. The problem still exists. I wonder if anyone have the same problem like me and know how to solve this. Thank you so much

    Hi there!
    I cannot help you, but I think we have a common problem: We got a system here running Vista SP1 with Acrobat 9 standard on it. When we open a pdf file it works normally, but when we open another pdf file, we see the first one in that second window.
    Think that missing option to watch several files within a single window-thing messed up more than meets the eye ... but as we just purchased the 15 licenses, we have to use version 9.
    I didn't find any clues on this problem, but I will post any new hints I get.

  • Can't open web pdf files from my Reader DC because my IMac wants a completed license agreement to use Reader and I never saw that page during installation.

    Can't open web pdf files from my newly installed Reader DC because my IMac wants a completed license to use agreement to Reader, and I never saw that page during installation.  How do I get past this?

    You need to accept the EULA on first launch of the Reader DC application.
    Go to the Applications folder and launch Adobe Acrobat Reader DC. 
    This will bring up the EULA.
    Select the "Agree" button if you agree with the terms
    Assuming you selected the "Agree" button, Reader DC should open.
    You should now be able to open PDF files in your web browser.

  • Opening a pdf file from the internet.

    Everytime I try to open a pdf file from the internet a window pops up and tells me that my adobe reader has a problem or gives me a blank page.  I have ie 10, adobe reader XI and adobe acrobat 8 pro.  All this is on win 7.  When I installed the acrobat 8 pro it could not find the adobepdf.dll.  I searched the disc, and tried to direct the installation to it but it would not accept it.  What can I do to correct this issue?

    Yes, unlike earlier IE versions, IE10 has only one executable, but it can run in 32-bit or 64-bit mode.
    Some details: http://www.sevenforums.com/tutorials/280434-internet-explorer-10-enable-32-bit-64-bit-ie10 -windows-7-a.html

  • Why cant I open a PDF file from a cd-r that I burned into this cd myself at work on my personal laptop? I have the same version of Adobe.

    Why cant I open a PDF file from a cd-r that I burned into this cd myself at work on my personal laptop? I have the same version of Adobe.

    What happens when you try? Have you saved to your computer and then tried to open it?

  • Open the pdf file from forms6i

    Hi,
    how to open the pdf file from forms6i.
    can anyone help me regarding this.
    Thanks,
    Ansaf.

    Hi,
    The HOST built-in does not return any error or message back to the Form.
    You will have to use some other means to first find out whether the file exists or not. E.g. you could use TEXT_IO.FOPEN to open the file in Read mode. If the files is not found the handle returned will be null, and that will be condition you have to process to show a message or pop an alert.
    Make sure you close the file with FCLOSE, irrespective of whether the file is found or not, before you open the File for viewing.
    Regards,

  • Open Multiple PDF files from Production order/Routing

    Hi Everyone
    We are in ECC 6.0 environment. We have a scenario where multiple documents were attached to single operation and also at multiple operations. But when I was trying to open these PDF documents, only the last file was getting opened and closing the previous file. How can I open multiple PDF files at one time from Production order or Routing?
    Any help is appreciated.
    Regards
    Prasad

    Hi Prasad,
    from DMS standard I regret but such a functionality is not available. In the standard originals can be opened only one after another.
    I think for realising this functionality an individual modificatoin is necessary.
    Best regards,
    Christoph

  • Open a pdf file from a path with GetFileFromPathAsync

    Hi, I'm trying open docxs and pdfs files from her path on Windows Phone 8.1. I could achieve this with images with the next line:
    await StorageFile.GetFileFromPathAsync(path);
    The problem is that when I try bring other type of files as the docxs or pdfs I have a exception E_ACCESSDENIED. The capabilities of de app are well configured to acces a the files of phone but I don't know because
    El problema es que cuando intento traer otro tipo de archivos como los docx o pdf tengo un problema de E_ACCESSDENIED . Las capacidades de la aplicacion estan bien configuradas para acceder a los archivos pero no entiendo porque no puedo get this others
    files.

    I have addressed a similar issue in this
    forum post. You need to add the File Type Associations for the file types your app needs to access. This is required when accessing files from DocumentsLibrary and RemovableDevices.
    Abdulwahab Suleiman

  • Open a PDF File from a SSRS Report

    I have a requirement to include a link of some sort on SSRS reports that opens a PDF file.  If this were being implemented in an Access report, a click event using the Application.FollowHyperlink method will do the trick.  Is there an analogous
    method to accomplish this on a SSRS report, please?

    Thanks to Bipin.P !  Although I do not yet have the product installed with which to work, I found the following in the RDL specs.  So, if SSRS functionality is identical to that of an IsHyperlink textbox, our requirement will be satisfied
    easily. 
    Thanks again to all!
    From the SQL Server Reporting Services RDL (Report Definition Language) Specification document, page 41:
    Action
    The Action element defines a hyperlink, bookmark link or drillthrough action associated with a ReportItem.
    Name
    Type
    Description
    Hyperlink
    Expression (URL)
    An expression that evaluates to the URL of the hyperlink (18)
    (18) The Access IsHyperlink property of Textboxes will be supported via this more general mechanism. The Hyperlink property of the Textbox can be set to the same expression as
    the Value property of the Textbox.
    Implemented on an Access Report on 05/06/2010:
    Set the IsHyperlink property of a Textbox to Yes              
    Set the Value property of the Textbox to =”Open PDF File#C:\UPDATES\HelpFiles\UIU Boot Menu.pdf”

  • Opening a pdf file from safari

    Hello!
    I am having trouble opening a pdf file (I installed Adobe 10.1) over the internet from my laptop (OS X Lion 10.7.2) Any solutions?
    Thanks so much. You are awesome

    Delete the following item, then quit and relaunch Safari:
    /Library/Internet Plug-ins/AdobePDFViewer.plugin

  • Opening a .pdf file from Excell 2011 hyperlink

    I have a problem opening a .pdf file hyperlinked in Excel 2011 file.
    The message is: "No program is registered to open this file".
    If I go from explorer the file is regularly opened with Adobe Reader.

    Delete the following item, then quit and relaunch Safari:
    /Library/Internet Plug-ins/AdobePDFViewer.plugin

  • Plug-in PDF, Internet Explorer, unable to open a pdf file from web site. Question mark

    Hello,
    A computer where Acrobat 9 Standard and Acrobat Reader 9 have been installed.
    When I try to read a pdf file from a web site and read it in IE, I get a popup whith a question mark and no text.
    The pdf file is not open.
    I have try to reinstall the last reader but the problem is not solved.
    Thanks for your help.
    fabrice

    Any ideas how to solve this issue?
    Try using Protected Mode Off.  Then you will be at the same level of security that those other programs are running at.  You could also try elevating the iexplore.exe task.  That would turn off Protected Mode in that task automatically but then
    you would be running also with Administrator level authority which might be excessive.
    Robert Aldwinckle

  • Opening a PDF file from a share that contains a reparse point in protected mode fails

    With adobe reader 10 or above and with protected mode turned on, we are unable to read a PDF file from a shared location if it contains a reparse point. I understand that turning off protected mode will resolve the issue, but that does not help us.
    Using filemon, we can see that adobe is opening the file and ignoring the reparse point, so we know that's why it's failing. Is there any way (aside from turning off protected mode) to get this to work?

    Hi,
    is the next part of the code correct.
    What i mean is packing of the attachment, finding out the size of pdf file and doc type as PDF.
    You can also try below link..
    Link: [http://wiki.sdn.sap.com/wiki/display/Snippets/SENDALVGRIDASPDFATTACHMENTTOSAPINBOXUSINGCLASSES]
    Hope this helps.
    Regards,
    -Sandeep

Maybe you are looking for

  • Remove Address Space in Crystal Layout

    Hello Experts, One of our customers are using Crsytal Report Layouts for Invoice. The layout currently grabs Address, Address2 fields from Logistics Tab of Invoice Document. Here in this case ShipTo and BillToAddress can contain a space in the lines.

  • ABAP Web Dynpro Application changes in Administation mode

    Hi, I Made changes to a webdynpro application using Administrator mode in se80 ie Web Dynpro Application->Test->Test in Administation mode. I made one element 'invisible' and ticked 'Final' check box. This element disappeared from my application. Now

  • ORA-12547 tns lost contact while creating 11gr2 database using dbca

    Hi All, I am installing oracle 11gr2 rac on centos 4. Grid infrastrucure and oracle home is successfully installed. When i try to create database using dbca during that time i am getting an error that PRCR-1079: Failed to start resource ora.racdb.db

  • How to split the rows while data integration?

    Hi All Im a newbie to ODI. I just want to know whether it is possible to split the rows in the source datastore to populate the target datastore. Consider a table, say Target Table 1: a - varchar b - number sometimes i may get the source file like th

  • PO not showing in MD04

    Hi I created PR to PO. Po created with account assignment category c-sales order and item category s-third party. My question is PO or PR not showing in MD04. Please can anybody suggest?