Sapwin pageformat

Hi All,
I have created a format type in SPAD. I want to attach it to the device type. Some code is written in PRINT INITIALIZATION.
SAPWIN data stream
\e%SAPWIN%
Landscape-Mode
\ePL
Schrift 5 Punkt einstellen.
\eS100X
#8,5 lpi
\e50.5;
output complete line with one call (do not use for proportional fonts)
\eOa1
How can I mention the lines over here? I am not able to understand this code. When I am trying to attach this format type to device type the system is not asking me the transport request. So how can I transport these two to test client?
Please help.

its not showing any request for only page format. i tried with many page format.
all format types and device types and page format (zpage) are getting transported into quality except the
page where format type is assigned to device type sapwin as below.
Device type     SAPWIN                 Format           ZEMP
Printer initialization
Reset after exit
Cover page
First Page
Start of even page
Start of odd page
Start of page
End of first page
End of even page
End of odd page
End of page
Start of line on an even page
Start of line on an odd page
Start of line
End of line on an even page
End of line on odd page
End of line
Edited by: Banu hameed on Apr 15, 2010 10:09 AM

Similar Messages

  • How to use different pageFormats while printing in the same book object.

    Hi All,
    I m able to print Multiple pages, but the problem is when i want print multple pages with different pageformates I mean One pages having 4X2" size and another one is 5X5", while print second page objects not appears properly
    Pls see the below code to get the problem.
    any works around this will be appreciated.
    import java.awt.BasicStroke;
    import java.awt.Color;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.geom.Rectangle2D;
    import java.awt.print.Book;
    import java.awt.print.PageFormat;
    import java.awt.print.Paper;
    import java.awt.print.Printable;
    import java.awt.print.PrinterJob;
    public class MultiplePageFormatTest
    public static void main(String[] args)
      MultiplePageFormatTest example3 = new MultiplePageFormatTest();
      System.exit(0);
    private final static int POINTS_PER_INCH = 72;
    public MultiplePageFormatTest()
      PrinterJob printJob = PrinterJob.getPrinterJob();
      Book book = new Book();
      PageFormat documentPageFormat = new PageFormat();
      PageFormat documentPageFormat1 = new PageFormat();
      Paper paper = new Paper();
      Paper paper1 = new Paper();
      paper.setSize(4.5 * POINTS_PER_INCH, 2.5 * POINTS_PER_INCH);
      paper.setImageableArea(.25 * POINTS_PER_INCH, .25 * POINTS_PER_INCH,
       4 * POINTS_PER_INCH, 2 * POINTS_PER_INCH);
      documentPageFormat.setPaper(paper);
      paper1.setSize(5.5 * POINTS_PER_INCH, 5.5 * POINTS_PER_INCH);
      paper1.setImageableArea(.25 * POINTS_PER_INCH, .25 * POINTS_PER_INCH,
       5 * POINTS_PER_INCH, 5 * POINTS_PER_INCH);
      documentPageFormat1.setPaper(paper1);
      book.append(new Document(), documentPageFormat);
      book.append(new Document(), documentPageFormat1);
      printJob.setPageable(book);
      if (printJob.printDialog())
       try
        printJob.print();
       catch (Exception PrintException)
        PrintException.printStackTrace();
    private class Document implements Printable
      public int print(Graphics g, PageFormat pageFormat, int page)
       Graphics2D g2d = (Graphics2D) g;
       g2d.translate(pageFormat.getImageableX(), pageFormat
        .getImageableY());
       g2d.setPaint(Color.black);
       g2d.setStroke(new BasicStroke(
        2));
       Rectangle2D.Double border = new Rectangle2D.Double(
        0, 0, pageFormat.getImageableWidth(), pageFormat
         .getImageableHeight());
       g2d.draw(border);
       return (PAGE_EXISTS);
    }

    Hi,
    Till now this question is not answered.........
    Any Answer around this deeply apprciated.
    Edited by: DoraiRaj on Sep 29, 2009 3:55 AM

  • Printing: print prepared binary stream with SAPWIN

    Hi .
    We have a lot of different documents(MS Word, MS Excel, TIFF, PDF etc.) stored in DMS.
    Now we need to print them from SAP applications using SAP printers.
    For that we have an external conversion server, that could convert files to any print stream data (PCL, PLC2, PCL5, Postscript, even simple PDF).
    If I use printer with simple device type (e.g. Sapscript driver is HP LaserJet PCL4/PCL5) , I just convert necessary docs into the PCL output, create programmatically a new Spool request with format G_RAW and BIN content and add PCL output to it. And this way works good. But not with SAPWIN device type.
    Does anybody know, if it's possible to print prepared binary stream (PCL, Postscript or other format) using printer with SAPWIN device type? And if yes, how should I create Spool request?
    Thanks in advance.

    Sorry for this up.
    But we still have the problem.
    Any ideas?

  • Printing trhough SAPWIN with ZEBRA printer

    Hi Gurus
    I need your help please since I already spent a lot of time to find a solution and not found any.
    I use Smartform to produce labels on ZEBRA printer (output Device Z201, Device Type ZLZEB2:Zebra label printer 203dpi). All fields on my form use HELVE as font. I print my form through Z201 and it works fine.
    My requirement now is to print the form to ZEBRA printer locally using SAPWIN (Rel 4.x/SAPlpd 4.09 + ONL:Y) as device type. To do this I created a new output device LCLB, copied the device type SAPWIN into ZWIN and attached to output device LCLB
    The problem is when I print the form using LCLB, all my fields with HELV font are printed with COURRIER font.
    I went in transaction SE73 and display printer fonts associated with ZWIN and it seems that all fonts (COURCYR, COURIER, OUR_I7, HELVCYR, HELVE, HELV_I7, OCRA, OCRB, TIMECYR, TIMES, TIME_I7) are defined there. Do I miss something? Do I have to redefine the print control in ZWIN with control characters corresponding with ZEBRA printer?
    Any feedback would be appreciated
    Thank you

    Hi Valter,
    did you figured it out why do you had a problem with that printer?
    tks
    best regards,
    Pedro

  • How Can I Set Page Length in SAPWIN?

    Hi Everybody!.
    I need your help to set page length in SAPWIN device type!!!...
    Thanks in advance!...

    Hi,
    Please check
    >Tools> CCMS>Spool>Spool Administration-->select your output device
    -->switch to the Output Attributes tab page

  • Output device is not type sapwin

    Hello SAP Gurus ,
    i am trying to print the dunning letter and i am getting the error "output device XYZ is not type SAPWIN".
    I did look up in the forum for the appropriate answer but could not find one .
    Has anyone else gone through the same error .
    any suggestions and solutions please
    thanks in advance ,
    Sumit

    This is message TD429 (note: providing the message number (we usually can't know) is useful to search forum and sap notes).
    Is that custom code which prints the dunning letter? Check that it doesn't force the device type.
    This message is also triggered when you try to reprint a spool to an output device whose device type is different from the original device type.
    Otherwise report this error to SAP support.
    For more information, see Note 528802 - xxx output device does not have a yyy device type.

  • Serializing PageFormat

    I would like my application to remember the page format selected in the PageDialog and use that setting as the default next time the application is executed.
    Sounds easy...but PageFormat is not serializable.
    Ok I could extract page size and image offset and size to make a new PageFormat next time, but that doesn't record the page size name (such as A4, Letter etc).
    I doubt if making a serializable subclass is an answer either because most of the printing system is really native code anyway.
    Every time I run the program I have to change from letter to A4 and set the margins how I want them which can be very frustrating. I am sure there must be lots of people who have had the same problems.
    Many thanks in advance,
    Howard Amos

    Looking at the source code, I see the following state:
    PageFormat:
    int orientation
    Paper paper
    Paper:
    double height
    double width
    Rectangle2D imageableArea
    And I don't think the returned objects, like from PrinterJob's pageDialog involve any subclasses.
    So, while it's dirty and may need to be rewritten if features are added, I think you can just write the listed data and read it back in. What about A4 etc? My guess is that the paper type is inferred from paper width and height.
    --Nax                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Printing a new format page in Matrix Printer with the SAPWIN Device Type...

    Hi,
    The requierements is to print Identification Material Labels with an Epson DFX-8500 printer. The label font is TIMES 34, therefore the Printer Device Type is SAPWIN. The real throuble is that label size (Format Page) doesn't exist.
    I created a New Format Page but when a print the Materlal Label (SAPSCRIPT), the SPAD configuration isn't recognized. I need an Height of 432 PT (Like INCH6 because the paper is continuous form) isn't recognized.
    Could somebody help me???
    Alexis Sánchez N.
    SAP ABAP Development Consultant
    << removed >>
    Valencia, Venezuela
    Edited by: Rob Burbank on May 25, 2010 3:56 PM

    Hi all,
    I solved myself... This is the way...
    I have an Epson Matrix Printer (Epson DFX-8500)
    In SAP, I created the Epson DFX-8500 Printer with the device type SAPWIN. This printer have some attributes in windows operational system (Windows XP). One of this attributes is the default paper size (Letter).
    To change this, you have to do what the SAP Note 163136 (Creating new paper size for Windows NT-2000-XP-2003) says:
    Solution
    Note: This note is based on Note Q157172 from the Microsoft Knowledge Base.
    You create a new paper size this way in Windows NT:
    1. Choose 'Control Panel' and double-click 'Printer'.
    2. Select 'Server Properties' in the 'File' menu.
    3. Select the 'Create A New Form' check box on the 'Forms' tab page.
    4. Enter the settings for the new paper size.
    NOTE : If you set up your own customized paper size, the margins
    cannot exceed the settings of the installed printer. The print area
    must correspond to the margin settings of the printer driver used.
    5. Save the paper size.
    Proceed as follows to use the new paper size as the default format:
    1. Select 'Printer' in the 'Control Panel'.
    2. Click the right mouse button to select the required printer and select
    'Document defaults'.
    3. Select the new paper size in the 'Paper Size' selection box (on the
    'Advanced' tab page).
    4. Click OK.
    5. Again with the right mouse button click the required printer and
    select 'Attributes'.
    6. Open the 'Device Settings' tab page and select the paper tray from
    which you should print. Then select the new paper size.
    NOTE: New paper sizes are stored on the computer on which they were
    created. If you create a new paper size for a shared printer, you must
    create the new paper size on the printer's print server.
    NOTE : In Windows XP, there is an error in this procedure that can be
    corrected with Note Q838298 from the Microsoft Knowledge Base.
    I hope it helps you...
    Alexis Sánchez N.
    SAP ABAP Development Consultant
    Valencia, Venezuela

  • Any way to convert a PrintRequestAttributeSet to a PageFormat?

    I have a "PrinterHelper" that pops up dialogs and tries it's best to make printing easy among many different types of windows.
    The problem I'm having is that I have a Print Preview dialog, which I need a PageFormat so that I can render the "preview" correctly.
    However, I'm using attributesets to track the changes in the page setup and print dialog (so it remembers it's last settings).
    Now, how in the world do I get a PageFormat from an attribute set ? Is there anyway to do this?

    No.

  • Problem with PageFormat when printing

    Hi.
    I use the following class to print large JPanels, but I have a problem with the PageFormat. For example:
    I want to print a JPanel called labelPanel, so I write "PrintUtilities.printComponent(labelPanel);". It will now print this Panel on multible Pages, so I can put them together to see the whole Panel. This works fine, BUT I can't change the PageFormat. When the printDialog pops up I can choose a printer (this works), but if I change the page format (for example from "letter" to a bigger size) the PageFormat object stays the same as always, some kind of defaultFormat I think.
    pf.getImageableWidth() always has the same value and I dunno why that doesn't work. Everything works, except changing the format of the page...
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.print.PageFormat;
    import java.awt.print.Printable;
    import java.awt.print.PrinterException;
    import java.awt.print.PrinterJob;
    import javax.swing.RepaintManager;
    public class PrintUtilities implements Printable {
         private Component componentToBePrinted;
         public static void printComponent(Component _c) {
              new PrintUtilities(_c).print();
         public PrintUtilities(Component _componentToBePrinted) {
              componentToBePrinted = _componentToBePrinted;
         public void print() {
              PrinterJob printJob = PrinterJob.getPrinterJob();
              printJob.setPrintable(this);
              if (printJob.printDialog())
                   try {
                        printJob.print();
                   catch(PrinterException pe)
                        System.out.println("Error printing: " + pe);
         public int print(Graphics g, PageFormat pf, int pageIndex) {
              int response = NO_SUCH_PAGE;
              Graphics2D g2 = (Graphics2D) g;
              disableDoubleBuffering(componentToBePrinted);
              Dimension d = componentToBePrinted.getSize();
              double panelWidth = d.width;
              double panelHeight = d.height;
              double pageHeight = pf.getImageableHeight();
              double pageWidth = pf.getImageableWidth();
              int linePages = (int)Math.ceil(panelWidth / pageWidth);
              int rowPages = (int)Math.ceil(panelHeight / pageHeight);
              int totalNumPages = linePages * rowPages; 
              if (pageIndex >= totalNumPages) {
                   response = NO_SUCH_PAGE;
              } else {
                   g2.translate(pf.getImageableX(), pf.getImageableY());
                   g2.translate(-(pageIndex % linePages) * pageWidth, -((pageIndex / linePages) % rowPages) * pageHeight);
                   componentToBePrinted.paint(g2);
                   enableDoubleBuffering(componentToBePrinted);
                   response = Printable.PAGE_EXISTS;
              return response;
         public static void disableDoubleBuffering(Component c) {
              RepaintManager currentManager = RepaintManager.currentManager(c);
              currentManager.setDoubleBufferingEnabled(false);
         public static void enableDoubleBuffering(Component c) {
              RepaintManager currentManager = RepaintManager.currentManager(c);
              currentManager.setDoubleBufferingEnabled(true);
    }

    Does no one know a solution? Oo

  • Device Type SAPWIN giving problem

    Dear Colleagues,
                             I need to print a cheque from different printers as they are in diffrent locations.For that i copied the device type SAPWIN Driver 3.0 to ZSAPWIN in SPAD as this is the generic driver for all types of printer.
    Now my problem is that as i have the customised size of the cheque like 23 CM X 95 MM.It means that i need the height of the cheque of around 21 Lines Aprrox.
    For that i need to code in the hexadecimal format in Printer Initialization in \e%SAPWIN% stream.
    For that i need a code to set the page size/height so that the printer will take the page of that height and not pull the entire page and it should follow the SAPWIN Data protocol.
    Thanks

    Hi Siddharth,
    Maybe what you can do is create a new page format like 'ZCHECK' whith the size as '23 CM X 95 MM'.
    Assign this format in smartform or script you are creating.
    After this you create a format type 'ZCHECK' in SPAD.
    And then attach this format type 'ZCHECK' to locl printer i.e. ZSAPWIN.
    Make sure that the page format and the format type are of same name.
    It will start working if you follow this.
    Hope this helps.I tried this for me and it worked.
    Sushil

  • Check(Script) - Pageformat

    Hi friends,
    I need the pageformat to assign as exactly as to my Check script.Here,Im using only the check window as needed to print the check details same to my client bank cheque.So, as u aware, the height of the check size will be upto approx 8cm and my client are using the dot matrix serial print cheques(continuous one as rolling format).
    Just reply me the exact pageformat.
    ****I've tested with available std INCH4/4C/2 and scheck formats but got no results.
    Pls advise.
    thanks & regards
    sankar.

    Hi,
    Solution for this problem will solve by your client, ask cleary the what the pageformat they are using. and by trail and error basis set the window heights, and Format the line, Paragrah, characer format.
    Bye

  • Howto get PageFormat when printing with Pageables?

    Hello!
    I am currently converting my old printing-code which is enterly based on PrinterJob.setPrintable(my-own-printable).
    This way I get the page-format the user has choosen via the print(Graphics g, PageFormat fmt) method for every page - but how can I do this for printing via pageable - where every page can have its own PageFormat?
    So is there a way to get the PageFormat the user chose (its possible to change some parameters of PageFormat like Size in the Print-Dialog) withought invoking a seperate PageFormat-Dialog?
    Thanks in advance, lg Cemens

    to clearify my question:
    Is there any possibility to get the PageFormat-Attributes the user can change via the Print-Dialog withought invoking printing or open the pageDialog?
    I need to know the exact pageformat to calculate how many sites have to be printed and to know the offsets etc. This needs to be done before printing is actually started.
    I hope I did not confuse you too much*g*
    Please help, thanks in advance, lg Clemens

  • Tray Determination with SAPWIN/SWIN and SAPSprint

    Hi everyone,
    Currently on our unix based printing solution we use device type specific formats to force output to a specific tray.
    We define one device type per tray (eg HPLJ5SI is the base driver copied to ZHPLJ5T1, ZHPLJ5T2, T3 ..etc..)  and for every format associated to the device driver we add an escape sequence to the start-of-page action.
    Heres how we do it:
    SPAD -> "Full Administration" -> "Device Types Tab" -> "Device Types" -> Select "ZHPLJ5T2" device type -> Click "Formats" -> Click "Dina4" (or any other format) -> switch to "change mode" -> double click on "Start of page" action.
    As this is our tray 2 device driver we would set:
    Feed paper from Tray 2
    \e&l1H
    However I've been playing with SAPWIN and SAPSprint, and for the life of me can not pass these escape sequences to the various printers.  When I try and use the escape sequence above the "l1H" portion is actually printed on the output.
    Is there a way I can pass the above escape sequence codes to the printer without SAPWIN/SAPsprint trying to do something overally smart with it?
    Edited by: Shaun on Aug 10, 2010 10:58 AM

    After further testing, Im convinced that the SAPWIN form specific settings of "\eT2" or "\eT3" are ok.
    I have set the SAPsprint log level to 9, and can clearly see that its setting the appropriate tray:
    Th 05064: (11.08.2010 11:34:19) Calling set_tray
    Th 05064: (11.08.2010 11:34:19) set_tray: pdm->dmFields = 780ff43
    Th 05064: (11.08.2010 11:34:19) ResetDCW: pdm->dmFields = 780ff43
    Th 05064: (11.08.2010 11:34:19) ResetDCW: pdm->dmDefaultSource = 2       <---- tray 2
    Th 05064: (11.08.2010 11:40:36) Calling set_tray
    Th 05064: (11.08.2010 11:40:36) set_tray: pdm->dmFields = 780ff43
    Th 05064: (11.08.2010 11:40:36) ResetDCW: pdm->dmFields = 780ff43
    Th 05064: (11.08.2010 11:40:36) ResetDCW: pdm->dmDefaultSource = 3       <---- tray 3
    So .. why is the printer not using these trays?
    I have tested printing using notepad directly to a specific tray, by selecting the tray via the printing preferences and its works fine.  I just cant get SAPsprint to tell the printer the appropriate tray.
    NB:  Yes, I am using the latest HP Color LaserJet 4730mfp PCL 5c (and PCL 6) printer driver.
    Help!
    Cheers
    Shaun

  • SAPLPD/SAPWIN driver 3.0 (e182 toshiba) bar code printing

    Hello,
    We are using driver(SAPLPD/SAPWIN driver 3.0) for our toshiba printer e450 and it is printing bar code also.
    Now we have got 4 new toshiba printers e182, and I am using same driver (SAPLPD/SAPWIN driver 3.0) but it compress the size of the overall printing to 25% on A4 page but keeping barcode size and fonts size same as normal.
    Is there anyway to fix this issue,
    I did use the printer driver also but that does not prints the barcode I have tried all option in 'Host spool access method'
    Please suggest !!
    regards,
    JPS

    ===Printer works fine but does not print bar code.
    Print a normal text from SAP OS system (lp ... > ..., or commands according to your OS). If it prints at 25%, then the issue is from the printer configuration (not from SAP printer configuration).
    Note: don't use F access method, use G! (F is obsolete)
    ==But when I use use driver (SAPLPD/SAPWIN driver 3.0) it prints bar code but compress the total print window to 25% and keeps font size and bar code size as normal (which results in overlapping).
    ===We are on 4.7 enterprise version, so I can't find 'G' method.
    regards,
    JPS

Maybe you are looking for