PSF/AIX : How do you set up PCL2AFP to use custom PCL fonts

ITEM: RTA000118663



Q:                                                                              
ABSTRACT:     PSF/AIX : How do you set up PCL2AFP to use custom                 
              PCL soft fonts ?                                                  
SEARCH ARG:   pcl2afp font                                                      
TOPIC THREAD: PRINT                                                             
              PSF/AIX                                                           
..                                                                              
My customer wants to use PCL2AFP to transform PCL input for printing            
on a 3160-001 printer.   The PCL input contains custom signature "soft          
fonts" which today are downloaded to the HP printer before submitting           
the PCL job for printing.  Based on comments in APAR IX60526, it is             
obvious that PCL2AFP can be made to correctly handle these soft fonts.          
I know that for PS2AFP, I use the mkfntmap command to create a font             
mapping file. Yet, when I look in the PSF for AIX Print Administration          
manual, I cannot find an equivalent function for PCL2AFP.                      
                                                                                
How do you "configure/setup" PCL soft fonts for use by the PCL2AFP              
transform ?  Can the soft fonts be pre-loaded (pre-defined) or must             
they be included inline with each PCL print job submitted ?                     
                                                                                
Thanks.                                                                         
                                                                                
A:                                                                              
If customer jobs that require PCL fonts not included in the pcl2afp             
transform of PSF for AIX, it is possible to concatenate them with               
the job using the -c flags (see the Print Submission book for an                
example) or by adding the font to the UserInit file.  However, the              
font may need to be modified slightly by wrapping it in some additional         
PCL commands.  If you can provide the following information, I can              
work with development to modify a small number of fonts for you.               
(If it's a large number, we may wish to pursue a services contract.)            
                                                                                
Q:                                                                              
I have done some preliminary testing with files and resources supplied          
by my customer.  If I submit both the resources and file together               
when invoking the pcl2afp command, the pages print as desired.  This            
approach can be used as a "fallback".  For performance reasons, I'd like        
to include (and hopefully RIP) the  resources once and then have them           
available for all subsequent PCL print jobs.  I'd like to test the              
UserInit approach mentioned above.  Is this documented anywhere ? Also,         
where is the UserInit file ?  I could not locate it in /var/psf/pcl2afp         
or /usr/lpp/psf/pcl2afp.  What font "wrapping" is necessary to store            
an PCL font in UserInit ?                                                       
                                                                                
Thanks for your help.                                                          
                                                                                
A:                                                                              
This procedure is not documented because there's not a single                   
procedure that covers all fonts and applications.  The developer has            
been kind enough to do it; he has the tools and understands the issues          
and the datastream, and since it comes up only rarely, it's been easier         
for him to do it than to train me or someone else.  I'll include some           
additional information below to clarify the issues.  Re UserInit, we            
do not include a default empty UserInit, but it can be created as               
you'll see below.                                                               
                                                                                
From the developer:                                                             
                                                                                
   The UserInit file is designed to contain stuff to be loaded                  
   into an interpreter's environment "globally", i.e., to be made              
   available to all subsequent jobs.  It is thus executed only                  
   once, at startup of the interpreter.  Thus if an interpreter                 
   goes down due to a timeout, then its global environment is                   
   not lost.  To contrast with a printer without a hard disk,                   
   global environment is lost on power off.  The UserInit file                  
   is thus like a printer with a hard disk that stores global                   
   information on it.                                                           
                                                                                
   For PostScript, it is simple.  It just contains "stuff" that                 
   is to be global in nature.  For example, fonts, dictionaries,                
   procsets, procedures, etc.  It is easy to create.  Just put                  
   valid PostScript definitions in it.                                          
                                                                                
   PCL is different.  And this difference is because of the                     
   data stream differences.  PCL "stuff" that is useful in                     
   the UserInit file are fonts and macros.  These objects                       
   can be tagged as "permanent" to the interpreter, and this                    
   is the key to the difference between PS and PCL.  Typical                    
   PCL objects, such as fonts, are just fonts.  They do not                     
   contain the necessary PCL commands to make them "permanent".                 
                                                                                
   Concatenating the fonts as-is will not work correctly.  What happens         
   is that the interpreter is collecting the font data, and thinks the          
   fonts are all one font (because the fonts do not have font id                
   delimiters yet) and will overrun a buffer, thus causing the                  
   interpreter to "crash".                                                      
                                                                                
   Therefore, to create a PCL UserInit file requires that the                   
   resource object first be wrapped in additional PCL commands                  
   to make it permanent, then it can be added to UserInit.                     
                                                                                
   The command needed is similar to:                                            
                                                                                
     cat some_pcl_to_make_perm font.pcl addl_pcl_to_make_perm >>UserInit        
                                                                                
   So, you can see that a plain "cat * >>UserInit" won't work for PCL.          
                                                                                
   The problem is that some applications make assumptions about                 
   just how a resource was made "permanent", and thus a general                 
   solution is not always possible, i.e., prior knowledge is necessary          
   about how a resource is used before it can be made "permanent".              
                                                                                
   So far, I have done this step for about 2 or 3 customers.  In                
   these cases, they had a font they wanted to be permanent                     
   and available to subsequent jobs.  It was about 5 minutes for               
   me to do this for them, i.e., given the font, and a sample PCL               
   file of how it was used, it was then simple to create the                    
   necessary PCL wrappers for the font to be in the UserInit file.              
                                                                                
   So you can see, documenting this would be difficult, especially              
   since probably no one has the convenient tools to do this.                   
                                                                                
The developer can create the UserInit file and send it in zip format.           
You would then unzip the file into the work directory that the PCL              
transform uses (you would first back up any prior UserInit file if of           
any value, then concatenate it to what the developer sends).  Then to           
get the PCL interpreter to recognize the UserInit file, you must                
restart the transform.                                                          
                                                                                
I hope this helps.                                                             
                                                                                
Q:                                                                              
I will accept your offer for assistance.  I have sent two files to              
your VM id.                                                                     
                                                                                
FILE ZBIN - Binary compressed AIX file containing PCL print datastream          
RESOURCE ZBIN - Binary compressed AIX file containing PCL resources             
                                                                                
This is NOT an urgent request.  My customer will likely be implementing         
PSF for AIX with 2 x 3160 printers sometime in late October.                    
                                                                                
Thanks.                                                                         
                                                                                
A:                                                                              
The developer received the files and processed them.  I will send a            
packed file back to you. Here are the developer's comments:                     
                                                                                
  This customer had already wrapped the fonts in the necessary PCL              
  commands. However, the end of the file had garbage in it. I deleted           
  the garbage and moved the file into the UserInit file and it worked           
  fine.                                                                         
                                                                                
  In general, if a customer already has a file that they download to a          
  PCL printer to make fonts resident on the printer before sending              
  printable PCL, then that file can be appended to the UserInit file,           
  and it will work fine, i.e., they already know enough PCL to know how         
  to wrap fonts to make them resident in a real PCL printer.                    
                                                                                
Let me know if there are any problems.                                          
                                                                               
Q:                                                                              
Thank you for evaluating my customer's files and modifying them for             
inclusion in the UserInit file.  I'm ready to test, and need instruction        
on how to include UserInit file in PCL2AFP config and startup.                  
                                                                                
1. Where should the UserInit file reside ? (I'm guessing it should be           
   in /usr/lpp/psf/pclafp.)                                                     
                                                                                
2. What, if any, changes do I need to make to the pcl2afp.cfg file in           
   order to trigger use of the UserInit file ?                                  
                                                                                
3. Any other suggestions or gotchas ?                                           
                                                                                
Thanks.                                                                         
                                                                               
A:                                                                              
Libraried item RTA000087393 has some information on this.  The net is           
that you place the UserInit file in the work directory you've specified         
in the pcl2afpd.cfg file.  By default, that work directory is                   
/var/psf/pcl2afp.  UserInit should have minimum permissions of 644.             
                                                                                
To get the PCL interpreter to recognize the new UserInit file, you must         
stop and restart the transform if it is currently running.  At the AIX          
command line, issue the following command:                                      
                                                                                
   ps -e | grep ppxpcli                                                         
                                                                                
If the ppxpcli process is running, kill it.  If it is not running, then         
the next time the pcl2afpd starts ppxpcli, the new UserInit file will be        
read automatically.                                                            
                                                                                
Good luck.  Let me know if you have additional questions.                       
                                                                                
S e a r c h - k e y w o r d s:                                                  
psf/6000 psf/aix pcl pcl2afp pcl2afpd transform userinit add font               
additional soft custom fonts aix psf infoprint                                  
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                               


WWQA: ITEM: RTA000118663 ITEM: RTA000118663
Dated: 01/1999 Category: XPSF6000
This HTML file was generated 99/06/24~12:43:35
Comments or suggestions? Contact us