NetTalk Central

Author Topic: How to open generated pdf report not in browse  (Read 3330 times)

ianburgess

  • Full Member
  • ***
  • Posts: 119
    • View Profile
    • Email
How to open generated pdf report not in browse
« on: August 17, 2012, 02:01:28 AM »
I want to be able to open a generated PDF report as a "file" so the browser gives option of saving or opening, but at present they all open in a new tab in the browser.

By contrast, if I open a URL of a static file (including PDFs) it opens as I want with the option to save or open.

How can I make a genearated PDF report open the way I want?

Thanks

Ian

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11263
    • View Profile
Re: How to open generated pdf report not in browse
« Reply #1 on: August 17, 2012, 02:38:24 AM »
set the "content disposition".
See the File Download example.

ianburgess

  • Full Member
  • ***
  • Posts: 119
    • View Profile
    • Email
Re: How to open generated pdf report not in browse
« Reply #2 on: August 17, 2012, 04:11:14 AM »
Ok I see p_web.HeaderDetails.ContentDisposition = 'attachment; filename="'&p_web.GetValue('name')&'"' in the example which is serving a static file. If I want to make a standard report (using Tracker PDF Tools) to download rather than open in the browser, what would I embed where?