How can I open a new window for a (calculated) PDF?

Hi,
I have a BSP application with MVC. The start page is a HTML/HTMLB page with some buttons. If you click on the buttons, you get a PDF document in the same browser window. I generated the PDF over smart forms from table/Cluster data.
I call the controller in the OnInputProcessing event handler of the page and give it the parameters.
The problem: if you are on the PDF you cannot come back to the start page. I think, it is better, if the PDF gets a new window. The user can open on this way many PDF docs.
I tryed with navigation->next_page(...) or call_view etc. but all this dosn't work. Only the PDF will be show and in the same window!
Do I have to separe the application in two applications and use the CALL_APPLICATION method?
Or does anyone know a better way?
Thank you!
Regards
Patrizia

HI Thomas,
I send you a fragment of the code. It does work well.
Thank you for the links!
The data are read, convert into a otf, then in pdf
CALL METHOD me->print_otf_2_pdf
      EXPORTING
        otfdata    = model->otf
        response   = response
        navigation = navigation.
METHOD print_otf_2_pdf .
generated result: PDF format
  DATA: l_pdf_xstring  TYPE xstring,
        linetab        TYPE tlinetab,
        l_pdf_len      TYPE i.
Conversion of output format OTF into PDF format
now convert the final document (OTF format) into PDF format
  CALL FUNCTION 'CONVERT_OTF'
       EXPORTING
         format                      = 'PDF'
       MAX_LINEWIDTH               = 132
       ARCHIVE_INDEX               = ' '
       COPYNUMBER                  = 0
       IMPORTING
         bin_filesize                = l_pdf_len
         bin_file                    = l_pdf_xstring       " binary file
       TABLES
         otf                         = otfdata
         lines                       = linetab
       EXCEPTIONS
         err_max_linewidth           = 1
         err_format                  = 2
         err_conv_not_possible       = 3
         err_bad_otf                 = 4
         OTHERS                      = 5
  IF sy-subrc <> 0.
  ENDIF.
  CALL METHOD me->open_pdf
    EXPORTING
      pdf_xstring = l_pdf_xstring
      pdf_len     = l_pdf_len.
ENDMETHOD.
METHOD open_pdf .
  DATA: l_pdf_len  TYPE i,
        runtime    type ref to if_bsp_runtime,
        filename   type string,
        guid       type guid_32.
  response->set_header_field( name  = 'content-type'
                            value = 'application/pdf' ).
  response->set_header_field(
                    name  = 'cache-control'
                    value = 'max-age=0' ).
   l_pdf_len = XSTRLEN( pdf_xstring ).
  response->set_data( data   = pdf_xstring
                      length = l_pdf_len ).
  navigation->response_complete( ).
ENDMETHOD.
Regards
Patrizia

