Default page format to A4

Hi,
I want to invoke the Pagesetup dialogbox with default A4 paper.Furher, is there any method that will help me retrieve the left,top,right and bottom margins that a user has selected from he page setup dialog box....
Plaese help me ASAP
Thnx

You can set the page format like this:
PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
//set orientation to portrait
aset.add(OrientationRequested.PORTRAIT);
//set format to A4
aset.add(MediaSizeName.ISO_A4);
PrinterJob pj = PrinterJob.getPrinterJob();
pj.pageDialog(aset);
if(pj.printDialog(aset)) {
     pj.print(aset);
}You can also check this url for details:
http://java.sun.com/j2se/1.4/docs/guide/jps/spec/jpsOverview.fm3.html

Similar Messages

  • Set default page format

    Hi everyone,
    is there an easy way to set the page format from "Letter" to "A4"? The user can do this in the Page setup dialog, so there should ba an easy way to do it programmatically (without messing with attributes etc.) ???
    TIA,
    -Thomas

    Did you try this?
    // Get a PrinterJob
    PrinterJob printJob = PrinterJob.getPrinterJob();
    // Create a landscape page format
    pageFormat = printJob.defaultPage();
    pageFormat.setOrientation( PageFormat.LANDSCAPE ); //Only if requestedThoto

  • "Output could not be issued" when using custom page formats

    Dear all,
    I created a custom page format using SPAD. Its dimension is 7.5cm x 10cm (190mm x 254mm). I also created this page format in windows and set as the default paper size in my printer. However, when trying to print a smartform using this size, the message "Output could not be issued" is given. When I use the standard paper sizes (e.g., LETTER, DINA4), the form prints OK.
    Can you point me to the direction to solving this?
    Thank you!
    Kyle

    Issue resoved.
    For those who are encountering the same problem, here's what I did. I tested the smartform by itself and it reported the specific error: the page format is not supported in device type SWIN. I added it in another device type SAPWIN. This was just a simple miscommunication between the admins and the developer. I added the format in SWIN and everything works fine.
    Kyle

  • Change Default Page Orientation

    After fiddling a bit with the settings in Ambrosia's Easy Envelopes (http://www.ambrosiasw.com/utilities/easyenvelopes/) I now find that that the default orientation on the printer dialog is always landscape.
    How do I change the default page orientation on either the Standard or a saved preset from landscape to portrait? (Yes, for a saved preset I tried clicking on the portrait image and selected "save" but that didn't change what was selected the next time.)
    Thank you for your time and attention.
    - nello

    I am not sure what the Ambrosia software set, but the page format information - scale, orientation, and paper size - aren't saved in the presets you mentioned or when saving a new preset.
    You could try deleting the com.apple.print.PrintingPrefs.plist file from your home's Library/Preferences folder. Or you could use TextEdit to reset the orientation by bringing up the Page Setup dialog and changing the orientation to portrait and selecting Settings->Save as Default.
    Hope this helps.

  • Page format for SAP-Script not working in 4.6C

    Hi all,
    I have a problem regarding check printing.
    I am using SAP version 4.6C
    The size of paper for check printing is
              width  = 231 mm
              Height = 304 mm
    So for this I have created a new page format with these details in SPAD.
    Then I assigned this Page format to spool format and assigned that spool format to SAPWIN driver. I have assigned this page format to the SCRIPT that is used for check printing .
    But when I am taking the print out for the check with new page format, the printer don’t print till the end of page, it prints till the total amount on check and then stops there. So this creates an alignment problem when taking printout for multiple checks.
    Please give some solution for this.
    Regards,
    Bharat.

    I guess you are printing on dot matrix printer. If yes, try to do some physical printer settings for the dot matrix printer by following the printer manual. I guess you have to change the page size.. or set default printer settings... it may help you to solve your problem...
    if not goto your device types tab in SPAD and select device types.. select your device from the list (for ex, SAPWIN) click format and goto the format that you have inserted for this device types.. double click on your format, you will see printer Indialization.. try to write code like this
    set page length to 8.5 inch (=52 lines at 6 LPI)
    \e\0x43\0x44
    Note the above hexa decimal value can be obtained by going through the printer manual.
    Close the thread once your question is answered.
    Regards,
    SaiRam

  • Different page formats in single Smartform

    Hello Experts,
    I have an requirement in my custom Smartforms. I want my first page as by default DINA4 page in where as from second onwards, I want DINA3 page format. Could it be possible? If yes, how I can achieve this? Thanks in advance.

    Hi Mayuresh,
    You can't give two page format in one smartform
    The page format are declared  in form attributes it will be same for all pages
    one thing you can do is change it to landscape or potrait.
    Regards
    Arun VS

  • Landscape and Portrait Page Format  Settings for Printing

    Hi Experts,
    The client requirement is to print the Smart form in 8.5 * 11 (inches) in  (Portrait) mode.
    In my page settings i have kept the Page Format = 'LETTER' .
    However when the page is printed , the formatting comes out to be A4(Landscape mode).
    Please let me know what i am missing.
    Thanks

    Hi Abhishek,
    I can suggest couple of options here.
    Check the settings by clicking on the Page you have created. Under O/P options we need to ensure its A4 potrait.
    Secondly you can create a custom Page Format with Potrait & Lanscape both options and depending on printer settings it will dynamically decide if we need to print Landscape of Portrairt
    Also check the Default printer Settings.

  • How does the system get the page format in reports

    Hi to all experts,
    where does the report gets the page format while print how do default the page format to the report while printing...
    please help

    Hi Mohamad,
    For printing reports by default it ill take the page format assigned to the printing device like (locl), in print preview,
    u can check the same in Transaction : SPAD.
    there click on output devices ->click on devices which u r using-->
    click on last tab->field(TRAY1)--->there u can find the page format for tht printer.
    U can change that as per ur requirement.
    i hope it ill sovle ur prob.
    Regards,
    Niranjan.G

  • Printing Problem in New Page Format

    Hi Everybody,
                  I have an issue lying  long time in my Company.
            Abap person asked me to create a new page format with new page sizing and all. i created it. this is actually for Voucher printing which does not require A4 size. so that i specified specific paper size in that.
         Voucher is Printing in the Specified Size, ok. But, after printing it, the printer automatically Rolls till the end of the paper.(Probably this would have taken A4 by Default)
         the issue is, we need to stop this rolling and we need to make this printing as specified.since it is continuous printing, every time we cant manually rotate the page.(Printer Epson Dot Matrix)
    Is this either can be sorted out by ABAP or Basis Person.  
       What can be done from Our Basis Side?
    Thanks,
    Siva

    Hi,
    How you solved this problem?
    I am also facing the same problem.
    Thanks in advance
    Sameer Dhuke
    Edited by: sameer dhuke on Feb 16, 2010 11:27 AM

  • How SAP device type SWIN sends a page format?

    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.

    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

  • Question regarding some fields on the default page layout of Leads

    Hi Everyone,
    I've noticed in the default page layout for Leads that their are fields called 'Owner Account' and 'Channel Manager'. I would like to ask to what those fields are for since they are only 'read-only'. My initial thought was the 'Owner Account' refers to the owner of the account if I associate the lead with an Account and the 'Channel Manager' was to contain the 'Report to' or 'Supervisor' of the users that created the lead but it seems not to be it.
    Thanks,
    Wayne

    Hi Dave,
    In continuation with Marcin's reply, I would like to suggest you a workaround.
    I had a similar requirement wherein I had to merge the output of multiple smartforms into one and either display it or print it.
    For this, as Mercin has already suggested, you can call the smartform(in loop) with the get_otf and no_dialog paramaters of the
    CONTROL_PARAMS structure (which you pass to the smartform function module call) to 'X' and fetch the output in OTF format
    from JOB_OUTPUT_INFO paramater of the function module call.
    Being in a loop you would get the OTF for every smartform call inside the loop. Keep appending the OTFDATA field of the
    JOB_OUTPUT_INFO structure to that of another JOB_OUTPUT_INFO structure(this will hold the otf for all the smartforms togather) .
    Once that has been done for all the smartforms , you will have the OTF output of all the smartforms which you will need to either
    display as a print preview or print, for which you can use either the function module SSFDISPLAY_OTF or SSFPRINT_OTF.
    Hope this helps.
    Regards,
    Sagar

  • Creating Page Format In Quality

    I want to create a new page format, for the purpose I did the following...
    spad-> Full Administration-> Device Types-> Page Format-> Change-> Create-> (Page Format=ZA4, Orientation=Landscape, Paper Size (Width=215 mm, Height=300 mm))
    When I click on save, a pop window opens and shows the massage Object can only be created in SAP package
    Pressing enter it asks Package under attributes
    What to select in Package is my problem? Please help....
    Lalit Kumar

    On the save Option Select Local object or Enter $TMP in the package field.
    it is not working:
    *Create a package in SE80.
    And enter the package name.*
    Can you please  provide me the steps to create package??
    Lalit Kumar

  • How to Get My Dashboard as Default Page Instead of Home Page in OBIEE 11G?

    Hello Gurus,
    I have one requirement where i need to change default page to "My Dashboard" like what we had in OBIEE 10G ?
    Rite-now in OBIEE 11G when any user logs in they are directed to "Home" Page, but i want to change the navigation to "My Dashboard" for all user..
    I know the option to in My Account and Change the Default dashboard in Preferences , but it's manual way to do it for all end-users.
    and the other is to create the PORTALPATH Variable and do it from RPD.
    So I am looking to some other way there we can change the navigation path from system file itself...
    Thanking You..

    Hello David,
    Thanks for reply.
    Actually I am just concern abt the OBIEE Dashboard page, the link that u have mentioned is for Application Server, where we can manage the multiple Application Portals.
    and it also doesn't come with Middleware that we are installing for OBIEE.
    so i did get some useful information but not related to my question.
    is there any place in EM(Enterprise Manager) or Console(Admin Console) from where we can manage the Default Portal for OBIEE Users?
    Thanking You..

  • When I open a new tab is doesn't open to my set homepage as it would if opening firefox from start. It instead opens to a "default" page with pogo powered by yahoo, I want to change to google. How do I do this?

    Opening firefox from begining, I have been able to set it to always open to google as it was in my old firefox default settings. If I remember correctly when you opened a tab, it would automatically open to the homepage. I'm not expierencing this with the new version. It is automatically going to the default page rather than the set homepage. (I just have learned to prefer the google search over the yahoo search over the years and am resistant to changing over, sorry)

    A new tab opens by default as a blank tab (about:blank).<br />
    If that isn't the case then an extension has changed that behavior.
    * https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes
    You can look at one of these extensions:
    * NewTabURL : https://addons.mozilla.org/firefox/addon/newtaburl/
    * New Tab Homepage : https://addons.mozilla.org/firefox/addon/new-tab-homepage/

  • How to change default Date format in BO 6.5 SP4

    A problem with date display has been reported to me by one of our users -  in BO 6.5 - since installing SP4.
    The default date format is now MM/DD/YYYY
    I have tried to recreate this on my PC and have been able to confirm that this is the case.
    Most of our PC's will have two versions of Business Objects on them - for 5.1.6 and for 6.5 - that is the case for my PC.
    If I create a new BO document based on a spreadsheet with three entries in the spreadsheet as follows:-
    20/01/2009    20-Jan-2009  20th January 2009
    This displays in BO 6.5 as
    1/20/2009   1/20/2009    20th January 2009
    My PC regional setting is UK and the time displays DD/MM/YYYY
    Can you advise how to correct this problem please.

    Hi Sebastien
    Thank you for your response.
    I haven't checked Dimension in universe because this is happening even when datasource is an Excel spreadheet - as per details in previous post.
    I have looked for *.sbo files and found one for ODBC.sbo in the Version 5 folders on PC - with date format details in it which I've changed - that doesn't make any difference.
    Any other ideas?
    Regards
    Linda

Maybe you are looking for

  • SAP NetWeaver 7.0 ABAP Trial Version - Installation Error -

    Hi: I am trying to install the SAP NW 7.0 ABAP Trial version - I am on Windows XP Pro and meet the Hardware requirements a'rite - however, 2 consecutive attempts leads the installer to stop and generate the same log message - ProductException: (error

  • ParserException: XMLParser: Prefix 'c' is not mapped to a namespace

    Hello and thanks in advance for any help. I am trying to deploy a war (that worked with Tomcat 4.1) on SAP Web Application Server. In this war I have a JSP that says <?xml version="1.0" encoding="UTF-8"?> <jsp:root version="1.2" xmlns:jsp="http://jav

  • Multi Pass in Crystal reports server XI R2

    Hi, Ex: I have a crystal report  which takes country as input parameter. Each country has one responsible person. US--- A person UK---B person INDIA ---C person I need to run this report with these three paramters(may increase infuture) and send the

  • Images as hyperlinks.

    I'm trying to hyperlink some images on my pages, I can easily link words using the inspector, but for some reason images does not work at all. Does anyone know if it's possible to link images? Am I doing something wrong? Thanks, I'll be so grateful f

  • How can I get Acrobat Reader X to send my pdf to the printer?

    My pdf just looks at me while I push all of the buttons, file menus and keyboard shortcuts associated with printing and it does nothing. No dialog box, no nothing. All three of my printers work and i've tried them all. It just doesn't do anything. An