KuKeC
KuKeC

Reputation: 4620

How to print image in output stream?

Is it possible to print some text + image with 4GL? I tried several approaches and nothing works for me. My code is below

DEFINE VARIABLE mMyMemPtr AS MEMPTR NO-UNDO.
FILE-INFO:FILE-NAME = "C:\image.png".
SET-SIZE(mMyMemPtr) = FILE-INFO:FILE-SIZE.
INPUT FROM VALUE(FILE-INFO:FILE-NAME) BINARY NO-MAP NO-CONVERT.
IMPORT mMyMemPtr.
INPUT CLOSE.

OUTPUT STREAM printstream TO PRINTER.
PUT "some text: " AT 1 SKIP.
PUT mMyMemPtr.
OUTPUT CLOSE.

Error  code

Upvotes: 1

Views: 577

Answers (1)

Jensd
Jensd

Reputation: 8011

Yes and no. It's possible to print images with ABL/Progress 4GL but not that way. You will need some other technique. The easiest way is probably to look into some kind of document format that supports printing. For example creating and printing:

Upvotes: 2

Related Questions