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?
Rajesh MohanaSundaramAsked:
Who is Participating?
☠ 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!)
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.
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:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.