Re: Print image on 4GL report
Posted in 2009
Sky Knight wanted to print an image in an Informix 4GL report. Mike Aubury said Aubit4GL can create PDF reports and PRINT IMAGE after LOCATE, and suggested PRINT FILE for PCL codes. Sky Knight concluded PRINT FILE would work only for small files, and that printer macros in overlay mode were probably the best option in Informix 4GL.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues
Of course - in Aubit4GL you can generate PDF reports (same format as a normal report - just more options - so nice and easy to convert!) In that - you can just LOCATE your image, and then : PRINT IMAGE lv_imgvar AS [JPEG|GIF|TIFF|PNG] [SCALED BY scalefactor] If you're running on Linux (or anything else using CUPS) - you can then "lp" your resulting pdf and it just works (dont need to worry of you change printers - because all the hard work of converting to printer codes is done by the printer driver) On Wednesday 29 July 2009 01:29:01 Jonathan Leffler wrote: > On Mon, Jul 27, 2009 at 19:25, loc<c320sky@gmail.com> wrote: > > On May 26, 3:04 pm, loc <c320...@gmail.com> wrote: > >> Is it possible to print an image on an Informix 4GL report? I would > >> like to print a signature on checks. I always output my reports to a > >> file with: > >> > >> "start report report_name to file_name" > >> > >> If 4GL can't directly add an image to the report maybe I can post > >> process the report file and add the image somehow? The check > >> signature would be the last line of the report, which may make it > >> easier to append an image to the end of the report text file. Anyone > >> done this? > > > > I found a solution to print an image on a 4GL report using a HP > > Laserjet macro. [...multi-step solution omitted...] > > Wow - well done! > > Have you looked at automating this? Would a Perl script or something > make it feasible not to have to worry about it all? -- Mike Aubury http://www.aubit.com/ Aubit Computing Ltd is registered in England and Wales, Number: 3112827 Registered Address : Clayton House,59 Piccadilly,Manchester,M1 2AQ
On Jul 29, 1:55 am, Mike Aubury <i...@aubit.com> wrote: > Of course - in Aubit4GL you can generate PDF reports (same format as a normal > report - just more options - so nice and easy to convert!) > > In that - you can just LOCATE your image, and then : > > PRINT IMAGE lv_imgvar AS [JPEG|GIF|TIFF|PNG] [SCALED BY scalefactor] > > If you're running on Linux (or anything else using CUPS) - you can then "lp" > your resulting pdf and it just works (dont need to worry of you change > printers - because all the hard work of converting to printer codes is done by > the printer driver) > I looked at using the LOCATE command in Informix but I think it only stores a variable to a file, but does not read a file into a variable. define lv_str text locate lv_str in file "image.pcl" If that command would put the pcl codes contained in image.pcl into the text variable I could just print that. Anyway using the macros as I described works very nice unless, as you pointed out, your using Aubit, which has a better solution.
You're probably looking for something like : PRINT FILE "filename" On Wednesday 29 July 2009 18:42:15 Sky Knight wrote: > > I looked at using the LOCATE command in Informix but I think it only > stores a variable to a file, but does not read a file into a variable. > > define lv_str text > locate lv_str in file "image.pcl" > > If that command would put the pcl codes contained in image.pcl into > the text variable I could just print that. Anyway using the macros as > I described works very nice unless, as you pointed out, your using > Aubit, which has a better solution. Indeed - and as Aubit4GL is free and can easily be used along side Informix4GL - theres no reason why you can't "mix and match" (each application would need to be done in either Informix4GL or Aubit4GL - but theres no reason why an Informix4GL couldn't RUN an Aubit4GL program and vice-versa :-) -- Mike Aubury http://www.aubit.com/ Aubit Computing Ltd is registered in England and Wales, Number: 3112827 Registered Address : Clayton House,59 Piccadilly,Manchester,M1 2AQ
On Jul 29, 1:52 pm, Mike Aubury <i...@aubit.com> wrote: > You're probably looking for something like : > > PRINT FILE "filename" > Yes, that is what I was looking for, which I think would work depending on how many lines of PCL codes are in the file. Mine has 40 lines so I could use that command at the beginning of the report and push/pop the printer cursor so as not to mess up the rest of the report. I think this wouldn't work if the image file had more lines in it than a page could hold. So using the printer macro in overlay mode is probably the best solution if using Informix 4GL.