Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
A poster asked how to print customer logos on forms using Informix-4GL 7.2. Another poster described converting the logo to PCL and printing it via generated PRINT statements. Art Kagel recommended a C or ESQL-C function callable from 4GL, noting report output limits. The other poster later suggested PRINT FILE in the report body, not headers, which gives error -4310.
Ihr Name — — source: Informix-list mailing list archive (1991-1998)
I want to print to forms.
Every customer has a special logo and this logo must also be print to
the form.
How can I save and print a graphic with Informix-4GL 7.2 (Online)?
I've done it, but it was complicated, and it is printer dependent.
I hope there's an easier way, but what I did was load the jpeg with
an image-viewer (Irfan-view), save it as a pcx file, load that into
WordPerfect, change my printer port options to print to file, printed
the logo so the Logo was written in pcl (for my HP laserjet), wrote
a C prog to strip off the chars in the file before and after the pcl
graphics start and stop command, wrote a C prog to print the part of
the file that are printable characters as the printable string
surrounded by quotes, and print the non-printable characters as:
ASCII(x), where x is the decimal of the character. Had it add line
feeds before each escape char (ASCII(27)) so the lines were manageable.
Added "PRINT " before each line and a semi-colon at each end save the
last. Added a positioning command and it was ready to go. (In the
WordPerfect doc, I changed the graphics quality to high).
Later I changed the program to load the strings into an array and
print the array. But I had to treat ASCII(0) in the array special,
because ASCII(0) only prints ASCII(0), if you load ASCII(0) into a
string, Informix treats it as a space (RTFM).
In article <3A4C51AF.856AE782@t-online.de>,
Ihr Name <IhrName@t-online.de> wrote:
> I want to print to forms.
> Every customer has a special logo and this logo must also be print to
> the form.
> How can I save and print a graphic with Informix-4GL 7.2 (Online)?
>
Sent via Deja.com
http://www.deja.com/
↪ replying to Ihr Name
Art S. Kagel — — source: Informix-list mailing list archive (1991-1998)
The best way is to create a 'C' function to format the graphic for printing
and if you store the graphic in a BLOB column instead of a flat file you may
find it best to make that an ESQL-C function to retrieve AND print the logo.
Just make the function 4GL callable (not difficult) and call it from the
4GL program. Note that you may find it difficult to integrate the logo and
form text if you are using a REPORT module as the report gathers the output
in a temp table and dumps it to the printer when the report is FINISHed. So
while the mainline of the report may be best in 4GL, if the logo is not to
appear at the top you may want to handle the output in 'C' completely.
Art S. Kagel
Ihr Name wrote:
>
> I want to print to forms.
> Every customer has a special logo and this logo must also be print to
> the form.
> How can I save and print a graphic with Informix-4GL 7.2 (Online)?
Once you get the logo coded in a way your printer can understand,
save the pcl code (or whatever) to disk, and use the "print file"
command in the Report. (but not in the header - "print file" illegal
there):
report ...
format
before group of ...
skip to top of page
print ascii(27), "&f0S", # remember current location
ascii(27), "*p675x-35Y"; # move to logo location
print file "W_EXT_BB_pcx.pcl" # print logo
print ascii(27), "&f1S"; # return to save location
but not:
page header
print file "wash_logo.pcl";
|
| Files cannot be printed within report headers
| or trailers.
| See error number -4310.
> Ihr Name wrote:
> >
> > I want to print to forms.
> > Every customer has a special logo and this logo must also be print
to
> > the form.
> > How can I save and print a graphic with Informix-4GL 7.2 (Online)?
>
Sent via Deja.com
http://www.deja.com/
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.