Display PDF from cfhttp

Hey everyone. I am trying to display a PDF I receive from
<cfhttp> with the following line of code:
<cfhttp method="get" getasbinary="yes" url="#theURL#">
I want to be able to display the PDF within the page as
opposed to just having a 'save as' box come up. I played with
<cfcontent> but couldn't get it to do what I want. Any help
is appreciated.

Please help me by providing solution........It is Urgent
Thanks!
Srinivas

Similar Messages

  • Cannot Display PDF from Documentum in SAP

    Hello Everyone,
    We have linked SAP with Documentum to be able to retrieve documents stored in the content server. We made all the setting required in OAC0, OAC2, OAC3. But when we are posting a document against a Purchase Order from documentum and trying to view that PDF from "ME23" it is giving us an error message as shown below:-
    "The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
    An invalid character was found in text content. Error processing resource 'file:///C:/Documents and Settings/gopal.yarlagad...
    But if we go into the "OAOR" I can see the document against the Purchase order. We are not able to figure out the issue regarding this. I would greatly appreciate your help if you can help me in resolving this issue.
    Regards,
    Gopal.

    We also had the same issue. It was working prior, and suddenly we can't view .msg file (in CMOD archived storage) in portal as it no longer recognize mime type for this. This must be a new patch from outlook last week. We ended up implementing config change suggested in note 1840170, and add this mime entry in local registry. As per IBM note http://www-01.ibm.com/support/docview.wss?uid=swg21610741, it looks like there's no other choice but to do it.
    We plan to push this entry to all users' computers soon. 
    Regards.

  • Display PDF from flex windows application

    Hi,
    I am creating a flex windows application using action script and mxml script.I need help in displaying a PDF document in that windows application from a netwrok drive or local pc.I tried google search it is giving me some open source projects with IFrames.But,they can be only used for browser applications(web).So,anyone please suggest me how could i accomplish this task with winows application.
    Thanks,
    adi2010

    Hi ,
    The solution for the thread is
    <mx:HTML id="pdfHtml" location="test.html" width="100%" height="100%" />
    var pdfFile:File = File.applicationDirectory.resolvePath(pdfHtml.location);
        pdfFile = new File(pdfFile.nativePath);
        var fileURL:String = pdfFile.url;
        pdfHtml.location = fileURL;
    Thanks,
    adi2010.

  • Reader 9.4.6 bug displaying PDFs from Autocad

    I've received several architectural drawings produced from Autocad as PDFs. All of them display correctly in Reader 9.4.6 for Windows, but in Reader 9.4.6 for Unix, some dashed lines are missing from the PDFs when viewed on the screen or printed.
    When I look at the document properties in Adobe Reader, it shows PDF producer as "Acrobat Distiller 7.0.5 (Windows)", and PDF version as "1.4 (Acrobat 5.x).

    - If you about>plug-ins says Adobe Reader, that's what you have (and not Acrobat which unlike Reader is a paid program)
    - Reader X provides certain commenting tools. You should be able to add comments and highlight text using commenting tool
         - Reader 9.4.6 does not have free commenting tools, there can be certain special PDFs where this is allowed but not generically
    - The paid product - Acrobat will let you comment any PDF as long as the author of the PDF has not applied security to the file disabing it
    - Both Reader 9.4.6 and 10 are free products from Adobe. As I note earlier in my reply, only Reader X has free commenting. Both Reader X and Reader 9 will let you view and PDFs and comments.
    - You can develop plug-ins for both Reader and Acrobat products using the free SDK. For Reader, you need to get a special certificate (available at small cost) that needs to be embedded in your plug-in.

  • Displaying pdf from file system in OA framework pages

    Hi,
    If anyone could help me with this I would be very grateful.
    We have a number of pdfs containing sensitive information, held on our Unix file system in directories not publicly available.
    I want to create an OA framework page which takes the name of a pdf as a parameter and displays the content of that pdf on the user's browser. I cannot simply do a redirect because the pdfs are not publicly available.
    I've found some sample java code that allows you to set InputStream and OutputStream and read the content of the file. However, I cannot see how to redirect the output stream to the browser. Of course, this may be entirely the wrong approach.
    Can anyone suggest anything or point me to some documentation that might help?
    Many thanks,
    Mike Thorn.

    Hi Shiv,
    Thanks for responding. I'm not sure whether I've explained my problem properly, so I've included a code snipet below.
    I've got my head around how to stream the contents of a file to an output string but cannot see how to bolt this into the controller region for an OA framework page. In the code below, you'll see I have a dofile which reads from my D: drive and streams to the System.out. I'm calling this from the processRequest for the page controller but do not understand how to get the output stream into the OAHTMLWebBean (my inclusion of Google works just fine).
    All this Java is rather new to me I'm afraid.
    public static void dofile()
    try{
    OutputStream outStream = System.out;
    String fileName= (String)"index.htm";
    String filePath = "D:\\Jdeveloper\\jdevdoc\\";
    File f = new File(filePath, fileName);
    String fileType = fileName.substring(fileName.indexOf(".")+1,fileName.length());
    byte[] buf = new byte[8192];
    FileInputStream inStream = new FileInputStream(f);
    int sizeRead = 0;
    while ((sizeRead = inStream.read(buf, 0, buf.length)) > 0) {
    outStream.write(buf, 0, sizeRead);
    inStream.close();
    outStream.close();
         catch (Exception e) {
              System.err.println(e);
              System.err.println("dofile error");
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    dofile(); //but how do I egt the output to the OAHTMLWebBean?
    // the following works fine to include Google
    OAHTMLWebBean outRegion = (OAHTMLWebBean)createWebBean(pageContext, HTML_WEB_BEAN, null, "IFRAME");
    outRegion.setHTMLAttributeValue("src","http://www.google.co.uk");
    outRegion.setHTMLAttributeValue("width", "100%");
    outRegion.setHTMLAttributeValue("height", "60%");
    outRegion.setHTMLAttributeValue("title","My title");
    outRegion.setHTMLAttributeValue("name", "My name");
    pageContext.getPageLayoutBean().addIndexedChild(outRegion);
    Many thanks again for any help you can offer this Java virgin,
    Mike Thorn

  • 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

  • Adobe Reader plugin forbids displaying PDFs from outside domains

    One part of web application is local digital signing  using activex component. But I want to display a PDF that gets signed  beforehand and after. Since documents can be quite large I would'n  really want uploading them and then again downloading for displaying.
    Therefore I wanted to embed a PDF using local path (eg. file:///) but Adobe throws "Access denied" error. I tried lowering Reader's security settings to minimum but it didn't help.
    Is there any way to embed a PDF with source ouside of the web application domain?

    Solved it. Problem seemed to have been a crashed Acrobat process. Just kill all Acrobat tasks in the task manager, reload the link in the browser and the Save button now works.

  • Display PDF from BAPI in Webdynpro

    Hi all,
    I have a BAPI that returns a PDF file as a TLINE table, and I need to display the result in a Java Webdynpro, do you guys know how I can do that? Thank you in advance.

    Hello SAPer
    The TLINE table is not basically a PDF file but an OTF file. I suggest you to call one more BAPI 'Convert_OTF' that takes this TLINE table as input and returns a pdf_file.
    Then in JAVA Web Dynpro, use the following code in your action handler after calling the respective RFC :-
    byte[] pdfContent;
    String pdfFileName = null;
    pdfContent = wdContext.current<Bapi_name_OutputElement>().getE_Pdf_File();
    pdfFileName = "<name>"
    IWDCachedWebResource pdfResource= WDWebResource.getWebResource(pdfContent,WDWebResourceType.PDF);                                         
    try
    wdComponentAPI.getWindowManager().createExternalWindow(pdfResource.getURL(),pdfFileName,true).open();
    } catch (WDURLException e)
    msgMgr.reportException(e.getMessage(),false);
    I hope this helps you.
    Regards
    Kapil.

  • Display PDF from BAPI's binary output

    Dear All,
    I am struck badly with this scenerio here.
    we have a Bapi which is generating an adobe form in the backend and providing that as an attribute of type binary.
    i used the following code to display that binary output, to be opened in Acrobet reader.
    byte[] pdfContent= wdContext.nodeZhra_Get_Lettertype_Desc_Input().nodeOutput().currentOutputElement().getE_Bin_File();
         IWDCachedWebResource pdfResource = WDWebResource.getWebResource(pdfContent,WDWebResourceType.PDF);
         IWDWindow win = wdComponentAPI.getWindowManager().createExternalWindow(pdfResource.getURL(),"PDF in Arabic",true);
         win.setTitle("PDF in Arabic");
         win.removeWindowFeature(WDWindowFeature.ADDRESS_BAR);
         win.removeWindowFeature(WDWindowFeature.TOOL_BAR);
         win.removeWindowFeature(WDWindowFeature.MENU_BAR);
         win.removeWindowFeature(WDWindowFeature.STATUS_BAR);
         win.show();
    the problem is that the acrobet reader opens and says it could not display the file and it may be not supported or might be damaged.BUT
    1. the file is being generated and correctly displayed on another system
    2. both systems have the same version and updates of acrober reader 9.
    Kindly let me know the solution or some work-around to solve this problem. Is there a way,where i should use interactive form to do this...
    thanks in advance

    Hello!
    If it works on one client but not on the other i think it is not a Server problem.
    Check th following:
    Open the document in the Browser where it is displayed and save it on a thumbdrive and open it on the other client.
    -> If it works: it must be Browser settings
    -> If not: the generated PDF is not valid for the Adobe Reader of the other client.
    If it works on the Server but not on the client, try to dump it to a file on the Webserver to see if the BAPI call (RFC/WS) is the problem. When you use XString for exampe I think there is a problem with the data beeing split into several lines. If you have the file you should be able to open it. Compare the size of the File on the WebAS and the backend.
    Kind regards
    Matthias
    Edited by: Matthias Schneider on Nov 4, 2008 6:19 PM

  • How to print specific pages of a pdf from a vb 2013 program using a print dialog

    Hi.  I am using the acrobat sdk to display pdfs from within a vb 2013 program, because the pdfs are large and we have developed indexes on certain columns.  The indexes are stored in SQL tables.  My program has a search window which allows the user to search for a value and displays all the pages on which this value appears in the indexed column in a listbox.  By double-clicking on the desired value in the listbox, the user can go to the selected page and column.  However, the user also needs to be able to highlight one or more of the pages in the listbox and print these pages.  I could do this silently using AcroExchAVDoc.PrintPages, but the user also needs to have a print dialog displayed in order to possibly select a watermark to be printed on the pages.  I also need to default the orientation of the pages depending on the document.
    I have reviewed the sdk documentation and also searched in Google and on this site but have not found a way to do this.  Does anyone have a suggestion?  Thanks for any help you can provide.
    Mary

    Hi.
    I did try using the printParams feature and it worked, but since I need to be able to print sets of non-consecutive pages,  I end up having to bring up the print dialogue multiple times and have the user set watermarks each time. 
    I decided to just create a new pdf in a temp directory containing the selected pages and open this document in a new window.  This works well and allows them to use the print button on the window to print, bringing up the print dialogue just once.  However, since I need to open the document in a way that shows the print button, I am using OpenInWindowEx, with AV_DOC_VIEW, and the option PDUseBookmarks or PDUseThumbs, rather than PDUseNone.  This displays a toolbar which also includes icons for creating a new pdf, deleting pages, etc.  I do not really want to include these icons on the toolbar.  Is there a way to remove unwanted icons from the toolbar, or make them invisible?
    Hope this makes sense.  Thanks for your help.
    Mary

  • 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

  • Problem with pdf display downloaded from application server

    Hi all,
    I have a problem with displaying pdf downloaded from application server (saved in BINARY MODE).
    I am getting the pdf output of adobe form in FPFORMOUTPUT-PDF as rawstring back to my program and then converting that rawstring into binary form using the function module SCMS_BINARY_TO_STRING.
    Now, when I export the data to presentation server directly using cl_gui_frontend_services=>gui_download, the pdf is downloaded properly.
    However, when I save the data to application server file by looping at the internal table obtained from SCMS_XSTRING_TO_BINARY and using TRANSFER, and subsequently downloading the file in "unconverted format" from AL11 to my desktop, I am getting a "blank" pdf file (with the same number of pages as the one downloaded using gui_download).
    I have tried different encodings during download but in those cases i get corrupted pdf message. only the default option of INTIAL value seems to work.
    I am forced to believe that there is a problem in my code which saves the data to app server but I cant find any solution that is logical. Any solution to this would be greatly appreciated.
    Regards,
    Sasi
    Edited by: Sasi Upadrasta on Sep 29, 2010 7:55 PM

    used a program to read the file from appl server and then downloading it to desktop.

  • Display PDF on the browser from BLOB column

    Hi All,
    I have BLOB column in the table where we are storing PDFs.
    I want to display PDF within the browser ( not as a download option) from that BLOB column, like clicking on the "Print" link.
    Please let me know if anyone has any suggestion.
    -Smith

    Create this DB procedure:
    procedure show_webdoc(io_blob    in out nocopy blob
                         ,i_mimetype in varchar2
                         ,i_filename in varchar2)
    is
    begin
       if dbms_lob.getlength(io_blob) >0 then
          owa_util.mime_header(nvl(i_mimetype,'application/octet'),false);
          htp.p('Content-length: ' || dbms_lob.getlength(io_blob));
          htp.p('Content-Disposition:  inline; filename="'||i_filename|| '"');
          owa_util.http_header_close;
          wpg_docload.download_file(io_blob);
       end if;
    end;Get the blob and give it as input to this procedure. For a pdf the mime type will be application/pdf.

  • I have Acrobat 9.5 and when I try to create pdf from scanner, it displays an error "Adobe acrobat has stopped working". Is there any way I can use this functionality?

    I have Acrobat 9.5 and when I try to create>pdf from scanner, it displays an error "Adobe acrobat has stopped working". Is there any way I can use this functionality?

    Provide you have Acrobat 9 installed in an OS for which Acrobat 9 is compatible then you can use the functionality.
    As well, you need a scanner connected, powered up, and the software installed. Acrobat 9 "prefers" TWAIN drivers.
    Always visit the scanner vendor's site and download - install the latest greatest software.
    n.b., The Acrobat 9.x product family passed into "End of Support" mid-year 2013.
    As well the Acrobat 9.x product family is not compatible with contemporary OSs.
    Be well...

  • Annotated PDF from Preview will not display annotations in iPad mail

    I have an Annotated PDF from Preview will not display annotations in iPad mail, yet, it will display them on my Macbook Air. I confirmed this with another iPad user. Same results. Any ideas.

    I had the same issue. iAnnotate PDF will display your annotations made in preview and allow you to annotate on the iPad. It is a great app, I and quite happy with it.

Maybe you are looking for

  • Attach to external Data Source hangs indefinitely

    The data source is a freshly published schema created in VS. I have a similar schema in production with data that was working. Why would the update hang? (And yes, the connection string is correct). The screen that shows you what tables to select end

  • Sequence in operation

    we have a situation: Operation 0010, 0020 and 0030 are in final assembly. Operation 0010 and 0020 should start simultaneously but should have independent confirmation possible. After confirmation of 0010 and 0020, Operation 0030 should start and be c

  • DRM activator issue

    hello can you help me with the same issue as well: "User's signature is invalid. PLease Reactivate. Adobe DRM Activator error (server code 9. Fault location:7 Contact Customer Support." When going to the Adobe DRM Activator site : Here's the problem

  • 4.0 EA1 - Stops after entering Java location

    Hi I have a windows 7 64 bit laptop with a previous version of SQL Developer 3.2.2 and Oracle 11.2.0.3 DB installed. When I start SQL Developer  (sqldeveloper.exe) it prompts me to enter the location of the JDK 1.7 (C:\Program Files\Java\jdk1.7.0_25)

  • Please help! LR 4

    Hi, Please respond if you can.  I have spent hours trying to figure this out. I created a web gallery for the first time 2 nights ago to email myself some images.  Ever since I created that, whenever I try to export a PSD file to photoshop it automat