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

Similar Messages

  • 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

  • Error in setting up page format for Script.

    Hi,
        I have set up a customized page format.
    I set up Page format, Format types and Device types.
    I have throughly checked wit the other working formats, everthing seems right..
    Page format : zmed_po - Portait
    Format type : zmed_po
    Error - No Printer font maintained for ZMED_PO.
    Please help me out.
    Cheers,
    Sam

    HI Sam,
    For this u need to setup the printer at OS level. There u need to setup the fonts and etc.. related to the printer. I hope this is eror from OS level...
    regards
    reghu

  • Can not set default page

    I cant set default page. It keeps reverting to: http://search.jzip.com/

    #Uninstall jZip (or Windows jZip or Windows jZip Toolbar) from Control Panel > Add or Remove Programs.
    #Open Windows Explorer
    #*Navigate to the C:\Program Files\jZip Toolbar folder
    #*Double-click uninstall
    #*Delete the Windows jZip Toolbar folder.
    #In Firefox, remove the Add-on if it is there
    #*Choose Add-ons > Extensions.
    #*Select the jZip Toolbar entry '''''if it's there''''' and click the Uninstall button.
    #*Close the Add-ons Manager tab/window
    #In Firefox, reset preferences
    #*Type '''about:config''' in the address bar and press Enter.
    #*If you see a warning, accept it (promise to be careful)
    #*Filter = jzip
    #*In results in the bottom panel, right-click each entry and choose Reset.
    #Restart Firefox.
    There should have been options during the jZip installation; see image below.
    An excellent free application to replace jZip (and the one that I have used for a very long time) that does not install all the "extras" is 7zip:
    *http://www.7-zip.org/
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Not related to your question, but...
    You need to update some plug-ins:
    *Plug-in check: https://www-trunk.stage.mozilla.com/en-US/plugincheck/
    *Shockwave Flash (Adobe Flash or Flash): [https://support.mozilla.com/en-US/kb/Managing%20the%20Flash%20plugin#w_updating-flash Updating Flash in Firefox]

  • How to set default page in DLN among folders structure

    Hi All,
    We have the navigation structure as follows.
    In Top Level Navigation we have a Role called " Role1"
    In Second Level Navigation we have a Workset called "Workset1"
    In Detailed Navigation we have a folders as below :
    Folder1
        Folder2
              Page1
              Page2
              Page3
        Folder3
             Page4
             Page5
             Page6
    Now our requirement is when user clicks on Role1 then in the Detailed Navigation (DLN) , Page1 should set by default and content in that page has to be displayed in the content Area.
    Currently it is happening like, when user clicks on Role1 then in the Detailed Navigation(DLN), Folder1 is selecting by default , then user has to select manually the page1 then that page1 is content is displaying in the content area.
    Could you please get back to me what are the properties has to be changed at page level or folder level if any, for achieving the requirement as page1 should set by default when user clicks on Role1 ( from the First Level Navigation).??
    I tried the property of "Default entry for folder"  for page1 as "Yes", Still it is setting the page1 as deafult in the DLN on click of Role1. Please let me know if any other properties are required to change?
    Note : Currently we are using Light framework page fucntionality instead of Default framework page.
    Thanks in advance, it would be great help to us if get back to us.
    Regards,
    PortalUser100
    Edited by: PortalUser100 on Feb 24, 2011 6:53 PM
    Edited by: PortalUser100 on Feb 24, 2011 6:54 PM
    Edited by: PortalUser100 on Feb 24, 2011 6:57 PM

    Hi Mahesh,
    Thanks for your reply.
    Currently we are using Light framework page not Default Framework Page, Inside we have Light detailed Navigation, inside i had check for the property of "Clicking Folder Name Launches First Node", but it was not there for Light detailed Navigation.And this property is there as you said for detailed navigation inside the desktop inner page.
    Could you please guide whether out requirement is possible or not with light framework page->light detailed navigation?
    The following is our requirement
    How to set a Page as Default which is inside the Folder Structure on DLN (Detailed Level Navigation).?
    When user clicks on Role , then we need to set the Page as default to be loading in the detailed Navigation then the content of Page will be automatically displayed in the content area.?
    The following is the Structure of our requirement, then please let me know how to set Page as default when we click on Role 1, as mentioned in the below structure. Currently when click on Role1, then Folder1 in the DLN is selecting by default then user has to click on Page manually then content of page will be displayed in the content area.
    Role1 (First Level Navigation)
         Workset1(Second Level Navigation)
             Folder1(Deailed Navigation content)
                  Folder2
                        Page (Google Page, for example)
    I tried the property of Page as "Default Entry for Folder" as "Yes", even though still the page is not setting by default on click of Role1. let me know if any other changes/properties/options are there to get the solution for this.
    If any one helps on this then it would be great help to us.
    Currently we are using Light Framework Page. Not Default Framework Page.
    Thanks in advance.
    Regards,
    PortalUser100

  • Set Default Date Format in 4.2 jQuery Mobile Smartphone

    Hi guys,
    on "normal" Desktop interfaces you can set a default date format in the Globalization settings. Currently I'm working on a JQM app, and I noticed, that the same settings I have for date format in other apps, don't take affect.
    I now read in the 4.2 release notes, that somehow this issue was a bit buggy. Is this fixed? I would like to set a german date format like "DD.MM.YYYY"; (as it's working in desktop apps). How can I do it? In global settings this entry gets saved.
    But whenever I want to set an individual date-picker-item to that format, it changes back to "YYYY-MM-DD" after saving. And I don't really want to get into writing a conversion function in the dml-processing now.
    Thanks for any hints, best regards,
    tobi

    Hi Tobi,
    the "Date Picker (HTML5)" item type maps to the HTML5 input type="date", which requires that the internal format of the date value always has to be YYYY-MM-DD, but it's up to the browser to actually display the date in the format of the local operating system setting. The browser of iOS for example shows the date in the format of my local language/country setting.
    See also http://stackoverflow.com/questions/7372038/is-there-any-way-to-change-input-type-date-format
    To make a long story short, it's not possible to specify the display format for those date pickers, because it's not supported by the HTML5 spec.
    Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Setting default page in Interactive Report Dashboard (Version 9.3.1)

    Does any one know how I can set the default page (to be the first page) in Hyperion Interactive Report Dashboard version 9.3.1?
    I have a report with dashboard that returns 56 pages (and the user scrolls down to page 8 of page 56) and selects a filter (which only has one page of data). However, since the user had scrolled down to page 8, the default page remains at 8 and when the user scrolls up, he/she sees blank pages (thereby causing Servlet error which Hyperion has identified as being reproducible and a bug).
    They have recommened that I use the onClick event trigger for the Set Filter command button to always default the page to 1 (when the set Filter button is clicked). This will put the user on page one always and prevent the Servlet error (and them seeing unnecessary blank pages).
    Any help will be greatly appreciated!
    Thanks in advance
    Nancy

    Does any one know how I can set the default page (to be the first page) in Hyperion Interactive Report Dashboard version 9.3.1?
    I have a report with dashboard that returns 56 pages (and the user scrolls down to page 8 of page 56) and selects a filter (which only has one page of data). However, since the user had scrolled down to page 8, the default page remains at 8 and when the user scrolls up, he/she sees blank pages (thereby causing Servlet error which Hyperion has identified as being reproducible and a bug).
    They have recommened that I use the onClick event trigger for the Set Filter command button to always default the page to 1 (when the set Filter button is clicked). This will put the user on page one always and prevent the Servlet error (and them seeing unnecessary blank pages).
    Any help will be greatly appreciated!
    Thanks in advance
    Nancy

  • How to set default export format in CrystalReports Viewer

    When Viewing Crystal Reports in InfoView, the top left button can choose export file format, how to set it default to Excel?

    Hi Jennie Xiang,
    You can set the default export format in Crystal designer before publishing in infoview.
    Open the report in Crystal designer and go to file>export>export options--> select the export option to xls and check the options that you want and click on OK.
    Now try exporting the report by clicking on export button then you can see the first option as xls with all format options that you have selected before by default.
    By saving this report at server (infoview) you can get the same options while exporting from viewer.
    Regards,
    Ragahvendra

  • Setting default page for group

    I have a single content area setup with 2 folders. Each folder has been published as a portlet and are displayed on my page
    in tabs (1 folder portlet included in each tab). I have 2 groups: Group A should have Tab 1 on page displayed as default
    and Group B should have Tab 2 on page displayed as default.
    Is there a way to do this?
    Thanks,
    Lisa

    first,you should edit your page, then click the edit icon of your tab,in the opening window click the tab 'advanced option',in this page you can grant your group access.
    finally,you should set your two group default page to your page.

  • How to set default dateTime format ?

    Hi..All
    when I query data in date field. I need it show on 'yyyy-mm-dd hh24:mi:ss' format, How I should do?
    it not means using
    SQL>select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual;
    But I want to using only:
    SQL>select sysdate from dual;
    and it show me in format 'yyyy-mm-dd hh24:mi:ss' ,and I nedd this one to default format for all user;
    Thanks
    Chutchai

    Here is quote from on-line oracle 9i documentation:
    The default date format for an Oracle date literal is specified by the initialization parameter NLS_DATE_FORMAT.
    I hope it helps you.

  • Set Default page for LSO

    Hi All,
    We required Training activity as default page for LSO. I am a portal guy and new to LSO. If any configuration is need please provide step by step process.
    Advance Thanks,
    Regards,
    Srinivasu.Y

    Hi Srini,
    Well, you need to to know lit bit of BSP for this. The Page that is called initially is leso.html.
    From SE80 > BSP Application > HCM_LEARNING, look for Leso.htm. In the onRequest event, you should find the below code
    CALL METHOD application->create_url
        EXPORTING
          im_alias     = application->co_alias_traininghome
          im_parameter = lt_parameter
          im_target    = 'content'
        IMPORTING
          ex_url       = core.
    This code takes the user always to Training home. You need to replace this code to take the user to activities.htm.
    Ofcourse, you cannot modify HCM_LEARNING. So you would need to create a Z copy of this and do the mapping in the view LSPAGE_ALIAS_C.
    Cheers.
    Murali

  • How to set default export format in Crystal Reports Viewer

    When Viewing Crystal Reports, the top left button can choose export file format, how to set it default to Excel?
    If we can only go with hidden the button, and create a new button, any one can kindly provide how to?
    The BOE version is XI R2 SP2.
    Thanks in advance!
    Jennie

    hi all , i have same problem like i want only 1 report to be generated like for ex:only PDF should be generated n all others has to be disabled. my jsp is as follows:
    <%@page import="com.abc.def.crystalReports.JRCHelper,
    com.crystaldecisions.reports.reportengineinterface.*,
    com.crystaldecisions.report.web.viewer.CrystalReportPartsViewer,
    com.crystaldecisions.report.web.viewer.CrystalReportViewer,
    com.crystaldecisions.reports.sdk.ReportClientDocument,
    com.crystaldecisions.sdk.occa.report.application.OpenReportOptions,
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKExceptionBase,
    com.crystaldecisions.sdk.occa.report.reportsource.IReportSource,
    com.crystaldecisions.report.web.viewer.*,
    com.crystaldecisions.sdk.occa.report.exportoptions.*,
    java.sql.Connection,
    java.sql.DriverManager,
    java.sql.ResultSet,
    java.sql.SQLException,
    java.sql.Statement,
    java.util.ResourceBundle"%><%
         // This sample code calls methods from the JRCHelperSample class, which
         // contains examples of how to use the BusinessObjects APIs. You are free to
         // modify and distribute the source code contained in the JRCHelperSample class.
         try {
              ResourceBundle messageBundle = ResourceBundle.getBundle("resources.ApplicationResources");
              String reportName = messageBundle.getString("report.path");
              ReportClientDocument clientDoc = (ReportClientDocument) session.getAttribute(reportName);
              if (clientDoc == null) {
                   // Report can be opened from the relative location specified in the CRConfig.xml, or the report location
                   // tag can be removed to open the reports as Java resources or using an absolute path
                   // (absolute path not recommended for Web applications).
                   clientDoc = new ReportClientDocument();
                   // Open report
                   clientDoc.open(reportName, OpenReportOptions._openAsReadOnly);
                   // ****** BEGIN CHANGE DATASOURCE SNIPPET **************** 
                        String connectString = "jdbc:oracle:thin:@****:db;
                        String driverName = "oracle.jdbc.driver.OracleDriver";
                        String JNDIName = "";
                        String userName = "root";               // TODO: Fill in database user
                        String password = "root";          // TODO: Fill in password
                        // Switch all tables on the main report and sub reports
                        JRCHelper.changeDataSource(clientDoc, userName, password, connectString, driverName, JNDIName);
                   // ****** END CHANGE DATASOURCE SNIPPET ****************      
                   // Store the report document in session
                   session.setAttribute(reportName, clientDoc);
                   // ****** BEGIN CONNECT CRYSTALREPORTPAGEVIEWER SNIPPET **************** 
                        // Create the CrystalReportViewer object
                        CrystalReportViewer crystalReportPageViewer = new CrystalReportViewer();
                        ReportExportControl exporter = new ReportExportControl();
                        //     set the reportsource property of the viewer
                        JPEReportSourceFactory rptSrcFactory = new JPEReportSourceFactory();
                        IReportSource reportSource = (IReportSource)rptSrcFactory.createReportSource(reportName,request.getLocale());
                        Boolean b1 = new Boolean(messageBundle.getString("Toggle.Group.TreeButton"));
                        Boolean b2 = new Boolean(messageBundle.getString("Has.ExportButton"));
                        Boolean b3 = new Boolean(messageBundle.getString("Has.SearchButton"));
                        Boolean b4 = new Boolean(messageBundle.getString("Display.GroupTree"));
                        Boolean b5 = new Boolean(messageBundle.getString("Has.Logo"));
                        Boolean b6 = new Boolean(messageBundle.getString("Display.Toolbar"));
                        crystalReportPageViewer.setHasToggleGroupTreeButton(true);
                        crystalReportPageViewer.setHasExportButton(true);
                        crystalReportPageViewer.setHasSearchButton(false);
                        crystalReportPageViewer.setDisplayGroupTree(false);
                        crystalReportPageViewer.setHasLogo(false);
                        crystalReportPageViewer.setOwnPage(true);
                        crystalReportPageViewer.setOwnForm(true);
                        crystalReportPageViewer.setReportSource(reportSource);
                        crystalReportPageViewer.processHttpRequest(request, response, application, null);
                        IReportSource reportSource = (IReportSource)rptSrcFactory.createReportSource(reportName,request.getLocale());
                        //CharacterSeparatedValuesExportFormatOptions csvOptions = new CharacterSeparatedValuesExportFormatOptions();
                        ExportOptions exportOptions = new ExportOptions();
                        //exportOptions.setExportFormatType(ReportExportFormat.characterSeparatedValues);
                        //exportOptions.setExportFormatType(ReportExportFormat.PDF);     
                        exportOptions.setExportFormatType(ReportExportFormat.characterSeparatedValues);
                        exporter.setReportSource(reportSource);
                        exporter.setExportOptions(exportOptions);
                   //exporter.setExportAsAttachment(true);
                        exporter.processHttpRequest(request, response, application, null);
                   // ****** END CONNECT CRYSTALREPORTPAGEVIEWER SNIPPET ****************          
         } catch (ReportSDKExceptionBase e) {
             out.println(e);
    %>
    if i want to add custom button where to add

  • How to set default pag magnification to 100%

    Whenever I open a PDF in Adobe Acrobat 9 Standard v9.1.2 it opens to 69.2% zoom magnification.
    How can I set the default to open all PDF's at 100% zoom magnification?
    Thanks,
    Howard

    Regarding the OP:
    "How can I set the default to open all PDF's at 100% zoom magnification?"
    With Acrobat Pro, run a Batch Process (Sequence)/Action to run the "Open Options" sequence.
    This sequence permits setting the values for all items under the Initial View tab of PDFs' Document Properties.
    Regarding a PDF's Document Properties > Initial View:
    Visit an open PDF's Document Properties (Ctrl+D, Cmd+D). Go to the Initial View tab. The top pane (Layout and Magnification) permits configuration of:
    Navigation tab: Page Only | Bookmarks Panel and Page | Pages Panel and Page | Attachments Panel and Page | Layers Panel and Page
    Page Layout: Default | Single Page | Single Page Continuous | Two-Up (Facing) | Two-Up (Cover Page) | Two-Up Continuous (Cover Page)
    Magnification: Default | Actual Size | Fit Page | Fit Width | Fit Height | Fit Visible | Magnification percentages (25% to 6400%)
    Configuration settings other than "Default" dictate how the PDF is viewed initially.
    The settings for all values in all panes in the Initial View may be established for one or many PDFs by use of a Batch Sequence/Action (Acrobat Pro required).
    This functionality is utilized in an enterprise environment where large document collections are deployed in a LAN/WAN "eLibrary" to provide a consistent initial view to end-users.
    It also provides a content author a mechanism for establishing the initial view for *their* deployed content (such as PDF document collections distributed on optical storage media).  
    As to the typical default Initial View for a created PDF:
    When a PDF is created via Acrobat the PDF document's default Initial View for Layout and Magnification is:
    --| Navigation: Page Only
    --| Page layout: Default
    --| Magnification: Default
    --| Open to page: 1
    Regarding the Open Parameters document — While this document does provide a few command line options the document's primary focus is the use of a URL to open a URL's targeted PDF's initially opening.
    Worth noting is that the document is specific for URLs and not applicable to UNC links (links with a LAN/WAN).
    Be well....

  • How to set default number format for whole app

    Hi!
    I have a bunch of View Objects and I have to set the format for each attribute of type number. I've tried using
    MyAtt_FMT_FORMAT=#,##0.00
    MaAtt_FMT_FORMATTER=oracle.jbo.format.DefaultNumberFormatter
    on just a couple of attributes and it works OK. But since I have a lot of number fields across application in a lots of view objects, I would like to set this format as default for all the number fields in my application.
    Can I do that and if yes, how?
    Thanks

    you can use Domains.
    chapter 26 Advanced Entity Object Techniques in Developer’s Guide For Forms/4GL Developers
    Regards,

  • Set default page setup settings in adobe acrobat so adobe reader prints to tray 2 on my printer by default?

    I want to set a tray on my printer to be the default for just adobe reader without setting the default for windows. When i set page setup settings it reverts to the defaults when i open new PDFs and i want this seetin to save.
    Thanks

    I would suggest creating a second instance of the printer in Windows with tray 2 as the default tray - select that printer from Acrobat.
    Control Panel > Add Printer > Create the Printer
    Control Panel > Printers > Printer Properties

Maybe you are looking for