Similar Messages

  • How can I open a new window with the same website like the one I have open?

    In safari I can open a new window with the same website like the one I have open, that makes it easy continuing to navigate on a website and to go back to the original website

    Hello Andieas
    Why open a new window for fast browsing??
    Open new tabs.
    Just right click on what you want to open and click "Open in new Tab"
    It is easy and doesn't consume memory from your computer as well as easy to navigate.
    Hope you'll like it

  • How can we open a New Window on click of a button

    Dear All,
    Please can anyone guide me how to open a page in A new pop up window.
    Application Express 4.0.1.00.03
    Thanks & regards
    Arif Khadas

    Assalamwalkeum Tauceef,
    Thanks for your reply.
    For the second query where you want to refresh parent window and close the popup window,
    Create a html region and give a condition to this region that it should display on a particular request and pass that request on your button click and write this javascript code in your Region SourceAccordingly I created a Region on the Calling Page and have the condition Request = REFRESH.
    Now my problem is on the pop-up window how can I pass the Request as the action when button pressed is Submit and I am using an SQL Insert Action.
    For such an action for button click the Request field is hidden.
    Also please help me through this one for setting the Item values in the pop up window:
    I have the following in Execute When Page Loads
      var total = 0;
      var inv   = '';
      var selected_inv = '';
      total        = opener.document.getElementById('P24_PAY_AMOUNT');
      selected_inv = opener.document.getElementById('P24_PAY_INV');
      $s('P23_RCP_AMOUNT_PAID', total);
      //setSessionValue ('P23_RCP_AMOUNT_PAID', total);
      $s('P23_INVOICES', selected_inv);
      //setSessionValue ('P23_INVOICES', selected_inv);The value that I am getting for the above Items is "     [object HTMLInputElement]" in Mozilla Firefox and "[object]" in Internet explorer, not sure why?
    Please guide.
    Thanks & Regards
    Arif Khadas
    Edited by: Arif Khadas on Apr 27, 2011 9:51 AM

  • How can I open a new window based upon input in an existing window

    Hi,
       I'm pretty new to LabVIEW and I've run into a slight problem that I having trouble finding information about.  My LabVIEW application will present a user with several configuration options.  Depending upon the options the user chooses, a new window/panel will need to appear with an entirely different set of options.  Is this possible?  If so, how?
    Thanks,
    Al

    Hi Al,
    you can call subvis in a case structure ("when button is true then call subvi"). In the subvi's properties you have to set "open front panel when called" and "close afterwards" (window appearance settings).
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How can you open a new window in the new iTunes 11 ???

    In the old version, you can open a list in a new window. But I don't find this option in the iTunes 11 -.-  Can somebody help me ???

    Tony T1 wrote:
    Also, ⌘T for a new Tab (also File->New Window, File->New Tab)
    This is what I always use. You can also click on the plus sign at the far right, that will also give you a new tab/window. And if you want that tab to be a separate window, then once you've created it, just go up to that tab (avoid the little x that will appear--that deletes it), click on the tab, hold and drag it down. It'll leave the other tabs behind and become a window all on its own.

  • How do I create a new window for the iTunes store?

    Hi,
    I have the latest iTunes update on a Windows PC, but I can't seem to open any new windows for the iStore like you used to be able to, so you have to come out of your iTunes library (annoying if you want to check that you haven't already purchased a song you're looking at etc.).
    Please tell me there is a fix (easy or difficult) for this!!
    Matt
    P.s. I have the latest iTunes update.
    PLEASE HELP!!!!

    Reboot the ATV and try it again. If it still won't play correctly, find the file in your iTunes store purchase history, click on the "Report a Problem" link, and report it to iTunes store support.

  • I just updated firefox TODAY 8/17/11 and after the update i can't open firefox unless i restart my computer or i delete going to windows task manager and process, also i can't open a new window, it won't allow it. please can you help me

    I just updated firefox TODAY 8/17/11 and after the update i can't open firefox unless i restart my computer or i delete firefox going to windows task manager and process, also, i can't open a new window, it won't allow it. please help me, everything works on IE, Google Chrome and Safari, everything went wrong after the update

    Hey Elaine07!
    I have an article here that can help you with that issue. This article will help you make sure you have uninstalled iTunes correctly and help you troubleshoot the launch issues you are seeing:
    iTunes for Windows Vista or Windows 7: Troubleshooting unexpected quits, freezes, or launch issues
    http://support.apple.com/kb/ts1717
    Take care, and thanks for visiting the Apple Support Communities.
    -Braden

  • Hello.  I have an old G4 Tower at 10.4.11.  The password for Keychain has been lost.  How can I generate a new password for Keychain?  Every time I use Safari it want me to enter the password.  Any suggestions?  Thank you

    Hello.  I have an old G4 Tower at 10.4.11.  The password for Keychain has been lost.  How can I generate a new password for Keychain?  Every time I use Safari it wants me to enter the keychain password.  Any suggestions?  Thank you

    See if this helps...
    Open Keychain Access in Utilities, use Keychain First Aid under the Keychain Menu item, then either check the Password under that item, change it, or delete it and start over.
    Keychain Access asks for keychain "login" after changing login password...
    http://support.apple.com/kb/HT1631
    Resetting your keychain in Mac OS X...
    If Keychain First Aid finds an issue that it cannot repair, or if you do not know your keychain password, you may need to reset your keychain.
    http://support.apple.com/kb/TS1544

  • How can i open a new blank page, if i open a new tab??

    how can i open a new blank page, if i open a new tab?? because if i click the plus "+" sign(at right corner) it open a website that i don't like.... please help meee....

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]

  • How can I open a second window in iTunes?

    When I see some albums in the the iTunes Store I want to check whether I have some of the songs already. The Search function in the Store only refers to the store and not to my Library. So how can I open a second window in iTunes (one with the Store and one with my Library) to make it easier to compare?
    Thanks

    My understanding it that was removed from iTunes recently (I still run iTunes 7.5 from 2007), so no, not unless you downgrade iTunes (which is not easy).  You can send feedback to Apple about reinstating it but I have yet to see Apple reinstate something that appeared to have been deliberately removed from its software, despite vociferous complaints on this forum.
    http://www.apple.com/feedback/itunesapp.html

  • How can I add a new entry for determining a requirement type

    Dear Friends,
    How can I add a new entry for determining a requirement type
    via Item Category + MRP type,  I see no new entries selection.
    This is in  Avb Check & TOR-> TOR-> Determination of req type using transaction.
    Please help.
    Regards
    Ravi.

    Availability Check and Transfer of Requirements > Transfer of Requirements > Define Requirements Types ?
    Just one node above?
    Never mind, you need to add entry on item category:S

  • How can we open a new folder in the email account (ex: need to save certain emails into a new fodder called "work". can anyone help

    How can we open a new folder in the email account (ex: need to save certain emails into a new fodder called "work".
    Anyone can help?

    Right click on any folder in mail and select Create new mailbox.

  • HT5958 After i updated my terabyte, when i open fcpx 10.1 my hard drive never appears, so i can't open a new library for a new project. What should i do?

    After i updated my terabyte, when i open fcpx 10.1 my hard drive never appears, so i can't open a new library for a new project. What should i do?

    Hard drives do not appear in the application. Use File>New Library.

  • How can I open a new page (using "Pages") when I already have another page open?  It just keeps reverting to the page I have opened already and won't let me open another one?

    How can I open a new page (using "Pages") when I already have another page open?  It just keeps reverting to the page I have opened already and won't let me open another one?

    To make a new document, go to File > New From Template chooser and choose the type of document you wish to create.
    To add a new page to an existing document go to Insert > Sections > Blank.

  • How can I open and fill out a Secured Adobe PDF job application?

    How can I open and fill out a Secured Adobe PDF job application?

    Hi margueritew68053277,
    You should be able to fill that out using the free Adobe Reader, or Adobe Fill & Sign.
    Best,
    Sara

Maybe you are looking for

  • Oracle SQL Developer and commit

    I have the auto commit in SQL Worksheet unchecked and disconnect a worksheet with open transaction and the data is commited !! I have to set another option?? When I close the SQL Developer no questions if I'm sure to close or i want to perform a comm

  • Unifying web apps, modules and apps for better discoverability

    Hi guys, With the rise of open platform apps, and the growth of the developer ecosystem, we are facing a few challenges impacting user experience and apps visibility. The main ones that we see are: Increase the app market place visibility inside the

  • Getting SSLHandshakeException when trying to login to OCOD using Jdev 11g

    Hi, I used the following code to login to OCOD in JDev 10g and SOA 10g. public String logon(String wsLocation, String userName, String password) String sessionString = "FAIL"; try // create an HTTPS connection to the On Demand webservices URL wsURL =

  • Import order for events/rolls

    How does iPhoto determine the order it puts imported files in? When I import several files of photos into iPhoto, they go into Events, but they can be all over the place. I'd like the events in the same Date order as I have them listed in Finder. If

  • Remove "email delivered by bc" link from campaigns?

    Is tehre a way to remove or prevent the footer text in email campaigns declaring that the email was delivered by my partner name?