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



I'd imagine it might be the dell printer

Sent from my iPhone

On Aug 6, 2016, at 3:20 PM, Jack Tucky <jacktucky@xxxxxxxxx> wrote:

When I use QimgCvtImg to convert to the USERASCII spool file, I get junk on
my printer.

The printer device description has HPT(*YES), I used MFG *HP5 (it's a
dell), Image Configuration *IMGA01, and system driver program *HPPJLDRV.

Not sure where to look, device description or ?

Thanks, Art



On Sat, Aug 6, 2016 at 1:59 AM, Vernon Hamberg <vhamberg@xxxxxxxxxxxxxxx>
wrote:

Hi Michael

Congrats on your promotion - and thanks for confirming my findings.

Regards
Vern


On 8/5/2016 3:32 PM, Michael Schutte wrote:

Sorry guys, I don't pay much attention any more :-) . Been promoted.

Anyway, it turns out that it was a PDF not PCL. The printer that we were
printing to was able to handle that after upping the RAM.

Jack...
Yes, I used WSCST to create the PDF in the IFS and then converted the PDF
back to a *USERACSII spool file.


On Thu, Aug 4, 2016 at 3:32 PM, Jack Tucky <jacktucky@xxxxxxxxx> wrote:

Michael: I'm having the same problem, the image just won't print.

You are saying that you used WSCST(*PDF) and created a PDF in the IFS,
then
converted that back to a spool file?

Art

On Thu, Aug 4, 2016 at 1:04 PM, Vernon Hamberg <vhamberg@xxxxxxxxxxxxxxx
wrote:

Hi Michael

I'm coming back to this - and wondering if I have all the right settings
for the QCvtImgCvt API.

What happens is, when I convert a PDF to a *USERASCII spooled file, what
I

get is the PDF in the spooled file.

I was hoping it would give me PCL - it doesn't!

I tested it on an HP LJ that understands PDF - but we cannot count on
that

- many printers here do NOT have a PDF engine.

So perhaps a favor - since 7.1, CPYSPLF can copy the SPLF to a file in
the

IFS - and if we don't specify a WSCST, and if it's a *USERASCII SPLF, we
get the contents of that spooled file in the stream file - VERY COOL!.

If you have some time, could you take one of your *USERASCII conversions
and run CPYSPLF this way?

CPYSPLF FILE(spooled-file-name) TOFILE(*TOSTMF) JOB(job-specification)
TOSTMF(stream-file-name)

Then take a look in the IFS - it'll be in EBCDIC, so you'll need to view
it in CCSID 1252, probably.

I'm curious to know if it is actually PDF, not PCL. IF you get PCL, I
will

want to know how!! I'll look at the parameters again that you have for
the

API.

Cheers and much thanks!
Vern


On 1/13/2016 3:36 PM, Michael Schutte wrote:

Good news. After getting the QimgCvtImg api to work using a stream file.
I
thought I may be out of luck. But I was able to successfully get what
I
needed.

During this process, I read up on the AFPRSC printer file keyword. I
first
started out using that. The problem was that the printers wouldn't
print
the image that I've put on the spool file. I was expecting it work
basically like and image.

Since it wouldn't print from the original AFPDS spool file, I tried to
override the printer file so that it would create a PDF on the IFS.
When

I
opened the PDF or printed, the image was there. So great I was almost
there.

After that I fought for several days with trying to get the GIF image
on a

printer file (QSYSPRT) overridden to DEVTYPE(*USERACSII). I was able to
successfully get the image to print, but I had no control on where it
printer, nor the size of it.

Then it hit me this morning. The QimgCvtImg api is able to convert PDF
stream files to a spool file. So I gave it shot and was able to get my
packing slip exactly how I need it.

The steps needed for others in the future when getting a base64 encoded
image from a webservice.

