[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Using FTPAPI to ftp to a printerfile
Hi Magne,
That was it! Thank you very very much!
I was using the from and to filenames in a wrong order, just switched
them to remote and then local file, and it works fine!
A definite case of a layer 8 probklem I guess, I was so focused on the
fact that it might be a problem in Scott's procedures that I didn't
see this very stupid error. Anyway, thanks for al your help guys!
And oh, by the way, the PCL file which I am uploading to the
printerfile _is_ a PDF file, converted via PASE and ghostscript form
PDF to PCL, which all printers are capable of printing.
Greetings, Jack
______________________________________________________________________
Van: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] Namens Magne Kofoed
Verzonden: donderdag 12 maart 2009 16:27
Aan: HTTPAPI and FTPAPI Projects
Onderwerp: SV: Using FTPAPI to ftp to a printerfile
Hi,
for your info....this will also work with a pdf file....if your
printer can recognize the pdf file printer stream.
Try using remote file: local file: not local file: remote
file
if ftp_put(sess: to: from) < 0
This i how it looks like in the FTPAPI_H source mbr.
D FTP_put PR 10I 0
D peSocket 10I 0 value
D peRemote 256A const
D peLocal 256A const options(*nopass)
Best regards
Magne
______________________________________________________________________
Fra: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx på vegne av Mike Krebs
Sendt: to 12.03.2009 14:13
Til: 'HTTPAPI and FTPAPI Projects'
Emne: RE: Using FTPAPI to ftp to a printerfile
Jack,
I see where you are headed here. Cool idea. What are the relevant
parameters
on the print file? Simply userascii?
CRTPRTF FILE(QGPL/FTPPRINT) DEVTYPE(*USERASCII)
Mike Krebs
> -----Original Message-----
> From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [[1]mailto:ftpapi-
> bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Lammerts, Jack
> Sent: Thursday, March 12, 2009 4:26 AM
> To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Using FTPAPI to ftp to a printerfile
>
> Hi Scott,
>
>
>
> Sorry, should have included the relevant code in the first place.
>
>
>
> This is the test code I use, shamelessly copied and adapted from one
of
> your
>
> supplied testprograms:
>
>
>
> * put the IFS PCL printerfile to a *USERASCII printerfile
>
>
>
> c eval from = '/tmp/test.pcl'
>
> c eval to =
'/qsys.lib/qgpl.lib/ftpprint.file'
>
>
>
> c callp FTP_NamFmt(sess: 1)
>
> c callp ftp_binaryMode(sess: *on)
>
>
>
> c if ftp_put(sess: from: to) < 0
>
> c eval Msg = ftp_errorMsg(sess)
>
> c dsply Msg
>
> c endif
>
>
>
> The error ocuurs at the ftp_put operation.
>
>
>
> Thnx in advance, Jack
>
>
>
>
>
>
----------------------------------------------------------------------
-
> -
> -------------------
>
> Hi Jack,
>
>
>
> Please tell us how to create the same error for ourselves. That
will
> help us to understand.
>
>
>
>
>
> Lammerts, Jack wrote:
>
> >
>
> > I;ve been using your excellent project FTPAPI for some time
now,
> and I
>
> > am liking it very much. Thanks!
>
> >
>
> >
>
> > Today I've come across a situation which I don't know how to
> solve.
> I
>
> > am trying to ftp a binary file from the IFS to a *USERASCII
>
> > printerfile on our iSeries box. Manually FTP'ing the file to
the
>
> > printerfile works fine, but when I use FTPAPI I receive the
error
>
> > message "Invalid file type for FTP transfer". Are printerfiles
not
>
> > supported by your API, or am I doing something wrong?
----------------------------------------------------------------------
-
This is the FTPAPI mailing list. To unsubscribe, please go to:
[2]http://www.scottklement.com/mailman/listinfo/ftpapi
----------------------------------------------------------------------
-
References
1. mailto:ftpapi-
2. http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------