Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Vertical Printing in SAP Script,

former_member303185
Participant
0 Kudos

Dear Friends,

I have one requirement in SAP Script.

I need to print Fixed Text in SAPScript but Vertical .

Could anybody help me on this issue.

Regrads

Vijay

5 REPLIES 5

Former Member
0 Kudos

hI

PCL5 commands are specific to HP printers. So you need to find out the exact printer control language for your Datamax printer becoz even if you follow exactly the same as the steps below, you may not be able to get your desired output, becoz your printer may not understand PCL5 commmands.

Note: The steps illustrated below are what I did for the HP printer that I used. Caution: If you try to use it on other printers, be prepared for cases like infinite loop- the printer may keep on churning out pages of unreadable characters. Also,you won't be able to see the effect in Print Preview because print commands will only be effected during the actual printing.

I have used the PCL5 commands from this document: http://h20000.www2.hp.com/bc/docs/support/SupportManual/bpl13210/bpl13210.pdf (refer to P79)

1/ Go to T-code: SPAD > Full administration > Device Type tab > Display Print controls

2/ Change to Edit mode > Click on Create icon > create a Print Control say ZR090, add the Comment > Check 'Use in SAPscript Drivers', 'Use by SAP' > Save it

3/ Go to T-code: SPAD > Full administration > Device Type tab > Choose your Device Type: say HPLJ4 (it is recommended that you copy the Standard Device Type to a new Device Type ZHPLJ4 so that future upgrades will not affect your Device Type.) > Display. (Do select the Device Type of your printer, since I am using HP 4000 series, I chose HPLJ4)

4/ Change to Edit Mode > Print Control tab > Click the Standard Print Controls button on the Application toolbar > Put cursor on the newly created Print Control name in Step 1 and hit the Choose icon on the Application toolbar. The name should appear right at the bottom of the Print Control list. For that Print Control name, select radiobutton for 'Direct', and 'Converted' and the control character sequence is: \e&a90P (if you need a 90 degrees rotation), \e&a0P (for 0 degree), \e&a180P (for 180 degrees), and \e&a270P (for 270 degrees) > Save it. (These are the PCL5 commands specific to HP prnters)

5/ Note: You need to create another Print Control for a 0 degrees rotation to switch back to the normal printing orientation after printing your rotated text. So repeat Step 2 and Step 4 for a 0 degrees rotation

6/ In your smartform, Create a Command before the Text you want to rotate (Right Click on the Node > Create > Flow Logic > Command > Under Generate Attributes tab > Output Options > Include Printer Control > click the Search Help and find the Print Control ZR090 which will rotate everything after this Command to 90 degrees.

7/ After rotating the part of text, if you want to rotate it back to the normal printing direction, insert another Command as in Step 6, but choose the Print Control for the 0 degrees.

8/ Print your smartform to see if that is your desired output.

Note: from my trial-and-errors, exploration and testing, I feel in my opinion, it might not really be worth the while to work on this. Because it needs alot of trials-and-errors and print commands are very specific to the printers (so if client changes the printer, your smartform may be rendered useless unless it uses the same Printer Control Language). Further, I have another problem with this. Even if you manage to rotate the text successfully, the position of the text may not be want you want (becoz of what the command tries to do) . Then you have to take into account the position in the designing of the form.

So here is what I suggest, if you really want to use Printer Controls, search the internet for equivalent Printer Control Language for your Datamax printer (Note that even if you find, the way to use may be different from the above Steps. For eg. for Zebra Printers, the way to rotate text is different as shown in OSS Note 750772).

Alternatives:

1/ Or you could create a bitmap picture with the rotated text, like wat many have suggested

2/ Find a font type that is able to change the words into a vertical orientation (there are upside-down fonts for a 180 degrees rotation, so you might want to do a search for a font that meets your requirement) and then upload to SAP.

3/ The last one which might be more viable is to use Adobe Interactive Forms. A colleague told me that one is able to change orientation of text in it (I have not tried it before) but you can do some exploration b4 commiting to using it. You don't have to output to PDF to use it. Normal printing is also possible. The T-Code for this is: SFP (type 'S*' for SAP examples, do an exploration on Layout tab, maybe it can provide a new alternative).

Former Member
0 Kudos

Hi Vijay,

Refer these links:

<u>http://www.sapfans.com/forums/viewtopic.php?t=10402&highlight=vertical</u>

<u>http://www.sapfans.com/forums/viewtopic.php?t=9972</u>

Thanks

Vasudha

former_member303185
Participant
0 Kudos

resolved

0 Kudos

hi Vijay,

I m also facing the same vertical printing problem for cheque. i have did all the setting which is given here in solution, but also i m not getting the vertical print. is there any extra configuration is required at server level or OS level? i m using the the HP 1040 laser printer. plz help me in solving the same problem...

0 Kudos

can you tell me how have you resolved?

Thenk's

Dario