I use the Content-Disposition with the inline and 'filename' parameter. Whatever is the value for 'filename' will be what the pdf name is when the file is brought up in adobe. Here is some sample code. I pass in the inDspFileName parameter so if I pass in "test" the file name in adobe will be called 'test.pdf'
'Content-Disposition: inline; filename=' + %trim(inDspFileName) +'.pdf
Here is the same line hardcoded with a name
Content-Disposition: inline; filename="test.pdf"
The 'inline' could also be replaced with 'attachment'
-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Justin Taylor
Sent: Tuesday, July 18, 2017 2:32 PM
To: WEB400 (web400@xxxxxxxxxxxx) <web400@xxxxxxxxxxxx>
Subject: [WEB400] Page title for CGIDEV2 PDF file
I have a CGIDEV2 app that allows users to look up and view PDF files. They're complaining that the window title for the PDF files is the CGI program name rather than the PDF title. Is there a practical way to get the PDF title to show?
TIA
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.
As an Amazon Associate we earn from qualifying purchases.