× 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.



There are two way to display/upload a PDF file from CGIDEV2.

Public Files:

A public file exist within the apache domain and can be retrieved by any
client that knows the link to the file. The typical way to link to such
file in CGIDEV2 is a html page that has a link to the file and do a
redirect to the file by using the intermediate web page as shown or an
imbedded link in the HTML that either shifts the HTML page or launch an
IFRAME. In both models it is Apache that serves the binary PDF file
directly.

Content-type: text/html

<HTML>
<HEAD>
<SCRIPT LANGUAGE = "JavaScript">
parent.location.href="/%PDFS%//%PDFF%/"
</SCRIPT>
</HEAD>
<BODY>
</BODY>
</HTML>

(Nathan is not aware that CGIDEV2 uses HTTP headers but CGIDEV2 does, it is
just normally a part of the template normal CGIDEV2 programs uses and
therefor there is no CGIDEV2 procedure that sets the content-type.)

Hidden Files:

Hidden PDF files is a little harder to code since you need to create a
CGIDEV2 program that has a HTTP content-header (such as content-type:
application/pdf ...) that simulates the HTTP header apache uses and the
header must be in EBCDIC while you need to import the binary PDF file in
the CGIDEV2 program and update the CGIDEV2 output-buffer with the binary
data without any conversions.This may be problematic since CGIDEV2 may
change its output buffer before it is send.

A better way is to build a procedure that superseeds the CGIDEV2 output
mechanism.

Hidden files may be placed anywhere in the IFS but may also be IFS files
that only exists while the CGI program serves the file. Further more you
are able to pass parameters to the CGIDEV2 program that may affect the
content of a generated PDF file.


On Wed, Jul 19, 2017 at 6:03 AM, Bradley Stone <bvstone@xxxxxxxxx> wrote:

Would an entry in your robots.txt to say not to crawl pdfs work?

On Tue, Jul 18, 2017 at 5:03 PM, Joe W Holt <joe.holt@xxxxxxxxxxx> wrote:
I agree with Charles. I'm having to convert ours to streaming because of
other sites linking to the documents. They are public documents but
should
be served from our site. I've tried different apache configs but nothing
that satisfied everything I needed to keep working.

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



From: Charles Wilt <charles.wilt@xxxxxxxxx>
To: "Web Enabling the IBM i (AS/400 and iSeries)"
<web400@xxxxxxxxxxxx>
Date: 07/18/2017 04:59 PM
Subject: Re: [WEB400] Page title for CGIDEV2 PDF file
Sent by: "WEB400" <web400-bounces@xxxxxxxxxxxx>



yes, all your PDFs would be available via a URL.

I'd stick with streaming....unless all the docs are public (to the users
of
the site at least).

Even if public, I'd probably stick with streaming them.

Charles

On Tue, Jul 18, 2017 at 3:51 PM, Justin Taylor <JUSTIN@xxxxxxxxxxxxx>
wrote:

The PDF files already exist and are generated by our QC department. I
have no idea how.

I'm having my CGI app stream the file to the browser.


It looks like if I link directly to the PDF file (rather than streaming
it
via CGI), the window title is the PDF filename. These aren't sensitive
documents, so I think I'll just symlink the PDF dir under Apache and
link
directly to the PDF files. Any glaring problem with that?


Thanks

--
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.


--
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.


--
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.

--
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.

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.