cancel
Showing results for 
Search instead for 
Did you mean: 

How SAP device type SWIN sends a page format?

0 Kudos

Hi all,

I changed page format (from DINA4 to INCH12) for my SmartForm and try it print with SWIN (I2SWIN) device type.

It has printed with cca 11 xx paging (not full 12") so next pages move upper and upper.

So I have printed it to Text printer in Windows and look at Print controls. And I can find nothing about page formating.

Can you help me please? I would lke to send right page formating.

Note 21738 - Device type SAPWIN says that print control "Esc p xx;" - xx=40 is INCH12.

Accepted Solutions (0)

Answers (2)

Answers (2)

Sandra_Rossi
Active Contributor
0 Kudos

Note: you may have a look at [general print steps scheme here|http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=147259953], where you can see that getting data after you have printed to a FILE printer is too late, because SAPWIN format is converted into GDI format.

Sandra_Rossi
Active Contributor
0 Kudos

If you have chosen INCH12 (12 inches in continuous print, i.e. without form feed) for a paper of not exactly 12 inches, that's normal to have a little shift. You will see that DINA4 and INCH12 are different in the way they skip to a new page, by looking at device type page formats, see action "New page" (\f for DINA4, and nothing for INCH12).

You have to create a page format of the exact size (note: INCH12 has height equal to 12*72 points (1 inch = 72 points) = 864 points), and create a format type corresponding to this page format.

If you want to see the SAPWIN code for your printout, activate temporarily the "retain print file" in the debug tab (there is a menu to make it appear) of the output device, you'll get a file in the DIR_DATA SAP directory (AL11 transaction).

Note: SAPWIN language is described in note 21738.

0 Kudos

I have exactly 12" long (continuous) paper.

So if INCH12 is without "form feed", and I use I2SWIN, page must have exact number of lines?

My file printer output seems like this:

begin of first page:

" %SAPWIN% OCb Op1 Os1 PP

m907,1374; FArial; W238; B2 I1 S200X w56; f0,0,0;Text1 m907,1614; FArial; W238; B1 I0 S200X w56;Text2:"

end of first page and begin of second page:

" GB907,13356,10998,13370,0,7,0,0,0,0,1,0,0,0; GB850,13316,11055,13330,0,7,0,0,0,0,1,0,0,0;

OCb Op1 Os1

m850,1374; FArial; W238; B1 I0 S200X w56; f0,0,0;Text3"

At the end of every page I have found print control for "FF" (0C hex).

If I have printed the smartform from customers PC, all fonts and position of labels seem OK, but "form feeding" goes wrong.

Sandra_Rossi
Active Contributor
0 Kudos

I just saw consulting Note 79288 (Form feed does not match continuous paper), it explains that you have to define "printer initialization" action as \ep50 or \ep56 (see SAPWIN language in note 21738).

PS: correction of my previous post about form feed (hex 0C as you said), I have just checked that standard I2SWIN / INCH12 "end of page" action is set to \f, so it corresponds to what you say, and I was wrong.

0 Kudos

Yes, it was first thing I tried.

In "initialization" phase I used "\e%SAPWIN%" and "\ep40;" (German Std Fanfold with 8 1/2" width, 12" length). (In some notes was written SWIN doesnt support ""initialization" phase, so I tried, in second step, use it in "first page" too.)

Form output looks like here:

" %SAPWIN% p40; %SAPWIN% OCb Op1 Os1 PP "

It doesnt work. Printed pages (length) have been same as about A4 length yet .

As you can see, printer driver "SWIN SAPlpd/SAPWIN driver 3.0 " add control " %SAPWIN%" after my "add-on's". Is it good, or are my settings deleted by using of it?

Whar are you thinking about:

" Esc q m; Set page length in m*1/10 millimeters (SAPLPD 4.25 or higher)"

+"Esc O M p|l p = Use physical paper edge

l = Use logical paper edge (printable area) [default

(commands only effective with enable_phys_margins=1 [default)"+

Edited by: Daniel Krbecek on Dec 11, 2009 12:29 PM

Sandra_Rossi
Active Contributor
0 Kudos

You must remove \e%SAPWIN% (%SAPWIN% is automatically added when you use F, G or S access methods).

I've got no idea about Esc q m; and Esc O M p|l p

0 Kudos

If I remove my "SAPWIN" control, it seems like:

" p40; %SAPWIN% OCb Op1 Os1 PP "

Is it right?

Sandra_Rossi
Active Contributor
0 Kudos

Hi Daniel,

I think you were right about using \e%sapwin% (I found it in standard actions delivered by SAP), I didn't know that it was possible. At this point, unfortunately I can't help any more. I hope you'll find a solution, and waiting for your valuable feedback!

sandra