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





Hi Jeff,

I paste to a very, very, very simple example, which is completely operative
for me, it works well. In this case, the image is shown centered, and you
can play with the bottom and cross position and with the width and height
of the image.
The name of the directory and the name of the file are literal (with their
respective uppercase and lowercase).
I hope it's be useful.

ctl-opt debug decedit('0,') dftname(PRUNOMI) datfmt(*eur)

option(*nodebugio) dftactgrp(*no) bnddir('NOMIBNDDIR');

Dcl-F PRUNOMIPR Printer usage(*Output) usropn;

Open PRUNOMIPR;

RESN = 'YO.TIFF'; // Nombre del fichero
sin extensión
PATH = '/pdf/usuarios/JLHDEZ'; // Ruta personalizada

OBJT = '*TIFF'; // Tipo de objeto (TIFF en
este caso)
OFFD = 3,10; // Down

OFFA = 5,50; // Accross

WIDTH_ANCH = 14,790 ; // Ancho de la imagen
0/57,790
HEIGHT_ALT = 14,790 ; // Alto de la imagen
0/57,790
ROTACION = 000 ; // Rotacion de la imagen en
grados 0/90/180
Write REC1;

Close PRUNOMIPR;
*InLR = *On;

A R REC1 AFPRSC(&RESN &OBJT &OFFD &OFFA
+
A (*ROTATION &ROTACION)
+
A (*SIZE &WIDTH_ANCH &HEIGHT_ALT)
+
A (*PATH &PATH))

A RESN 10A P

A OBJT 10A P

A OFFD 5S 3P

A OFFA 5S 3P

A PATH 2000A P

A WIDTH_ANCH 5S 3P

A HEIGHT_ALT 5S 3P

A ROTACION 3S 0P




----------------------------------------------------------------------

message: 1
date: Mon, 22 Apr 2019 13:27:18 +0000
from: Jeff Bianchi <Jeff.Bianchi@xxxxxxxx>
subject: RE: RPG400-L Digest, AFPRSC issues

Hi Vern,

I have verified that QOpenSys is being passed in correctly. I've also
tried putting the resource in /home/<myhomedirectory>.

No difference in behavior -- and no error in the joblog. In fact, no
messages in the joblog at all. After I run my command, I do the F10 to see
detailed messages and I get nothing.



Jeff

date: Fri, 19 Apr 2019 12:36:24 -0500
from: Vernon Hamberg <vhamberg@xxxxxxxxxxxxxxx>
subject: Re: AFPDS Printer File Format Keyword: AFPRSC

Hi Jeff

I have a similar example - we use AFPRSC in production - my question -
/QOpenSys is case-sensitive - be sure the case of your passed value is
correct.

I just jumped into this thread - do you have a joblog message giving you
and error code of any kind? A number in the 3000's?

HTH
Vern



------------------------------

message: 2
date: Mon, 22 Apr 2019 13:31:04 +0000
from: Jeff Bianchi <Jeff.Bianchi@xxxxxxxx>
subject: RE: RPG400-L Digest, AFPRSC issues

Ciao Marco!

Sono Jeff Bianchi dagli Stati Uniti. Piacere.

Unfortunately, your suggestion doesn't change the outcome. I'm getting the
same thing I was getting before: nothing.

I'm going to send you an email from my personal account. I have a couple
of questions for you.

Grazie mille, Marco!

A dopo.



Jeff

date: Fri, 19 Apr 2019 19:49:23 +0200
from: Marco Facchinetti <marco.facchinetti@xxxxxxxxx>
subject: Re: AFPDS Printer File Format Keyword: AFPRSC

Try: path = %trim(%subst(input: 1: lastSlashPos -1));

HTH
--
Marco Facchinetti

Mr S.r.l.

Tel. 035 962885
Cel. 393 9620498

Skype: facchinettimarco


------------------------------

message: 3
date: Mon, 22 Apr 2019 10:27:12 -0500
from: Vernon Hamberg <vhamberg@xxxxxxxxxxxxxxx>
subject: Re: RPG400-L Digest, AFPRSC issues

Hi Jeff

All quite strange - someone else asked about using %trim - I don't think
you need that, my example below doesn't use it and works.

Here are the source members for my test bed - the command behaves a bit
strangely around the MORETEXT parameter, no need for testing to clean it
up.? :)

PRTIMAGE command
? CMD??????? PROMPT('Print image using AFPRSC')

