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



Jeff,

We're on V7R3...
I used the exact source below to create the command, Print file and RPG program with a tiff image that I uploaded from my PC to my home directory and it the when I run the program, the image is embedded in the resultant spool file.

AFPTEST TIFF('/home/doug/Image.tiff')

I wanted to start with your source to duplicate your efforts and go from there, but it worked fine.
You might need to check the CCSID of the image... mine is 437.

Hope this helps,
Doug


-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Jeff Bianchi
Sent: Friday, April 19, 2019 10:22 AM
To: rpg400-l@xxxxxxxxxxxxxxxxxx
Subject: [EXTERNAL] Re: AFPDS Printer File Format Keyword: AFPRSC

I'm really trying to simplify this so that I can get it to work -- but still no joy.

I created a command to facilitate my testing. The command has one parm which is the path and TIFF resource I want to print.

Here's my code:

1. CMD - AFPTEST
CMD PROMPT('Test of Printing TIFF to AFP')

PARM KWD(TIFF) TYPE(*CHAR) LEN(250) MIN(1) +
PROMPT('TIFF (w/Path)')


2. PRTF - AFPTEST01
A R REC01 AFPRSC(&RESN 14 +
A &POSD &POSA +
A (*SIZE &WDTH &HGT) +
A (*PATH &PATH) +
A (*MAPOPT *ST))
A RESN 250A P
A POSD 5S 3P
A POSA 5S 3P
A WDTH 5S 3P
A HGT 5S 3P
A PATH 500A P

3. RPGLE - AFPTEST
H dftactgrp(*no)
Fafptest01 O E PRINTER
DAFPTEST PR
D input 250
DAFPTEST PI
D input 250
*
D lastSlashPos s 3 0 inz(0)
D path s 500
/free
EXSR initPgm;
EXSR mainPgm;
EXSR exitPgm;
/eject
BEGSR initPgm;

lastSlashPos = %scanr('/': input);
resn = %subst(%trim(input): lastSlashPos + 1);
path = %trim(%subst(input: 1: lastSlashPos));
posd = 1.0;
posa = 1.0;
wdth = 10.0;
hgt = 10.0;

ENDSR;
/eject
BEGSR mainPgm;

WRITE rec01;

ENDSR;

/eject
BEGSR exitPgm;

*INLR = *On;
RETURN;

ENDSR;
/end-free

The command I execute is:

AFPTEST TIFF('/QOpenSys/CUBBAT/00028654955.tiff')

I've tried the OVRPRTF suggestion and all I end up with is an empty PDF.

We're on 7.3 and have our PTFs up to date.

Any ideas?

Thanks!


Jeff


--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.midrange.com_mailman_listinfo_rpg400-2Dl&d=DwICAg&c=TRM22a2q2ENZDxdZ_Nz-0OCGEspXTWPuaB6Jil0RfKE&r=o-YzpsmRCPgZlWO4EB4wsOj50O0KPLUTK9BP-UzK-UQ&m=dlVMbV-nRvNV9THDxSWI2rjPH28rQJXQ6Dkc_qJ872I&s=voJ_yMdEAcA6TnUwwS2jGcyFrtmI1DJPGL7H1JcD_EM&e=
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://urldefense.proofpoint.com/v2/url?u=https-3A__archive.midrange.com_rpg400-2Dl&d=DwICAg&c=TRM22a2q2ENZDxdZ_Nz-0OCGEspXTWPuaB6Jil0RfKE&r=o-YzpsmRCPgZlWO4EB4wsOj50O0KPLUTK9BP-UzK-UQ&m=dlVMbV-nRvNV9THDxSWI2rjPH28rQJXQ6Dkc_qJ872I&s=8WrbARsSE2OTEH5Htwo3MEHoGWX6egzTIyDyqs9GiKQ&e=.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://urldefense.proofpoint.com/v2/url?u=https-3A__amazon.midrange.com&d=DwICAg&c=TRM22a2q2ENZDxdZ_Nz-0OCGEspXTWPuaB6Jil0RfKE&r=o-YzpsmRCPgZlWO4EB4wsOj50O0KPLUTK9BP-UzK-UQ&m=dlVMbV-nRvNV9THDxSWI2rjPH28rQJXQ6Dkc_qJ872I&s=q8ave0Hr1KC9gZOlj_zG7Sz_VCIePV-JkhvSNIL2lq0&e=

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.