Display pdf of an xstring directly in ERP

Hi,
I am trying to generate a pdf-file out of an xstring-object which I got from the pdf creation in webdynpro.
I want to display the pdf directly in the erp-system. Does anybody know how to convert the xstring to pdf and how to directly show the pdf without saving it to harddisk?
Thanks in advance,
Patrick

Check this out -:)
<a href="https://wiki.sdn.sap.com/wiki/display/Snippets/SAPPDFViewer">SAP PDF Viewer (Code Gallery)</a>
Greetings,
Blag.

Similar Messages

  • Displaying PDF in new Browser window

    Hi all,
    I have a question about displaying a invoices in pdf format in a new window. I read several threads about this, but I haven't been able to solve my problem.
    I'm using following code:
    append the pdf to the response
      cl_wd_runtime_services=>attach_file_to_response(
        i_filename  = 'test.pdf'
        i_content   = lx_pdf
        i_mime_type = 'application/pdf'
        i_in_new_window = ' X'
        i_inplace       = 'X' ).
    The content (lx_pdf) is retrieved from a smartform, via the function module for the smartform in question, after which I convert the OTF Data (JOB_OUTPUT_INFO-OTFDATA) to XSTRING using FM SCMS_TEXT_TO_XSTRING. The returned data (buffer of type xstring) I use for afore mentioned method. But all I get to see is the following:
    //XHPLJIIID    0700 00000000001
    IN04EZZ_MO_SMARTFORM_TEST
    IN05TEST_PAGE_1
    OPDINA4   P 144  240 1683811906000010000100001
    IN06MAIN
    IN06TEXT_TEST1
    MT0168902156
    CP11000000E
    FCCOURIER 120  00144 SF001SF001110000144E
    UL +0000000000000
    CT00000000
    ST0590441This is a text page for displaying PDF in a
    MT0168902396
    ST0547238new window
    MT0168902636
    ST0460832called from within a WD application
    MT0168902876
    ST0144010Application
    EP
    The text is correct, but it is not displayed as PDF in new window, and of course I'm not interested in all the formatting codes in front of every line??
    I should be possible to display a pdf in a new browser window without having installed everything needed for Adobe Interactive forms, or isn't it??
    Kind regards,
    Micky.

    Hi Micky.
    If you have the spool number of the printed billing document you can use
    component WDK_SPOOL_TO_PDF in order to display spool as PDF.
    Just transfer spool number and format to default inbound start up plug.
    Cheers,
    Sascha

  • To Display PDF from BSP

    Hi,
    Im calling a method in my BSP application which gives me PDF output.
    CALL METHOD ref->******
      EXPORTING
        lv_vbeln      = lv_vbeln
      IMPORTING
       l_header      = l_header
       wa_head_right =
       message       =
       l_vbeln_text  =
       with_hold     =
       with_hold_n   =
       g_flag        =
       l_pricekey    =
         formout  = formoutput.
    My formoutput-PDF has the xstring, and to call this PDF file i have written the below code
    l_pdf_xstring = formoutput-pdf.
    CREATE OBJECT cached_response TYPE cl_http_response
                            EXPORTING add_c_msg = 1.
    data = l_pdf_xstring.
    l_pdf_len1 = XSTRLEN( l_pdf_xstring ).
    CALL METHOD cached_RESPONSE->SET_CONTENT_TYPE
      EXPORTING
        CONTENT_TYPE = 'application/pdf'.
    cached_response->set_cdata( data   = data
                                length = l_pdf_len ).
    CALL METHOD cached_response->if_http_response~set_status
      EXPORTING
        code   = 200
        reason = 'OK'.
    CALL METHOD cached_response->if_http_response~server_cache_expire_rel
      EXPORTING
        expires_rel       = 180.
    CALL FUNCTION 'GUID_CREATE'
      IMPORTING
        ev_guid_32 = guid.
    v_guid = guid.
        call method cl_http_ext_csif=>access_info_get
          changing
            crep_http = lv_crep_http
          exceptions
            failed    = 1
            others    = 2.
        if lv_crep_http-http_port is not INITIAL.
          write lv_crep_http-http_port to lv_crep_http-http_port no-zero.
        else.
          write lv_crep_http-http_sport to lv_crep_http-http_sport no-zero.
        endif.
    CONCATENATE runtime->application_url '/' v_guid '.pdf' INTO display_url.
    cl_http_server=>server_cache_upload( url      = display_url
                                         response = cached_response ).
        if lv_crep_http-http_port is not INITIAL.
          concatenate 'http://' lv_crep_http-http_serv ':'
          lv_crep_http-http_port display_url into display_url.
        else.
          concatenate 'https://' lv_crep_http-http_serv ':'
          lv_crep_http-http_sport display_url into display_url.
        endif.
        data: lv_url1 type string.
        lv_url1 = display_url.
    When I open the generated link, its giving that my PDF file is damaged or cannot be displayed. I have found the same code in many forums, its not working in this particular program. Please help me out with this.
    Thanks in advance.

    With the help of some other posts and blogs.. am able to display the pdf now.
    However, the default magnification(zoom) is always 44.5%. Any ideas as to how this can be increased or set to a default value.
    Sri

  • Acrobat 9 "Display PDF in Browser" on IE7 crashes the browser

    Hi,
    Here's what is happening. My company purchased a few licenses for Adobe Acrobat Professional 9, and they were installed on some of the company laptops. These laptops are in a UAC controlled SOE environment, so the employees are restricted to do any updates/installations that requires rights. The Adobe Professional 9 was installed through SCCM advertisement, and the "Display PDF in Browser" option was enabled.We discovered that when we attempt to download any pdf files off the web, the browser would stop responding/hangs during the duration of the downloads (shown at the status bar of IE), and we can only kill off the process.
    The current workaround is to disable the "Display PDF in Browser" and download the file directly. However, it came to some points where the pdf documents contains some dynamic links over https on the site is is residing. In which case, the pdf have to be open to view from the secured site for the dynamic link to works.
    Previously with Adobe Reader 9, we face no such issue. Only after we installed Acrobat Professional 9, this issue surfaces.
    We have tried uninstalling the Reader before installing the Acrobat to prevent any chances of conflicts, problem persisted.
    Here are the versions of the software involved.
    Adobe Reader v9.3
    Adobe Acrobat Professional v9.0.0
    Internet Explorer v7.0.6002.18005
    I have looked through the forums for similar cases, unless I have missed the keywords, I do not see any similar cases.
    Has anyone encountered similar issues? Would appreciate if you could share on what was done to circumvent this. Thank you!
    Jiang.

    Hi broger_1,
    Thanks for your reply.
    In regards to your query:
    Is the problem seen with both Reader and Acrobat?
    No, this is only seen when Acrobat is install. It is working fine when only Reader is installed.
    What is your definition of a dynamic link? Post example.
    At the moment, I cannot find a online example for reference. I will try to describe by example.
    Let's say if I goes to https://nonexistance_site.com/brochure_ folder/broc_1.pdf, and the "Display PDF in Browser" was already enabled.
    The content of the broc_1.pdf contains a hyperlink that points to "../broc_2.html"
    Our issue now is the we can only download the pdf file to a folder, say c:/pdfs/broc_1.pdf, so when we tried to access the dynamic link, it will tries to locate c:/pdfs/broc_2.html, which is non-existence. And direct access to https://nonexistance_site.com/brochure_ folder/broc_2.html would not work for some reason (possibily session restriction, or something else).
    What are your security settings? (is Enhanced Security enabled?)
    This setting is currently disabled in the Acrobat Pro 9 preference. Should this stays as disabled?
    This only happens when attempting to "download & display" any pdf files from the net, displaying of local pdf that is already downloaded is fine.

  • Preview improperly displays PDF created by Kyocera printer/scanner.

    Preview improperly displays PDF created by Kyocera printer/scanner. Adobe Reader displays same document ok. It appears that Preview is displaying low res CCITTFaxDecode thumbnails rather than high resolution DCTDecode images. The PDF in Question
    http://www.uvm.edu/~waw/archives/Binder2.pdf
    I hate to think that Adobe Reader 9 can do something Preview can't

    Search for the manual on the european site http://canon-europe.com/ - the versions there (at least for the A1100 IS) do not have the annoying COPY watermark.
    The direct link for the A1100 IS manual is http://files.canon-europe.com/files/soft32765/manual/PSA1100isCUGEN.pdf
    Thanks to a post on dpreview for the hint - http://forums.dpreview.com/forums/read.asp?forum=1010&message=34633050
    -dh

  • Reader X doesn't display Pdf stream if response contains header "Cache-Control: no-store, no-cache"

    Hi all,
    I work on a web application that, among others, generates Pdf documents. It renders them directly within the IE window by "streaming" the content of the Pdf in the response output stream. Note that we also add the header "Cache-Control", "no-store, no-cache, must-revalidate,post-check=0, pre-check=0" to the response.
    Everything was fine with previous version of reader but since I installed Adobe reader X the content of the Pdf is not showing any more in my browser.
    Here is what I already investigated:
    - if I use another machine with an "older" Reader version, it works. If I save the displayed Pdf and try to open it on the machine where X is installed  it works
    - if I remove the the Cache-Control header, then it works with reader X installation
    Do you have any idea what changed between version 9 and X that could lead to this issue ?
    To ease diagnostic I created a sandbox environment to reproduce the problem, you can go to the following address to see what's happening (or not in case you have version X installed)
    With the Cache-Control header: http://readerxissue.appspot.com
    Without the Cache-Control header: http://readerxissue.appspot.com/enableCache.html
    I must confess that I am a bit stuck and I wonder if some of you could help.
    Thanks a lot
    Regards
    Vincent

    Hello,
    We have semiliar problems in sweden with Adobe Reader X 10.1 Swe and Internet Explorer 8.0 with streamed PDF files.
    We had some issues and got them resolved by the following
    Upgraded to Adobe Reader 10.1.2.45 Eng
    - Print Issue:http://helpx.adobe.com/acrobat/kb/pdf-wont-print-reader-10.html
    - Grey box in Internet explorer: http://helpx.adobe.com/acrobat/kb/pdf-opens-grey-screen-browser.html
    - Add site as trusted: Edit-> Preferences, unbox Enable Enhanced Security + add the host/url to site that is whitelisted to send pdf files
    (the Automaticly trust sites from mu Win OS security zones doesnt work for us)
    The thing is we run MUI pack on our Citrix servers and want Adobe Reader in Swe but it havent been translated yet...
    So we have to wait for the swedish release on Adobe Reader X 10.1.2
    Thanks,
    Tony Van Der Haagen
    IT-Mästaren
    Sweden

  • Problem displaying PDF in BSP

    Hi All,
    With the help of Craigs Blog
    /people/sap.user72/blog/2004/11/10/bsphowto-generate-pdf-output-from-a-bsp
    I coded a BSP to display PDF from a spool number.
    I did everything mentioned in the blog. When i execute, the pdf gets displayed, however the data is some unconverted junk data. Can any one suggest what i am doing wrong here.
    Heres the coding in the Event handler (OnInputProcessing) :
    DATA: radioButtonGroup TYPE REF TO CL_HTMLB_RADIOBUTTONGROUP.
    DATA: fileUpload TYPE REF TO CL_HTMLB_FILEUPLOAD.
    DATA: cached_response TYPE REF TO if_http_response.
    DATA: response TYPE REF TO if_http_response.
    DATA: guid TYPE guid_32.
    fileUpload ?= CL_HTMLB_MANAGER=>GET_DATA(
                           request = request
                           id      = 'myUpload'
                           name    = 'fileUpload' ).
    file_name      = fileUpload->file_name.
    file_mime_type = fileUpload->file_content_type.
    file_length    = fileUpload->file_length.
    file_content   = fileUpload->file_content.
    radioButtonGroup ?= CL_HTMLB_MANAGER=>GET_DATA(
                           request = request
                           id      = 'display_type'
                           name    = 'radioButtonGroup' ).
    display_type = radioButtonGroup->selection.
    IF display_type = 'convertspool'.
      DATA: itab TYPE TLINE,
            witab TYPE TABLE OF TLINE,
            output TYPE STRING,
            outputx TYPE XSTRING.
      call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
        EXPORTING
          SRC_SPOOLID              = 0002344365
          NO_DIALOG                = 'X'
        TABLES
          PDF                      = witab
        EXCEPTIONS
          ERR_NO_ABAP_SPOOLJOB     = 1
          ERR_NO_SPOOLJOB          = 2
          ERR_NO_PERMISSION        = 3
          ERR_CONV_NOT_POSSIBLE    = 4
          ERR_BAD_DESTDEVICE       = 5
          USER_CANCELLED           = 6
          ERR_SPOOLERROR           = 7
          ERR_TEMSEERROR           = 8
          ERR_BTCJOB_OPEN_FAILED   = 8
          ERR_BTCJOB_SUBMIT_FAILED = 9
          ERR_BTCJOB_CLOSE_FAILED  = 10
          others                   = 11.
      if sy-subrc EQ 0.
        LOOP AT witab INTO itab.
          CONCATENATE
            output
            itab-tdline
          INTO output.
        ENDLOOP.
    ****Convert the Character String to Binary String
        data: r_string  type string.
        data: R_XSTRING type xstring.
        call function 'SCMS_STRING_TO_XSTRING'
          EXPORTING
            text   = output
          IMPORTING
            buffer = outputx.
        CREATE OBJECT cached_response TYPE CL_HTTP_RESPONSE EXPORTING
    add_c_msg = 1.
        l_pdf_len = xstrlen( outputx ).
        cached_response->set_data( data   = outputx
                            length = l_pdf_len ).
        cached_response->set_header_field( name  =
    if_http_header_fields=>content_type
                                           value = 'application/pdf' ).
        cached_response->set_status( code = 200 reason = 'OK' ).
        cached_response->server_cache_expire_rel( expires_rel = 180 ).
        CALL FUNCTION 'GUID_CREATE'
          IMPORTING
            ev_guid_32 = guid.
        CONCATENATE runtime->application_url '/' guid '.pdf' INTO
    display_url.
        cl_http_server=>server_cache_upload( url      = display_url
                                             response = cached_response ).
      ENDIF.
      RETURN.
    ENDIF.
    Regards
    Sri

    With the help of some other posts and blogs.. am able to display the pdf now.
    However, the default magnification(zoom) is always 44.5%. Any ideas as to how this can be increased or set to a default value.
    Sri

  • Getting a PDF in an xstring format in the ABAP environment

    I am trying to create a PDF in ABAP reusing the ADS/SFP functionality that I can send to XI without saving the pdf first to a file (i.e. Getting the PDF in an xstring format or similar that can be put into an XML structure).
    I've gone as far as to see that the class CL_FP_PDF_OBJECT appears to support returning an xstring; but does anyone have an example of how to work directly with this class or if there is a higher level class that can assist in this manner?
    Note - My aim is to be able to generate reports online plus using the same form, be able to send the file through XI to be stored in Documentum (file store).
    Regards,
    Matt

    Hi All,
      excuse me if I send you a new request, but I'm developing an interface by XI in order to create a XML with a TAG <spool> containing a PDF file of an invoice printform. I create a proxy that is called after the printform creation (by a standard smartforms) using the OTF data released from FORM_CLOSE w/o the spool generation (get_otf parameters set to 'X'). after I create a message mapping that compose the final XML and send it to receivers.
      My problem is related to the data type of my tag <spool>. my XSD schema output needs a xsd:based64Binary type. when I generated the proxy the system send a warning message ("The XSD type base64Binary does not exactly correspond to the ABAP type RAWSTRING  Message no. SPRX067). When the data is passed from proxy to XI, every 77 characters, system inserts a CR/LF.
      It's correct use a proxy?
      in order to convert the OTF data to the based64 string I used:
       CALL FUNCTION 'CONVERT_OTF_2_PDF'
        IMPORTING
          bin_filesize           = lv_numbytes
        TABLES
          otf                    = i_otfdata
          doctab_archive         = ls_doctab_archive
          lines                  = lt_line
    Funzione per codifica in base64
      CALL FUNCTION 'SSFC_BASE64_CODE'
        EXPORTING
          decode                       = ' '
          io_spec                      = 'T'
          ostr_input_data_l            = lv_numbytes
        TABLES
          ostr_input_data              = lt_line
          ostr_digested_data           = pdf_based64
        EXCEPTIONS
    thank you in advance,
    Mauro

  • Displaying PDF file in Flex application

    Hello,
    Is there any way, by which I can read/display PDF file as it is in Flex application (Web based). Is there any way or work around by which I can achieve
    this.
    Awaiting for prompt response.
    Thanks and Regards

    Hello Mariush,
    I have to display the content of the PDF in the flex application. If not PDF directly, is there other workaround for this. Or can I display the content of the MS word file, if not PDF.
    Thanks and Regards
       Khalid Chaudhary

  • Display pdf in a hidden frame

    Hello,
    I have written a servlet which calls a server application and get a pdf as response. When I call the pdf it will be print directly with the default printer. This is because of the javascript code which i have parsed to the pdf. The problem is that the pdf is always displayed with the adobe plugin in my browser. But it should be only printed in the background. Can I target the pdf to a hidden frame out of my servlet. Please give me a source code example how to fix my problem.
    Thanx.

    See Display pdf in a new Window in a JSPDynPage

  • Display PDF in Popup / How to do this?

    Hi folks,
    I'm trying to establish a popup in one of my WD4As which I want to display a PDF which is stored on the application server. Here is what I do:
    1. Collect Data from User Input / Runtime Output of WD4A
    2. Send it to a XSLT Transformation and render it into an XML-String
    3. XML String is converted into PDF via 3rd party program
    4. PDF is stored on the appserver
    I've already searched the forum about the possibility of displaying PDFs and always came across Adobe Interactive Forms / Adobe Document Services / UI-Element "Interactive Form". Now I thought I could just read the PDF from appserver into an Xstring and bind it to the Interactive Form UI-Element, but it always requests a "template source". I fail to understand why I have to do this and what I have to enter there.
    Bottom line I want it to look like the Payslip application in ESS. Is my approach right? Has anyone ever come across this problem? PDF on appserv --> convert to xstring --> Display in WD4A.
    If my Question is too basic because I lack knowledge of a certain point of intersection here, please point me to some tutorials or information material if possible.
    regards, Lukas
    P.S. We don't have Adobe Document Services

    Hi,
    first of all, thanks allfor the support
    I've done it as Santosh suggested and look-and-feel-wise this is a good solution for us. The via 3rd party Program created PDF is Read in and bound to a context attribute in Xstring. Xstring is Bound to the Download-Element. When I klick on the Download-Element I get "Page cannot be displayed". I'm reading it in like this:
    OPEN DATASET lv_helpstring1 FOR INPUT IN BINARY MODE.
        IF sy-subrc = 0.
          READ DATASET lv_helpstring1 INTO lv_pdf_xstring.
        ENDIF.
      CLOSE DATASET lv_helpstring1.
    Is this wrong? If I download the PDF from AL11 manually and display it, it works, so I guess I'm somehow serializing it wrong. Any guesses?
    EDIT: Also, how would I be able to debug what's happening once I klick on the Download-Link? I don't see any coding behind so I wouldn't know where to set a break-point.
    best regards, Lukas
    Edited by: Lukas Weigelt on May 9, 2011 12:46 PM

  • How to retain focus in Web forms 6i item when displaying pdf image

    How to retain focus in Web forms 6i item when displaying pdf image in a multi-record block?
    Hello.
    I have a Web Forms 6i program (version Forms 6.0.8.19.2) running in a 3-tier application. The web form program has a multi-record block containing invoices. When navigating to a record, the form should display the PDF invoice image which is stored in an Oracle 8.1.7 database as a BLOB in another window. When user press down-arrow, the next PDF invoice image should be displayed.
    I am able to accomplish the functionality above by using web.show_document('URL', target') in the when-new-record-instance. The URL being called is a PL/SQL Web Toolkit stored procedure using wpg_docload.download_file built-in.
    The problem is that the focus is lost on the Webform and the focus is shifted to the PDF image window when you navigate to the next record using down-arrow. I want to retain the focus in the form as this is a data-entry form, the operator will use down-arrow to go to the next-record rather than the mouse. I also only want to do this for this Invoice Entry form and NOT to all forms.
    Please advise how to resolve this problem. Thank you.
    Regards,
    Armando

    Magesh,
    the issue of a SSO protected form showing the logon dialog is a knwon issue for Windows200 and the Oracle9iAS base release. If you applied Forms Patch 1 then this should be solved. Hope that I am right in that you are using Oracle9iAS and not Oracle9iDS. Do you see the Single Sign-On logon screen or the Forms logon dialog directly? Check the forms90.conf file in teh forms90/server directory as this contains the Form sso settings (mod_osso) which by default is commented out and therefore inactive. You need to remove the commenting '#' characters and make sure that each sentence having a '#' in front, after that starts on a new line.
    The Forms deployment documentation within the Oracle9iAS docu provides this information too.
    Frank

  • I need to configure Acrobat to display PDF files in Safari, but I have a lot of troubles to do it.I have OX S yosemite, I unistalled adobe acrobat, I closed safary and I installed the new version of adobe acrobat.

    Dear everyone
    I need to configure Acrobat to display PDF files in Safari, but I have a lot of troubles to do it.
    I read a european commission document explaining that
    http://ec.europa.eu/research/participants/data/support/sep_usermanual.pdf
    If Safari does not display pdf forms in the browser window, uninstall all older versions of Adobe Reader and download the most recent one. First close Safari and then install Reader. Launch Safari and you ought to be able to open the pdf files inside the Safari window. If you install Adobe Reader 10.1.x without first closing Safari, Safari will not display the pdf file inside its browser window until it is re-launched. For further help, please see http://helpx.adobe.com/acrobat/kb/troubleshoot-safari-plug-acrobat-x.html
    I have OX S yosemite, I unistalled adobe acrobat, I closed safary and I installed the new version of adobe acrobat
    but when I open a web page that I need to allow me to display and modify PDF files it is not working.
    I checked the following web page
    Troubleshoot Safari plug-in | Acrobat X, Reader X
    that is recommending the following:
    The AdobePDFViewer plug-in is used to display PDF files in Safari using Acrobat and Reader.
    This plug-in is installed as part of the Acrobat X or Reader X installation. The location of this plug-in is:
    /Library/Internet Plug-ins/AdobePDFViewer.plugin
    but after the new installation with this folder is completely empty and I am still
    unable to open these pdf.
    Does anybody knows anything else I can do?
    Best regards
    Ramon

    Moving this discussion to the Adobe Reader forum.

  • Does anyone know why after upgrading to Mavericks, Safari will not display PDF files, is there a solution?

    I cannot get Safari to display PDF files, it shows a blank screen with the comment that Safri has blocked PDF, however when you unblock it still does not show the PDF, I have had to rely on Firefox for this, which I find not too good. Any help very much appreciated.

    Update to 10.9.1
    Adobe Reader
    http://helpx.adobe.com/acrobat/kb/blocked-plugin-alert-safari-7.html
    Best.

  • How to display Pdf file in iPad site

    Hi
    How to display Pdf file in web page which can able to view in iPad safari?
    Thanks,
    Arun

    You can't really.
    You need to use DHTML in the swf-wrapper HTML file, usually a
    division wrapped iFrame, and load the PDF into the iFrame as an
    overlay to the Flash.

Maybe you are looking for

  • How to get a handle Logged in As message in Apps Home page

    Hi, I want to get the handle to Logged in As meesage in Apps homepage ,when i pressed personalize link. As i want to change this custom message, by some other message,for that i should be able to see the text in the personalize link because i want to

  • IDVD - what brand of disk and burn speed?

    I have an ibook and bought a Sony DVD burner. I have OS 10.3.9, and the Sony DVD burner said it was MAC compatible for OS 10.4 or later. So I got Patchburn and the DVD works. However, I've got a really crappy burn when i watch it on a DVD player. I r

  • Adding new segment in IDOC

    Hi,        i have a requirement where based on a condition i need to add a new segment dynamically in Inbound IDOC. I have written the code in the user exit of the inbound FM. Its adding new segments and process it perfectly. But when i see the IDOC

  • Mac pro 2010 USB 3

    I have the 2010 Mac Pro with only USB 2 ports.  Is there an Apple supported board that can be added to get some USB 3 ports?

  • Documentation for reporting and printing

    Hi to all dear sap experts. I need a little information... We have SAP Business One 9.0 PL 08. In SAP Help we have a link to URL  http://service.sap.com/smb/sbocustomer/documentation. Opening this URL, we are redirect to https://websmp206.sap-ag.de/s