? PARM?????? KWD(IMAGEFILE) +
?????????????? TYPE(*PNAME) +
?????????????? LEN(128) +
?????????????? MIN(1) +
?????????????? PROMPT('Image file name')
? PARM?????? KWD(IMAGETYPE) +
?????????????? TYPE(*CHAR) +
?????????????? LEN(10) +
?????????????? SPCVAL((*GIF '22') (*JPEG '23') (*PNG '65') (*TIFF '14')) +
?????????????? MIN(1) +
?????????????? PROMPT('Image file type')
? PARM?????? KWD(TOP) +
?????????????? TYPE(*DEC) +
?????????????? LEN(5 3) +
?????????????? MIN(1) +
?????????????? PROMPT('Top')
? PARM?????? KWD(LEFT) +
?????????????? TYPE(*DEC) +
?????????????? LEN(5 3) +
?????????????? MIN(1) +
?????????????? PROMPT('Left')
? PARM?????? KWD(WIDTH) +
?????????????? TYPE(*DEC) +
?????????????? LEN(5 3) +
?????????????? MIN(1) +
?????????????? PROMPT('Width')
? PARM?????? KWD(HEIGHT) +
?????????????? TYPE(*DEC) +
?????????????? LEN(5 3) +
?????????????? MIN(1) +
?????????????? PROMPT('Height')
? PARM?????? KWD(MAPOPT) +
?????????????? TYPE(*CHAR) +
?????????????? LEN(3) +
?????????????? SPCVAL((*Pos *P) (*PosTrm *PT) (*SclFit *ST) (*CtrTrm *CT)
+
?????????????? (*SclFil *SL)) +
?????????????? MIN(1) +
?????????????? CASE(*MIXED) +
?????????????? PROMPT('Map option')
? PARM?????? KWD(MORETEXT) +
?????????????? TYPE(*CHAR) +
?????????????? LEN(18) +
?????????????? MIN(1) +
?????????????? PROMPT('Additional text')
? PARM?????? KWD(PATH) +
?????????????? TYPE(*CHAR) +
?????????????? LEN(640) +
?????????????? MIN(1) +
?????????????? PROMPT('Image file path')

RPGLE program-
?????? ctl-opt DFTACTGRP(*NO) ACTGRP(*NEW) OPTION(*SRCSTMT: *NODEBUGIO);
?????? ctl-opt THREAD(*SERIALIZE);

?????? dcl-f PrtImage printer;

?????? dcl-pr entryPList extpgm('PRTIMAGE');
???????? imageFile char(128) const;
???????? imageType char(10) const;
???????? top packed(5 : 3) const;
???????? left packed(5 : 3) const;
???????? width packed(5 : 3) const;
???????? height packed(5 : 3) const;
???????? mapOpt char(3) const;
???????? moreText char(18) const;
???????? path char(640) const;
?????? end-pr;
?????? dcl-pi entryPList;
???????? imageFile char(128) const;
???????? imageType char(10) const;
???????? top packed(5 : 3) const;
???????? left packed(5 : 3) const;
???????? width packed(5 : 3) const;
???????? height packed(5 : 3) const;
???????? mapOpt char(3) const;
???????? moreText char(18) const;
???????? path char(640) const;
?????? end-pi;

?????? *inlr = *on;
?????? data = 'This is the Image Print Test program: ' + moreText;
?????? imgDown?? = top;
?????? imgAcross = left;
?????? imgWidth? = width;
?????? imgHeight = height;
?????? imgFile?? = imageFile;
?????? imgPath?? = path;
?????? imgType?? = imageType;
?????? imgMapOpt = mapOpt;
?????? write image;
?????? write text;
?????? return;

PRTF-
???? A????????? R TEXT????????????????????? SPACEA(1)
???? A??????????? DATA????????? 56A??????? 2SPACEA(1)
???? A????????? R IMAGE???????????????????? AFPRSC(&IMGFILE &IMGTYPE +
???? A???????????????????????????????????????????? &IMGDOWN &IMGACROSS +
???? A???????????????????????????????????????????? (*PATH &IMGPATH) +
???? A???????????????????????????????????????????? (*MAPOPT &IMGMAPOPT)??
+
???? A???????????????????????????????????????????? (*SIZE &IMGWIDTH
&IMGHEIGHT))
???? A??????????? IMGWIDTH?????? 5S 3P
???? A??????????? IMGHEIGHT????? 5S 3P
???? A??????????? IMGDOWN??????? 5S 3P
???? A??????????? IMGACROSS????? 5S 3P
???? A??????????? IMGFILE????? 125A? P
???? A??????????? IMGTYPE?????? 10A? P
???? A??????????? IMGMAPOPT????? 3A? P
???? A??????????? IMGPATH????? 640A? P

On 4/22/2019 8:27 AM, Jeff Bianchi wrote:
Hi Vern,

I have verified that QOpenSys is being passed in correctly. I've also
tried putting the resource in /home/<myhomedirectory>.

No difference in behavior -- and no error in the joblog. In fact, no
messages in the joblog at all. After I run my command, I do the F10 to see
detailed messages and I get nothing.



Jeff

date: Fri, 19 Apr 2019 12:36:24 -0500
from: Vernon Hamberg <vhamberg@xxxxxxxxxxxxxxx>
subject: Re: AFPDS Printer File Format Keyword: AFPRSC

Hi Jeff

I have a similar example - we use AFPRSC in production - my question -
/QOpenSys is case-sensitive - be sure the case of your passed value is
correct.

I just jumped into this thread - do you have a joblog message giving you
and error code of any kind? A number in the 3000's?

HTH
Vern




------------------------------

Subject: Digest Footer

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

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com


------------------------------

End of RPG400-L Digest, Vol 18, Issue 235
*****************************************


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.