× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



CGIDEV2 should be as easy as loading a template for the HTTP headers,
writing that out, then loading the PDF as the template, then writing it
out.

Bradley V. Stone
www.bvstools.com
MAILTOOL Benefit #2 <https://www.bvstools.com/mailtool.html>: The ability
to specify a "From" and/or "Reply To" email address!

On Wed, Feb 14, 2018 at 9:51 AM, Joe W Holt <joe.holt@xxxxxxxxxxx> wrote:


Thanks Chris, although all these methods utilize PHP which we don't use in
our shop. I believe I've found direction with CGIDEV2 which I'm starting to
experiment with. I've not found a good method yet to migrate PHP logic into
my RPG code..

***
Regards,
Joe W Holt
Sr Programmer/Developer
Jack Onofrio Dog Shows, LLC
405.427.8181



From: "Hiebert, Chris" <chris.hiebert@xxxxxxxxxxxxxx>
To: "Web Enabling the IBM i (AS/400 and iSeries)"
<web400@xxxxxxxxxxxx>
Date: 02/14/2018 09:03 AM
Subject: Re: [WEB400] Apache Redirects to stop linking from other
domains not working
Sent by: "WEB400" <web400-bounces@xxxxxxxxxxxx>




Here's a google for serving the pdf:

https://www.google.com/search?q=php+output+pdf+stream


The trick is to either echo the file or use readfile to put it into the
stream.
You can even set the header so the file is downloaded by using
'Content-Type: application/octet-stream'. Instead of rendered by using
'Content-Type: application/pdf'.

Great answer here.

https://stackoverflow.com/questions/16847015/php-stream-
remote-pdf-to-client-browser


There is also some really good examples of outputting the file and even one
for limiting the download rate here:

http://www.php.net/manual/en/function.readfile.php

<?php
$fullFilePath = '/path/to/file/file.pdf';

header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment;filename="'.basefile
($fullFilePath).'"');
readfile($fullFilePath);
exit;



Chris Hiebert
Senior Programmer/Analyst
Disclaimer: Any views or opinions presented are solely those of the author
and do not necessarily represent those of the company.
-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Joe W Holt
Sent: Monday, February 12, 2018 3:10 PM
To: Web Enabling the IBM i (AS/400 and iSeries) <web400@xxxxxxxxxxxx>
Subject: Re: [WEB400] Apache Redirects to stop linking from other domains
not working


Just for FYI, everything I read tells me that using the mod-rewrite for
apache can be hit and miss with PDF files due to the way browsers handle
the plugin to view them. sometimes the referrer value doesn't work, which
is what I'm running into. Most solutions point to a server streamed
document instead of a link to one, of which I've no idea how to code to
serve a PDF. If anyone can point a direction for that I'd be most grateful.

***
Regards,
Joe W Holt
Sr Programmer/Developer
Jack Onofrio Dog Shows, LLC
405.427.8181
--
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: https://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/web400.


--
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: https://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
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 thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.