Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.
The goal is simple for any non-IBM i system: PRINT SOMETHING NON-TEXT in nature.
I've read up on the AFPRSC Keyword. I have it working.
I've read up on the OUTQ Mfg Model Number Parameter.
I haven't read up much at all on CRTDEVPRT command.
Here are the Original Requirements:
Here are the NEW Requirements:
Using AFPRSC DDS Keyword I can generate a SPOOL file. All text and barcodes in that SPOOL file print on the HP Printers. The Image identified by the AFPRSC does NOT print.
If I copy that SPOOL file to a PDF file on the IFS, then use the COZTOOLS CPYFRMPDF command and copy that PDF to the OUTQ for the remote printer (the same outq from where it was originally printed), the PDF (text and image) print as expected. They don't print perfectly, but at least everything prints.
Is there any working example of using the AFPRSC DDS keyword to print an Image stored on the IFS?
Preferrably to a HP or Epson Printer but anything. I'd also settle for any written example (in RPG or C) of using the QImgCvtI API.
NOTE: PAGESEQ and OVERLAY are NOT applicable since they are more STATIC entities that require conversion of the image to some goofy IBM-only format using a process that screams "Move off the 400".
The weird thing is this: Last month, I could swear I had this simple tool I wrote PRTIMG (Print Image File) working. It loaded a JPG from the IFS into the AFPRSC keyword and it printed--after screwing with the scaling. Today I can no longer find those settings or perhaps I used the PDF "round trip" technique I mentioned above, and simply forgot.
H DFTACTGRP(*NO) ACTGRP(*NEW) OPTION(*SRCSTMT: *NODEBUGIO) H THREAD(*SERIALIZE) FPRTIMAGE O E PRINTER D entryPList PR extpgm('PRTIMAGE') D imageFile 128A Const Varying D path 640A Const Varying D pos Const LikeDS(POS_T) D imgSize Const LikeDS(POS_T) D entryPList PI D imageFile 128A Const Varying D path 640A Const Varying D pos Const LikeDS(POS_T) D imgSize Const LikeDS(POS_T) D pos_T DS Qualified D elem 5I 0 D top 5P 3 D left 5P 3 D width 5P 3 overlay(top) D height 5P 3 overlay(left) C MOVE *ON *INLR /free data = 'This is the Image Print Test program'; imgDown = pos.top; imgAcross = pos.left; imgWidth = imgSize.width; imgHeight = imgSize.height; imgFile = imageFile; imgPath = path; write image; write text; return; /end-free
A R TEXT SPACEA(1) A DATA 56A 2SPACEA(1) A R IMAGE AFPRSC(&IMGFILE *JFIF + A &IMGDOWN &IMGACROSS + A (*PATH &IMGPATH) + A (*MAPOPT *SL) + 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 IMGPATH 640A P