PNG file in printing PDF via AFPDS in IBM I / Iseries

JPG in AFPRSC with 23 works fine. But PNG with 65 is not printing.

0.0 0.0 (*PATH '/JP/STAT'))

Open in new window

Need help on how to get it work? or is 65 the correct component ID for PNG?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gary PattersonVP Technology / Senior Consultant Commented:
Table on page 16 don't show PNG as a supported type on AFPRSC:
Rajesh MohanaSundaramAuthor Commented:
hi Gary,

AFPDS has support for EPS and PNG formats.

refer page 26

AFPDS document

Need to print QR code in PNG (or EPS) format in PDF.
☠ MASQ ☠Commented:
PNG is supported in AFPRSC but is deprecated in favour of graphics formats listed in:

Table 1. Object types supported on the AFPRSC keyword
In the document you both link to.

It is far more likely that the device you are sending the print job to doesn't support PNG and you should try outputting in a fully supported format if you have no control on the printers used.

(or print to a device that does support PNG via AFPRSC!)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Gary PattersonVP Technology / Senior Consultant Commented:
I'm just going off the IBM-supplied documentation.

AFPDS is the data stream.  Looks like it is supported in the data stream.

But you are using the DDS APFRSC DDS keyword rather than generating your own AFP manually, and the DDS Reference manual doesn't list it as supported.  Are you getting an error or warning when you compile the PRTF?  If not, maybe it is just an error in the manual.  

DDS Reference also notes:

If you specify an object component ID value that is not supported by the device, the result will be unpredictable and will depend on the device to which the file is sent.

It isn't printing, so as MASQ suggests, check to see if your device supports PNG.  

Additional thoughts:

Can you supply a copy of the problem AFP file to us, or pull it up in an AFP viewer and verify the resource was properly placed in the file?  That will help you diagnose if this is an IBM i problem, or a printer problem.

Last note: not that hard to transform a PNG into a JPG, PDF, PCL, TIFF, or some other supported format.  PNG is getting created or ingested into your system somewhere - if PNG is a problem, acquire it or convert it into a format you can use.  Easy to do in Java, for example:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.