|
We are running PHP on IBM i
I have added the ability to download/open some documents like statements
as a PDF which works nicely. (We generate the PDF in the IFS with a random
name and then pass the name back to the PHP script.
I am having a problem with controlling how the pdf is to be opened.
I have found that there seems to be two options on the header statement;
header("Content-Disposition: inline; filename=\"$fileName\";" );
or
header("Content-Disposition: attachment; filename=\"$fileName\";" );
Using "inline" opens the pdf in the current browser page and the user has
to click the browsers back button to return to the page where the pdf was
requested from.
Using "attachment" displays a prompt defaulting to download for the user
to save the pdf
What I was wanting to achieve is to have the pdf open in Adobe reader on
the requesting device and if the user wanted to save it then could use the
File ==> Save as option.
Looking for any suggestions or links to more information on how I can
control this ?
Thanks
Don Brown
______________________________________________________________________
This email has been scanned for computer viruses. Although MSD has taken
reasonable precautions to ensure no viruses are present in this email, MSD
cannot accept responsibility for any loss or damage arising from the use of
this email or attachments.
______________________________________________________________________
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list
To post a message email: WEB400@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/web400.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.