How to print a page in printer friendly format.

Hi,
I have a requirement, I need a Print button which can print APEX page in given formate. I can not use just window.print. Since I need Print option in APEX page not in report, Please let me know how t oachive this.
Thanks,
Priyanka

Not sure what you mean, but if you add "YES" as 9th parameter in your APEX URL your Page is rendered in "PrinterFriendly" Mode.
For URL Syntax: http://www.oracle-and-apex.com/apex-url-format
See the documentation for details.
brgds,
Peter
Blog: http://www.oracle-and-apex.com
ApexLib: http://apexlib.oracleapex.info
Work: http://www.click-click.at

Similar Messages

  • How to print a formatted page in java?

    hi all
    i've made my simple application that writes and retrieves information to/from a database, and organizes them in reports
    now, i got to print these reports in formatted pages like, for example:
    title centered and bold
    first db record
    second db record
    eccc
    i followed the http://java.sun.com/products/java-media/2D/forDevelopers/sdk12print.html documentation and wrote this class
    import java.awt.print.*;
    import java.awt.*;
    import java.text.*;
    import java.awt.geom.*;
    import java.awt.font.*;
    public class print implements Printable
    //the "\n" token doesn't allow me to do a new line, as i want!!
        String mText="The JavaTM Print Service \n is a new Java Print API that allows printing on all Java platforms, including platforms requiring a small footprint, such as a J2ME profile, but still supports the current Java 2 Print API. Thie Java Print Service API includes an extensible print attribute set based on the standard attributes specified in the Internet Printing Protocol (IPP) 1.1 from the IETF. With the attributes, client and server applications can discover and select printers that have the capabilities specified by the attributes. In addition to the included StreamPrintService, which allows applications to transcode data to different formats, a third party can dynamically install their own print services through the Service Provider Interface ";
        AttributedString mStyledText=new AttributedString(mText);
        static public void main (String args[])
            PrinterJob printerJob=PrinterJob.getPrinterJob();
            PageFormat format=new PageFormat();
            format=printerJob.pageDialog(format);
            Book book=new Book();
            book.append(new print(),format);
            printerJob.setPageable(book);
            boolean doPrint=printerJob.printDialog();
            if(doPrint)
                try
                    printerJob.print();
                catch(PrinterException ex)
                    ex.printStackTrace();
        public int print(java.awt.Graphics g, java.awt.print.PageFormat format, int param) throws java.awt.print.PrinterException
            Graphics2D g2d=(Graphics2D)g;
            g2d.translate(format.getImageableX(), format.getImageableY());
            g2d.setPaint(Color.black);
            g2d.setFont(new Font("Serif",Font.PLAIN,5));  //this doesn't work!!!
            Point2D.Float pen=new Point2D.Float();
            AttributedCharacterIterator charIterator=mStyledText.getIterator();
            LineBreakMeasurer measurer=new LineBreakMeasurer(charIterator,g2d.getFontRenderContext());
            float wrappingWidth=(float) format.getImageableWidth();
            while(measurer.getPosition()<charIterator.getEndIndex())
                TextLayout layout=measurer.nextLayout(wrappingWidth);
                pen.y +=layout.getAscent();
                float dx=layout.isLeftToRight()?0:(wrappingWidth-layout.getAdvance());
                layout.draw(g2d,pen.x+dx, pen.y);
                pen.y+=layout.getDescent()+layout.getLeading();
            return Printable.PAGE_EXISTS;
    }this works, and is great the dialog to choose the paper orientation and the printer, but i'm still not able to do the simplest things: like
    - change the font of my text (as you can see in the print() method)
    - do a new line in my text (as you can see in the beginning of the code)
    so, now that i'm able to print some text, i'd like to be able to change the format of my printable page
    any advice?
    i didn't find any tutorial really complete! anyone can suggest me any?
    thanx a lot in advance
    sandro

    I'm not sure if you still need this, but try \n\r instead of simply \n.
    \n is a new line, but \r signifies the carriage return, back to the left. I'm not sure if it's always necessary, but it was in my case.

  • How to calculate the Page total in Excel format

    Hai all,
    How can we calculate the page total in Excel format, directly in RTF without using the summary column in the RDF.
    Regards

    <?add-page-total:TotalFieldName;’element’?>
    where
    TotalFieldName is the name you assign to your total (to reference later) and
    ’element’ is the XML element field to be totaled.
    You can add this syntax to as many fields as you want to total.
    Then when you want to display the total field, enter the following syntax:
    <?show-page-total:TotalFieldName;’Oracle-number-format’?>
    Pls refer XML Publisher user guide for more info on this.
    Kiran

  • How can i display page number in this format in xml publisher report (1-1)

    in this format
    1-1
    1-2
    1-3
    2-1
    2-2
    2-3
    can i display page nos in this format in xml publisher please help me on this

    Hi,
    Use the SET COUNTRY..
    SET COUNTRY 'US'.
    write: / sy-datum.
    SET COUNTRY 'IN'.
    write: / sy-datum.
    Thanks,
    Naren

  • How to Print PDF Format In SAP SCRIPT

    Hi All,
    I have a requirement to print the output in PDF format.
    First we can pass the parameter from Excel sheet,through on the parameters , we can fetch the output and print the PDF format.
    Please help me.
    regards
    raghava

    Hi Ragha,
    SAP has created a standard program RSTXPDFT4 to convert your Sapscripts spools into a PDF format.
    You will get the spool number from transaction SP02.
    Also go through the following document:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/49e15474-0e01-0010-9cba-e62df8244556
    Regards,
    Nitin.

  • How do I create a printer friendly page in a popup window for a JSF page

    I have a JSF page that displays a table that shows the inventory level of a particular garment style. The table is like a matrix with each row representing a color of the style and each column representing a size of the garment. So the data in the table cell is for the inventory level of a particular color/size combination (e.g. navy blue of medium size ) for the particular style. The page also allows you to dynamically select a warehouse from a dropdown to see the inventory matrix of that warehouse.
    Now everything has been working fine except that the matrix table is not printer-friendly. So we need to have a Print button or link on the page that will generate a popup window that displays the same matrix table in a printer-friendly format (with different style sheet etc.). What is the best way to populate the matrix table in the popup? The data in the matrx table is stored in a hashmap in a InventoryManageBean of session scope.
    Also, shoud I use window.open to get the new window and if so what do I pass in the URL parameter?
    Any advice is appreciated. It would be great if you can include a code sample as I would think someone else must have had this done before.

    Any one please? This is urgent. Thanks a ton!

  • About printer friendly link in iProcurement purchasing

    Hi Guys,
    This is a very strange requirement for me. In iProcurement, when the user tries to create requisitions, it will go thru some process .... , approvers, billing, etc .. and lastly you will click submit to create the requisition. Before you click submit button to create the requisitions, you will be in a page where you can view the details of all the lines you created to submit them. If your requisition has 3 lines, then you will have 3 lines with "view" link on to the left, if you click one view, it will expand and show all the details of that line. At the same time, if you see on the top of that page, you can see "Printer Friendly version of this page" link. if you click that link, it will display in a printer friendly format with all the details of each line expanded in a printable format and it can be printed.
    my problem is, after the requisition is created, you can go to requisition details and click a requisition to see its details. if the requisition has more than one line, you can see that many lines. If you want to see the details of each line, then you need to click each line "view" link on to the right side to see their details. Now here you cant see that "printer friendly version of this page". How can i implement the same concept of "printer-friendly version of this page" which comes while creating the requisition.
    can it be implemented thru AK Developer.
    Help Appreciated
    Thanks

    Hi,
    We are interested in this functionality also.
    But I did not see a link like you have explain. Our version is 11.5.10 CU2 and I see a button 'Printable Page' in the ReviewSubmit page.
    Is your version the same as ours?
    We want the Approver to print the page also. Is there a facility for this?
    Appreciate it if you can provide some information.
    Thanks
    Sandeep

  • ADF Faces Printer Friendly Views

    Does anyone know how to create printer friendly pages in ADF Faces? Not only do I need the printer friendly format when I print, but I would also like to make a link to printer friendly page. I have played around with @media tag in css but I haven't got it working. Any help that someone could provide would be appreciated.

    Hi,
    it is easy, on the adfc-config.xml on the navigation rules that is pointing to print page before the action write dialog such as:
    dialog:relation
    for the commandbutton or commandLink use the property usewindow and windowHeight and windowWidth and the action such as below
      <af:commandImageLink         action="dialog:relation" //what you specified on adfc-config
                                                     icon="/images/icon-link.png"
    id="cil2"
                                                     useWindow="true"
                                                     windowHeight="800"
                                                     windowWidth="750">
                        </af:commandImageLink>

  • How to print the content of a DynPro Window?

    Hello,
    Is there any DynPro (Or SAP) package that can print the current window content? If yes, can anyone please show me a code example?
    Roy

    Roy,
    Printing content of the window is almost always not a solution. Personally, I hate sites where articles are not available in printer-friendly format (either via separate page or CSS with media type printer).
    With WebDynpro it is even worse -- does end user really expect all this buttons, complex tables, combo boxes etc.?
    My advise is to either:
    1. Create Adobe PDF for user to download and print
    2. Create printer-friendly HTML and open it in external window
    3. Create MS Excel file to download.
    First and third options are well documented in SDN docs / tutorials, the second option is very easy to implement: take my code for transforming context tree to XML converting context-tree to xml? and apply necessary XSLT template. This way you may get HTML output in printer friendly form.
    Valery Silaev
    EPAM Systesm
    http://www.NetWeaverTeam.com

  • OIM Report is not printer friendly?

    Guy,
    I tried to print OIM report using printer but the output always include the left menu. It really looks weird.
    So I just wanna ask you guys how to print OIM report to printer with nice looking (like no left menu etc.)?
    Best Regards,
    Satit Auputtinunin

    Transform it via XSL or whatever to a printer-friendly format.

  • How to print this date format: eg. 14-Aug-2002 01:26:36 PM?

    Can anyone tell me exactly how to print this format?

    This is how we can produce the output you specified.
    import java.util.*;
    import java.text.*;
    //14-Aug-2002 01:26:36 PM?
    class Test
         public static void main(String args[])
              //Date b=new Date();
              //System.out.println(b.toString());
              // Format the current time.
              SimpleDateFormat formatter = new SimpleDateFormat ("dd-MMM-yyyy ' ' hh:mm:ss a");
              Date currentTime_1 = new Date();
              String dateString = formatter.format(currentTime_1);
              System.out.println(dateString);
    }//end of Test.

  • How to do a "printer friendly page"?

    Hello,
    I have searched a lot but I didn�t find a tutorial
    that work.
    I am using ASP Vbscript.
    Any help will be very appreciated.
    Thanks

    You seem to have misunderstood the use of the print.css
    This is used on the same page as the normal css script, but
    is only seen by
    the printer.
    Read the link Murray has so kindly provided.
    http://www.alistapart.com/articles/goingtoprint/
    Henk
    "Gilson Roda" <[email protected]> wrote in message
    news:e52ivk$qik$[email protected]..
    > Thank you for prompt reply.
    > I have copied all css into print.css
    > But I didn�t follow how to do a link to other
    "printer friendly page".
    > Actualy, I have an ASP page with several dynamic data
    (with recordset
    > paging). What I want to do is a "print" link to another
    ASP page, in order
    > to print all content of my database without paging
    stuff.
    > Am I clear? Sorry my english is terrible.
    > Thanks in advance.
    >
    > "Murray *ACE*" <[email protected]>
    escreveu na mensagem
    > news:e52g93$n8s$[email protected]..
    >>
    http://www.alistapart.com/articles/goingtoprint/
    >>
    >>
    >> --
    >> Murray --- ICQ 71997575
    >> Adobe Community Expert
    >> (If you *MUST* email me, don't LAUGH when you do
    so!)
    >> ==================
    >>
    http://www.dreamweavermx-templates.com
    - Template Triage!
    >>
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >>
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    >>
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    >> ==================
    >>
    >>
    >> "CETEMA" <[email protected]> wrote in message
    >> news:e52ftk$mtg$[email protected]..
    >>> Hello,
    >>> I have searched a lot but I didn�t find a
    tutorial that work.
    >>> I am using ASP Vbscript.
    >>> Any help will be very appreciated.
    >>> Thanks
    >>>
    >>>
    >>
    >>
    >
    >

  • How to print out page number

    I want to print page number with every page how it possible.....
    So that I would come to know how many printed documents are left....
    Please reply soon

    Hi Friend,
    In the Live Previewer menu
    on top there are two buttons
    one for Insert date and time
    two for Insert page numbers
    select the second one it will diff
    options for page displaying
    so that u can display the page numbers
    bye
    srini

  • How to print headings in every page of smartforms.

    Friends,
    we have a requirement to print hedaings in multiple pages.
    like if we have  100 line items those will accomidate more tahn one page , i need to print headings in each page.
    pls help me.
    Regards
    Jagadeeshwar.B

    hi ,
    can u check this...
    how to use new page in smartforms
    If you are calling window to display header, then just un check the output option->display on first page only.
    regards,
    venkat.

  • Send printer friendly page per mail

    Hello everybody.
    I'm very new with APEX and I couldn't find an answer to solve my problem:
    I have a printer friendly page with several text elements and a report so that it nearly looks like a letter in the end.
    Now I want to send this page as a "pdf-attachment" per mail when pressing a button.
    I already noticed the "add_attachment"-procedure in the APEX_MAIL package, but how do i get my actual printer friendly page stored in a BLOB-column in my DB to use this procedure?
    Thanks in advance
    Carsten

    Carsten,
    There are several different version of the get_print_document function, e.g there's this one:
    APEX_UTIL.GET_PRINT_DOCUMENT (
    p_report_data IN CLOB,
    p_report_layout IN CLOB,
    p_report_layout_type IN VARCHAR2 default 'xsl-fo',
    p_document_format IN VARCHAR2 default 'pdf',
    p_print_server IN VARCHAR2 default NULL
    ) RETURN BLOB;
    So you could store both the XML and XSL in a CLOB. But it might be easier to get started referencing actual report queries and report layouts, which you store under shared components and then use this API:
    APEX_UTIL.GET_PRINT_DOCUMENT (
    p_application_id IN NUMBER,
    p_report_layout_name IN VARCHAR2,
    p_report_query_name IN VARCHAR2,
    p_report_layout_name IN VARCHAR2 default null,
    p_report_layout_type IN VARCHAR2 default 'xsl-fo',
    p_document_format IN VARCHAR2 default 'pdf',
    p_print_server IN VARCHAR2 default null
    ) RETURN BLOB;
    Using pre-defined report queries and layouts ensures that you don't run into issues with your custom XML and XSL data.
    The error message "500 Internal Server Error" is a standard Java error message that doesn't tell you anything. Maybe you could find more info in one of your log files. Are you using BI Publisher? Apache FOP? Or some other rendering engine?
    Regards,
    Marc

Maybe you are looking for