1. Get the GIF from UPS by initiating the call to the webservice.
2. parse the base64 string from the XML data (or whatever datasource) .
3. Use Apr_Base64_Decode_Binary (apache's base64 program).
-- binary_length = Apr_Base64_Decode_Binary(binar
yImage:LabelImage);
//LabelImage is base64, the input parm. binaryImage is the output
converted string.
4. Converted the Source CCSID of 1208 to 500 using QtqIconvOpen, iconv,
iconv_close procedures.
5. Wrote the binary string field to the IFS using Scott Klements IFS
procedures.
fd = open('/home/xxxxxxxxxx/testups.gif'
: O_WRONLY + O_CREAT + O_TRUNC
: S_IRUSR + S_IWUSR + S_IRGRP);
callp write(fd: %addr(binaryimage): %len(%Trim(binaryimage)));
callp close(fd);
6. Override packing slip printer file.
OVRPRTF TESTUPS DEVTYPE(*AFPDS) OUTQ(QPRINTS) PAGESIZE(66 85)
TOSTMF(''/home/xxxxxxxxxx/test1.pdf'') WSCST(*PDF)');
7. Opened printer file for packing slip. Add information to print, and
set

image in proper place using program to system fields.
Rotate = 0;
// How far down the page.
POSD = 6.5;
// How far across the page
POSA = 1.25;
// Width of the image
WIDTH = 8;
// Height of the image
HEIGHT = 4;
// Name of Object on IFS. WITHOUT THE PATH
OBJNAME = testups.gif;
// Path to the Object
PATH = '/home/xxxxxxxxxx/';
Write REC1; // Put image on page.
7.A. The REC1 definition.
A R REC1 AFPRSC(&OBJNAME 22 +
A &POSD &POSA +
A (*SIZE &WIDTH &HEIGHT) +
A (*ROTATION &ROTATE) +
A (*MAPOPT *SL) +
A (*PATH &PATH) +
A )
A ROTATE 3S 0P
A POSD 5S 3P
A POSA 5S 3P
A WIDTH 5S 3P
A HEIGHT 5S 3P
A OBJNAME 125A P
A PATH 500A P

8. Override QSYSPRT as device type of *USERASCII
OVRPRTF QSYSPRT DEVTYPE(*USERASCII) // there is no opening of
this
file. QimgCvtImg will create it.
9. Call QimgCvtImg after setting up the datastructures to pass to it.
Code
example found here. http://code.midrange.com/0452359861.html
10. Delete override on both printer files.
11. Printer file created in QimgCvtImg prints with image on it!!!!!



On Tue, Jan 12, 2016 at 1:21 PM, Michael Schutte <
mschutte369@xxxxxxxxx
wrote:

So I was able to get the QIMGCVTI/QimgCvtImg api to work. However, I

don't think this is what I need. Because I don't see how I can get
the

image to the printer file in the position I need it and the orientation
needed.

Here is the code I was able to get working in case someone else needs
it.

http://code.midrange.com/0452359861.html

On Mon, Jan 11, 2016 at 11:54 AM, Michael Schutte <
mschutte369@xxxxxxxxx

wrote:

I am amazed by the lack of examples using the QIMGCVTI, QimgCvtImg
APIs.

A lot of people asking for examples, but not getting any answers. I'm
going to give a shot and see what happens. I'm not completely sure
what

needs to go into the data structures. So I'll see how it goes. Ask
questions as I go. Sorry!


On Mon, Jan 11, 2016 at 10:26 AM, Wilson, Jonathan <
piercing_male@xxxxxxxxxxx> wrote:

On Mon, 2016-01-11 at 09:58 -0500, Michael Schutte wrote:

Now that I think about it, I believe I found that before the last
time

I

tried this project.

I changed it to 22 and it still prints the image. But it only does
it

if I

override the printer file to *PDF and to the IFS. Which requires me
to

then

open in Adobe and print.

This would be a problem for us as the account will be printing a
batch

of

these, usually more than 100.

Obviously, I could run a windows command to print. But that seems
troublesome and I don't believe that would work in a submitted
job. I

say

don't believe because I've never tried and a submitted job; wouldn't

have a

terminal to a pc.

It probably wouldn't print as you say, because there wouldn't be
windows
attached. That said, I wonder if it would be possible to print via
qsh

(or similar) by using a *nix pdf print program or more directly
calling

a java one? Obviously that would depend on getting the source,
and/or a

successful compile in the *nix environment or java language (both of
which I have no experience with in the IBM/i world).


Anyway, is there any way I could get this to print from a spool
file
much

like a page segment or overlay?

From what I've seen we need to have InfoPrint Server or something
like
that. How can I tell if we have that?

Or can I take the base64 string and create an overlay/page segment?

We are printing to an HP printer. I test using HP OfficeJet Pro
X476

dnMFP

Production printer will be HP LaserJet 4350dtn

I tried using Scott's PRTSTMF, but it's cutting off the last inch
of

the

page and telling the printer that I need to put legal paper in. I

don't

know why.

On Mon, Jan 11, 2016 at 8:50 AM, Charles Wilt <
charles.wilt@xxxxxxxxx

wrote:

That's the way I read it...

Strange that they don't have a symbolic constant for GIF.

Charles

On Fri, Jan 8, 2016 at 6:03 PM, John Yeung <

gallium.arsenide@xxxxxxxxx>
wrote:

On Fri, Jan 8, 2016 at 5:31 PM, Charles Wilt <
charles.wilt@xxxxxxxxx>
wrote:

R REC1 AFPRSC('TEST.GIF' 22 2.0 1.0 +
(*SIZE 4 4) (*MAPOPT *SL))

That is indeed interesting. Am I reading it right that the image

type
there is 22, and not some symbolic constant?

John Y.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L)

mailing
list

To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L)

mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx

To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
mailing

list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list

To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.