Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
nataliemac
New Member.
2152 views

Setting the font angle within a column using WIN$PRINT

Good day,

I am currently using WIN$PRINT to create documents from my ACUCOBOL programs. I need to be able to print portrait text on a landscape page. I know that I can change the font angle to achieve this and have managed to change the angle of the column but for some reason the text isn't printing. Has anybody ever tried this before? I have included the piece of code that sets the font, is there something that I am not doing correctly?

DESTROY COL-FONT-HANDLE(COL-NUM).              
                                                                  
CALL "WIN$PRINTER" USING WINPRINT-SET-STD-FONT,
        WINPRINT-DATA.                         
                                                                        
INITIALIZE WFONT-DATA.                        
SET WFDEVICE-WIN-PRINTER TO TRUE.             
                                              
MOVE COL-FONT-NAME(COL-NUM) TO WFONT-NAME.
MOVE COL-FONT-SIZE(COL-NUM) TO WFONT-SIZE.

MOVE 90 TO WFONT-ANGLE.

IF      COL-FONT-BOLD-YN(COL-NUM) = 'Y'       
        MOVE 1          TO WFONT-BOLD-STATE   
ELSE                                          
        MOVE 0          TO WFONT-BOLD-STATE   
END-IF.                                       
IF      COL-FONT-ITALIC-YN(COL-NUM) = 'Y'     
        MOVE 1          TO WFONT-ITALIC-STATE 
ELSE                                          
        MOVE 0          TO WFONT-ITALIC-STATE 
END-IF.                                      

IF      COL-FONT-UNDERLINE-YN(COL-NUM) = 'Y'        
        MOVE 1          TO WFONT-UNDERLINE-STATE    
ELSE                                                
        MOVE 0          TO WFONT-UNDERLINE-STATE    
END-IF.                                             
                                                    
CALL "W$FONT" USING WFONT-GET-FONT,                 
        COL-FONT-HANDLE(COL-NUM), WFONT-DATA.       
                                                    
MOVE COL-FONT-HANDLE(COL-NUM)   TO WPRTDATA-FONT.   
                                                    
CALL "WIN$PRINTER" USING WINPRINT-SET-FONT,         
        WINPRINT-DATA                               
        GIVING FONT-RETURN-VAL.                      
                                                    
* set the colour                                              
INITIALIZE WPRTDATA-TEXT-COLOR.                     
MOVE COL-FONT-COLOR-RED(COL-NUM)        TO RGB-RED. 
MOVE COL-FONT-COLOR-GREEN(COL-NUM)      TO RGB-GREEN.
MOVE COL-FONT-COLOR-BLUE(COL-NUM)       TO RGB-BLUE.
PERFORM CALC-COLORREF.                              
MOVE COLORREF TO WPRTDATA-TEXT-COLOR.

CALL "WIN$PRINTER" USING      
        WINPRINT-SET-TEXT-COLOR
        WPRTDATA-TEXT-COLOR.  

Any assistance would be greatly appreciated.

Thank you!

Natalie.

0 Likes
3 Replies
Micro Focus Expert
Micro Focus Expert

RE: Setting the font angle within a column using WIN$PRINT

0 Likes
nataliemac
New Member.

RE: Setting the font angle within a column using WIN$PRINT

Hi,

Thank you for your response.

We have managed to successfully print a watermark on the page using FONT-ANGLE. I am still however no able to set the angle in a column to that I am able to specify exactly where on the page I want the text to print. Is there a way to specify this without trying to set it within a column?

Kind Regards,

Natalie.

0 Likes
Micro Focus Expert
Micro Focus Expert

RE: Setting the font angle within a column using WIN$PRINT

If I use Microsoft Word, I cannot set a font to an angle .. I can set Italic to get a slant on a font. Is there an app where you are able to set the font to an agle?

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.