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



Won't that attempt to find the PDF document on the client PC? How does it
know to look on the server?

On 12/29/06, Jim Horn <jimh@xxxxxxxxxxxxxx> wrote:

Been trying hard but no luck yet.


I have been using this link in a browser window (IE6) to call the cgi
program.
http://192.168.2.1:8015/TEST/TSTpdf.pgm

It looks like this

H DFTACTGRP(*NO) ACTGRP('TEST') BNDDIR('QC2LE')



D stdout          s               *   import('_C_IFS_stdout')

D fputs           PR            10I 0 ExtProc('_C_IFS_fputs')

D   string                        *   value options(*string)

D   stream                        *   value

D fflush          PR            10U 0 ExtProc('_C_IFS_fflush')

D   STREAM                        *   VALUE



D DATA            S           1000A   VARYING

D $CRLF           S              2A

D PDFPATH         S            200A



/FREE



    $CRLF = X'0D25';

    PDFPATH = '"/ATEMP/10SM074.PDF"'   ;



                              DATA   = 'CONTENT-TYPE:  TEXT/HTML' +
                               $CRLF + $CRLF                      +

                               '<HTML><SCRIPT LANGUAGE=JAVASCRIPT>' +

                               $CRLF +

                               'VAR PDFWINDOW = WINDOW.OPEN(' +

                               %TRIM(PDFPATH) +  ','       +

                               '"PDFWINDOW","SCROLLBARS=1,RESIZABLE=1,' +

                               'WIDTH=750,HEIGHT=540");'+ $CRLF     +

                               'PDFWINDOW;'             + $CRLF     +

                               'PDFWINDOW.MOVETO(3,3);' + $CRLF     +

                               'HISTORY.BACK();'       + $CRLF     +

                               '</SCRIPT></HTML>';



        FPUTS(DATA: STDOUT);

        FFLUSH(STDOUT);



     RETURN;

/END-FREE





It returns the following source to the browser but no pdf displays

<HTML><SCRIPT LANGUAGE=JAVASCRIPT>
VAR PDFWINDOW =
WINDOW.OPEN
("/ATEMP/10SM074.PDF","PDFWINDOW","SCROLLBARS=1,RESIZABLE=1,WIDTH
=750,HEIGHT=540");
PDFWINDOW;
PDFWINDOW.MOVETO(3,3);
HISTORY.BACK();
</SCRIPT></HTML>

/Atemp is a directory off the root directory
/atemp is also the name of a file share for /atemp


Any ideas?

Jim





--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



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.