Operating System - HP-UX
1828225 Members
2467 Online
109975 Solutions
New Discussion

Image problem using UnForm

 
SOLVED
Go to solution
Doug Dell
Advisor

Image problem using UnForm

Hello everyone,

I am using a product called UnForm as suggested by Clay to print enhanced documents from unix. It works very well except that color logos print but then a black band appears from the edge of the image to the right side of the page. Does anyone know what I am doing wrong? Clay, are you out there?

Thank you, Doug
7 REPLIES 7
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Image problem using UnForm

Hi Doug:

I'll answer your last question first. Yes, I'm here. The fix for your other problem is easy.

1) Make sure that all your COLOR images are in RTL (Raster Transfer Language) and that your Black & White images are in PCL format. You can convert the images from one format to another using a tool called 'ImageAlchemy' available from Handmade Software. http://www.handmadesw.com. You can get this in a UNIX version or a PC version. You can also go to http://www.unform.com and they offer free image conversion using ImageAlchemy. If you do much of this stuff, you need to go ahead and buy it. This does mean that you will need 2 versions for each image (e.g. myimage.PCL and myimage.RTL); your Unform rules files should contain a prejob section which reads command line arguments of environment variables and then figures out which suffix to apply for each call to 'image'.

2) Add the -gw argument to the UnForm command. Your specific error is actually documented in the User Guide. The -gw option does no harm on B&W jobs and will fix your color jobs.

Regards, Clay

If it ain't broke, I can fix that.
Doug Dell
Advisor

Re: Image problem using UnForm

Wow Clay! Perfect answer. Thank you very much. I have been trying to fix this for hours.

Thanks again, Doug
A. Clay Stephenson
Acclaimed Contributor

Re: Image problem using UnForm

My pleasure, Doug. I trust you are learning that very tedious version of BASIC that comes bundled with UnForm. There have been many times when I know they need me to help write a parser for them.

Regards, Clay
If it ain't broke, I can fix that.
Doug Dell
Advisor

Re: Image problem using UnForm

Hi Clay,

Yes I am getting better at it and I know what you mean.

Thanks again, Doug
Doug Dell
Advisor

Re: Image problem using UnForm

Hello everyone,

As Clay suggested above I am trying to use an environment variable to determine if I need a color image file or a black and white image file. I keep getting syntax errors when I try to use the STBL function to read Unform's environment.

This is my current syntax:

temp$ = stbl("COLOR",err=9900)


That should work if COLOR is defined in the enviroment or jump to 9900 otherwise. This is just like the example in the manual but it gives a syntax error.

Thanks, Doug
A. Clay Stephenson
Acclaimed Contributor

Re: Image problem using UnForm

Hi Doug:

I think I mentioned this in one of my earlier posts but regardless of what the manual states
one cannot use a number label (e.g. err=9900) but must use instead a label which begins with an alpha character (e.g. err=jumpout2). I assume when using native PRO/5 BASIC, the numeric labels work fine but when using the version bundled with UnForm, you must use a alphanumeric label instead.

I typically set two variables based upon the environment variables ISCOLOR and ISFAX. The lp interface file sets these. They expect a value of 0 or 1.

Use them something like this:

load "colorfax.i"
# the actual code which sets iscolor% and
# isfax%; note colorfax.i is itself a prejob
# module. Multiple prejob modules are allowed
# and are assembled into 1 section at run-time.


prejob {
# assign a .rtl file to color image files
# and a .pcl file to B&W image files
if (iscolor%) then logo2$ = "Atom4.rtl" else logo2$ = "Atom4.pcl fi
}

# then to print a logo at col 10, row 20
prepage {
image 10,20,logo2$
}

I have attached colorfax.i. Note that nothing may follow a '\' at the end of a line.

Regards, Clay
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: Image problem using UnForm

Hi again Doug:

I noticed when I posted this that this dump HTML ate my linefeeds.

It should read
if (iscolor%) BACKSLASH LF
then BACKSLASK LF
logo2$ = "Atom4.rtl" BACKSLASH LF
else BACKSLASH LF
logo2$ = "Atom4.pcl" BACKSLASH LF
fi LF

You can also use the argc function to get command like arguments

myvar$ = argv(argc - 1,err=jumpout3)

By the way, one typically gets faster responses by starting anew thread especially if there is already a 'Magic Hat' associated with an existing thread.

Regards, Clay
If it ain't broke, I can fix that.