Print multiple pages of text module as Terms and Conditions at end of PO

Hello,
I have a text module that contains a two page terms and conditions to print as the last pages of a PO.
I have three pages
FIRST-->Calls NEXT
NEXT--> Calls NEXT with a command to LAST in the MAIN window
LAST-->Calls Last, has a MAIN Window and a regular window which calls text module
The text module only prints on the first page in the end of the PO(i.e.last page). It does not flow or create an additional page for the left over text in the text module.
Please advice.

Hi,
We have same situation. What I did was to introduce a new element in MAIN WINDOW ( by the way only FIRST & LAST pages are sufficient, no need to have additional page for printing Terms & Conditions ) in that element just have 2 lines viz.:
/:   NEW-PAGE                                     * Above command so that terms & conditions will always start from a new page.                       
/:   INCLUDE ZPO_TERMS_AND_CONDITIONS OBJECT TEXT ID ST LANGUAGE EN      
If terms & conditions are more than a page it will automatically be printed on the next page. ( In our case currently we have got 5 pages of terms & conditions ).
At the end of the program i.e. When you are finished with printing of a PO just 'WRITE' this element using WRITE_FORM.
I hope this helps,
Regards
Raju Chitale

Similar Messages

  • Unable to print all the terms and conditions pages in the PO.

    Reqt: The PO includes terms and conditions as the last page.
    Currently the program only prints out the first page of the Terms and Conditions regardless if it is one or two pages.
    Only one page(image) is displaying in the last page of smartform.
    These terms and conditions pages are passing as graphics(images), We are passing the GRAPHICS under the TABLES Main Area in LAST page WINDOW.
    But only one page (image) is displaying, but not others.
    Can anyone help to solve the above issue.
    Regards,
    Kishore

    you can create your terms n condition texts in SO10(standard text). THEN
    If u r using smartform then do this:
    goto the general attributes of a text element. From the drop down menu, convert the text type to include text.
    The just as in read_text fm pass the parameters
    text name, text object, text id and language.
    Every thing will be handled automatically
    AND if its a sap script then:
    To include the contents of another text into the current text, use the INCLUDE control command. SAPscript still treats the text to be included as a separate text. The text is copied over only at the point at which the output is formatted.
    Thus the use of the INCLUDE command always ensures that the most current version of a text is included into the output, since the text is not read and inserted until the output is formatted.
    Syntax:
    /: INCLUDE name OBJECT o ID i LANGUAGE l PARAGRAPH p
    NEW-PARAGRAPH np
    You must specify the name of the text to be inserted. It can be up to 70 characters long. If the name of the text contains spaces, then you must enclose it in quotes as a literal value. You can, alternatively, specify the name via a symbol. All remaining parameters in the INCLUDE command are optional. If an optional parameter is not specified, then SAPscript uses default values as applicable for the calling environment.
    /: INCLUDE MYTEXT
    The text MYTEXT is included in the language of the calling text.
    /: INCLUDE MYTEXT LANGUAGE 'E' PARAGRAPH 'A1'
    The text with the name MYTEXT and the language E is included, regardless of the language of the calling text. The paragraph format A1 will be used as the standard paragraph type for this call.
    Optional parameters:
    u2022 LANGUAGE
    If this parameter is not specified, then the language of the calling text or the form language are used for the text to be included. If the language is specified, then the text will be fetched in this language, regardless of the language of the calling text.
    u2022 PARAGRAPH
    The text to be included is formatted using the style allocated. The PARAGRAPH parameter can be used to redefine the standard paragraph for this style for the current call. All *-paragraphs in the included text will then be formatted using the paragraph specified here.
    u2022 NEW-PARAGRAPH
    The first line of the text to be included will be given this format indicator, as long as it is not a comment or command line. If the optional PARAGRAPH parameter (see above) is not specified, then all *-paragraphs of the included text will also be formatted using the paragraph specified in the NEW-PARAGRAPH command.
    u2022 OBJECT
    In order to completely specify a text, information about the text object is also required. There are a number of restrictions and other rules that depend on the object type of the calling text:
    o Any kind of text can be included in a form. If no object is specified, then TEXT will be used (standard texts).
    o In the case of a document text (DOKU object), you can include only document texts. This object type is also assumed if no object is specified in this environment.
    o Only hypertexts and document texts can be included in a hypertext (DSYS object). If the OBJECT parameter is missing, then DSYS is used as the default value.
    o In the other kinds of text you can include only standard texts (TEXT object), document texts or hypertexts. If there is no specification, then the default object is TEXT.
    u2022 ID
    The text ID is a part of the text key, which permits further text objects within a given object. If no ID is specified, then the default include ID is used from the TTXID table for the calling text. If there is no entry in this table, then the text ID of the calling text is used.
    The following consistency check is applied both to the ID and the object:
    u2022 All text IDs are allowed in a form.
    u2022 In document texts, only document texts may be included that have text IDs TX (general texts) or UO (authorization objects) and also other document texts with the same text ID as the calling document text.
    u2022 In DSYS texts, all DSYS texts can be included, whatever ID they have. Document texts to be included must have one of the IDs TX or UO.
    u2022 Into the other texts, standard texts with any allowable text ID, DSYS texts with all IDs, and document texts with the IDs TX and UO can be included.
    The INCLUDE command returns a status code in the SAPSCRIPT-SUBRC symbol:
    u2022 0: the text include was successful.
    u2022 1: the command could not be executed because it contained syntax errors.
    u2022 2: the rules governing the text to be included were not followed (see above).
    This value cannot occur if the command is used in a SAPscript form.
    u2022 4: the specified text could not be found.
    Once you define the standard text in SO10 you can include text by the above process or use the function module read_text:
    .............IN Smartform.......
    CALL FUNCTION 'READ_TEXT'
    EXPORTING
    CLIENT = SY-MANDT
    id =
    language =
    name =
    object =
    ARCHIVE_HANDLE = 0
    LOCAL_CAT = ' '
    IMPORTING
    HEADER =
    tables
    lines = i_tab
    EXCEPTIONS
    ID = 1
    LANGUAGE = 2
    NAME = 3
    NOT_FOUND = 4
    OBJECT = 5
    REFERENCE_CHECK = 6
    WRONG_ACCESS_TO_ARCHIVE = 7
    OTHERS = 8
    So you want to know how get the parametrs right. This is how"
    In SO10 goto goto menu -> header
    here u will find all the required parametrs.
    The text lines will be returned in the i_tab.
    U can loop at this itab and display the data.
    Reward points if hepful.

  • Terms and conditions not getting displayed on the last page

    Hi All,
    I have to display a smartform, on the front side of the page i have to display material details and on the back side of the page i have to display terms and conditions. I' am unable to print the material details and terms and conditions in duplex mode, but on the last page only material details are getting displayed, terms and conditions are not getting displayed.
    Can you please help me how to make the terms and conditions get printed on the back side of the last page.
    Thanks,

    I'm a bit confused by the statement "I' am unable to print the material details and terms and conditions in duplex mode".
    I suppose you meant to say "I am able to print the material details and terms and conditions in duplex mode", correct?
    If the problem is that on the last form page, the T&C is not getting printed on the back of the form, you could force the T&C page by using a flow logic command as the very last element of the main window, which gets processed when all the data is already output. For the command, use the 'Go to New Page' and specify the page name for the Terms & Conditions.
    In case this causes an issue that the last page is printed twice (since the T&C page is likely defined with the next page being NEXT_PAGE), then copy the already existing T&C page, call it LASTPAGE and leave the Next Page attribute empty.

  • IOS 7.0.1/7.0.2 Update: Terms and Conditions Page Blank

    Hi All. I just got myself an iPhone 5S and I noticed that both the 7.0.1 and 7.0.2 updates didn't have any text in the Terms and Conditions Page prior to installing the update. The two buttons are present at the bottom, "Agree" and "Disagree". Is this normal? Why didn't the text load of the Terms and Conditions?

    I am having the same issue.  Anyone able to help?

  • How to print multiple pages in single spool in smartforms

    Hi all,
      I have a issue on to print multiple pages in single spool,i can able to print multiple pages in multiple spool .I am doing Check Print smartforms in that i need to print Multiple pages in single spool.Currently i am using the below code please help to solve this issue.
    IF gv_tabix = 1.
    lwa_outp_option-tdnewid = 'X'.
    ELSE.
    lwa_outp_option-tdnewid = ' '.
    ENDIF.
    Thanks,
    Deesanth

    Hi
    TABLES: spfli.
    DATA:
      t_spfli type STANDARD TABLE OF spfli.
    DATA:
      fs_spfli TYPE spfli.
    DATA:
      w_form TYPE tdsfname,
      w_flag TYPE i,
      f_nam TYPE rs38l_fnam,
      w_input TYPE ssfcompin,
      w_control TYPE ssfctrlop.
    SELECTION-SCREEN BEGIN OF BLOCK blk WITH FRAME.
    SELECT-OPTIONS s_carrid FOR spfli-carrid.
    SELECTION-SCREEN END OF BLOCK blk .
    SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME.
    PARAMETERS:
      p_single RADIOBUTTON GROUP rad1,
      p_ind RADIOBUTTON GROUP rad1.
    SELECTION-SCREEN END OF BLOCK block1.
    START-OF-SELECTION.
    PERFORM display_data.
    PERFORM ssf_function_module_name.
    PERFORM spool_request.
    *& Form display_data
    * text
    * --> p1 text
    * <-- p2 text
    FORM display_data .
    SELECT * FROM spfli INTO TABLE t_spfli WHERE carrid IN s_carrid.
    ENDFORM. " display_data
    *& Form ssf_function_module_name
    * text
    * --> p1 text
    * <-- p2 text
    FORM ssf_function_module_name .
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING formname = ' '
    IMPORTING fm_name = f_nam
    EXCEPTIONS no_form = 1
    no_function_module = 2.
    * IF sy-subrc NE 0.
    * MESSAGE 'Form cannot be displayed' TYPE 'E' .
    * ENDIF. " IF sy-subrc eq 0
    ENDFORM. " ssf_function_module_name
    *& Form spool_request
    * text
    * --> p1 text
    * <-- p2 text
    FORM spool_request .
    w_input-dialog = 'X'.
    CALL FUNCTION 'SSFCOMP_OPEN'
    EXPORTING input = w_input
    EXCEPTIONS error = 1.
    *" LOOP AT t_spfli .....................................................
    LOOP AT t_spfli INTO fs_spfli.
    w_control-no_open = ' '.
    w_control-no_close = ' '.
    *"Single spool request..................................................
    IF p_single EQ 'X'.
    w_control-no_open = 'X'.
    w_control-no_close = 'X'.
    ELSE.
    *"Individual spool request.............................................
    IF w_flag NE '1'.
    w_control-no_open = 'X'.
    w_control-no_close = ' '.
    w_flag = 1.
    CALL FUNCTION ' '
    EXPORTING control_parameters = w_control
    fs_spfli = fs_spfli
    EXCEPTIONS formatting_error = 1
    internal_error = 2
    send_error = 3
    user_canceled = 4.
    endif. " IF w_flag ne '1'
    ENDIF. " IF p_single eq 'X'.
    CALL FUNCTION ' '
    EXPORTING
    control_parameters = w_control
    fs_spfli = fs_spfli
    EXCEPTIONS formatting_error = 1
    internal_error = 2
    send_error = 3
    user_canceled = 4.
    ENDLOOP. " LOOP at t_spfli into ...
    *&This function module close the spool request *
    CALL FUNCTION 'SSFCOMP_CLOSE'
    EXCEPTIONS error = 1.
    ENDFORM. " spool_request
    Regards,
    Sravanthi

  • How to print the Terms and Condition page ine the sap-script

    Hi experts,
                             i got the requirement that how to print the Terms and condition page in the script,i have the three pages, having the same main window, in the last of the main window(all three pages)  i have called the hard coded text(i.e so10 text), but when i am displaying the output  data get printed in the first page but i am getting the second page heading on the top of  the terms and condiions page. In all the three pages i  have the same main window, if i  make change in any window i will affect all the other main  windows.  so please suggest me how i need to go.HOW TO GET GRID OF THE TEXT ON THE TOP OF THE SECOND PAGE OF THE TERMS AND CONDITONS.
    like this i have called in the MAIN WINDOW
    /E : LAST ( IN ALL THREE PAGES)
           INCLUDE ZSD_INVOICE_TERMS TEXT OBJECT TEXT LANGUAGE EN.
    IN THE TCODE SO10
    NEW PAGE TERMS.
    1) TERM MS AND CONDITONS  TEXT.................................................
    FIRST->NEXT, NEXT->NEXT,,   TERMS--->TERMS.

    Hi,
    1. Create a new page by Name : LAST
    2. Identify the text element which will be the last element in the form in the debug mode.
    Mostly Ex: SUM, TOTAL, LAST etc.,
    3. the page linking should be
    First --> Next
    Next --> Next
    4. In the Text element identified in the step 3.
    Write the following code
    /: NEW PAGE  LAST
    /: INCLUDE the standard text created for the terms and conditions in SO10
    Check the syntax for the command but the logic will be the same.
    It should resolve your problem.

  • Error in smartform when printing multiple pages

    Hi,
    I m using a smartform which have two pages in it,
    i m able to save and activate it without any error message and when i run the function module generated to chk my smartform
    it runs fine and diplays two pages i m using.
    but as i m attaching this form with my driver program it is giving an error message while running . the error message is " No other output defined in main window."
    Please help me out to resolve the issue.

    Re: error in smartform when printing multiple pages
    dharani tadikonda
    Thanks for this answer. It is absolutely correct.

  • Flex 1.5 -PRINTING MULTIPLE PAGES

    hi,
    plz tell me how to print multiple pages in flex 1.5.
    i hv used the fillowing function.it works well but sometimes
    it HANGS OUT the application.
    function doPrintForm() {
    var currentScaleX:Number = msgnonvisual.scaleX;
    var currentScaleY:Number = msgnonvisual.scaleY;
    var currentScaleX1:Number = msgnonvisual1.scaleX;
    var currentScaleY1:Number = msgnonvisual1.scaleY;
    var currentScaleX2:Number = msgnonvisual2.scaleX;
    var currentScaleY2:Number = msgnonvisual2.scaleY;
    var currentScaleX3:Number = msgnonvisual3.scaleX;
    var currentScaleY3:Number = msgnonvisual3.scaleY;
    var currentScaleX4:Number = msgnonvisual4.scaleX;
    var currentScaleY4:Number = msgnonvisual4.scaleY;
    var currentScaleX5:Number = msgnonvisual5.scaleX;
    var currentScaleY5:Number = msgnonvisual5.scaleY;
    var currentScaleX6:Number = msgnonvisual6.scaleX;
    var currentScaleY6:Number = msgnonvisual6.scaleY;
    var tempHeight=msgnonvisual.height;
    msgnonvisual.height=800;
    msgnonvisual1.height=800;
    msgnonvisual2.height=800;
    msgnonvisual3.height=800;
    msgnonvisual4.height=800;
    msgnonvisual5.height=800;
    msgnonvisual6.height=800;
    msgnonvisual.scaleX=65;
    msgnonvisual.scaleY=65;
    msgnonvisual1.scaleX=65;
    msgnonvisual1.scaleY=65;
    msgnonvisual2.scaleX=65;
    msgnonvisual2.scaleY=65;
    msgnonvisual3.scaleX=65;
    msgnonvisual3.scaleY=65;
    msgnonvisual4.scaleX=65;
    msgnonvisual4.scaleY=65;
    msgnonvisual5.scaleX=65;
    msgnonvisual5.scaleY=65;
    msgnonvisual6.scaleX=65;
    msgnonvisual6.scaleY=65;
    var msgtext:String=msgta.text;
    var printtext:String=msgta.text;
    var inxnum:Number;
    var actendindex:Number;
    var srtindstr:String="";
    var countindex:Number=0;
    var countpj:Number=1;
    //var SS:String="";
    var srtidx:Number=0;
    var pj_array:Array = new Array();
    var pj:PrintJob = new PrintJob();
    if(pj.start() != true){
    delete pj;
    return;
    try{
    for (var
    startpoint:Number=0;startpoint<msgtext.length;startpoint++)
    var temp = mx.core.UIObject.useLayoutManager;
    inxnum=msgtext.indexOf("'",startpoint);
    startpoint=inxnum;
    // trace("FLEX ERROR
    ->>>>>>>>>>----->>>.>>>>>>>.>>>>>>>"+startpoint
    pj_array[countindex]=inxnum;
    countindex++;
    if(countindex%49==0 && countindex>48)//
    ||(printtext.length-startpoint)<34
    var endidx:Number=srtidx+48;
    actendindex=pj_array[endidx];
    actendindex++;
    if(countpj==1)
    msgnonvisual.text=printtext.substring(0,actendindex);
    mx.core.UIObject.useLayoutManager = false;
    mx.managers.LayoutManager.updateNow();
    mx.core.UIObject.useLayoutManager = temp;
    //pj.orientation == "landscape";
    pj.addPage(msgnonvisual, {xMin:0,xMax:900,yMin:0,yMax:700});
    }else if(countpj==2)
    msgnonvisual1.text=printtext.substring(pj_array[srtidx]+1,actendindex);
    mx.core.UIObject.useLayoutManager = false;
    mx.managers.LayoutManager.updateNow();
    mx.core.UIObject.useLayoutManager = temp;
    //pj.orientation == "landscape";
    pj.addPage(msgnonvisual1,
    {xMin:0,xMax:900,yMin:0,yMax:700});
    }else if(countpj==3)
    msgnonvisual2.text=printtext.substring(pj_array[srtidx]+1,actendindex);
    mx.core.UIObject.useLayoutManager = false;
    mx.managers.LayoutManager.updateNow();
    mx.core.UIObject.useLayoutManager = temp;
    //pj.orientation == "landscape";
    pj.addPage(msgnonvisual2,{xMin:0,xMax:900,yMin:0,yMax:700});
    }else if(countpj==4)
    msgnonvisual3.text=printtext.substring(pj_array[srtidx]+1,actendindex);
    mx.core.UIObject.useLayoutManager = false;
    mx.managers.LayoutManager.updateNow();
    mx.core.UIObject.useLayoutManager = temp;
    //pj.orientation == "landscape";
    pj.addPage(msgnonvisual3,
    {xMin:0,xMax:900,yMin:0,yMax:700});
    }else if(countpj==5)
    msgnonvisual4.text=printtext.substring(pj_array[srtidx]+1,actendindex);
    mx.core.UIObject.useLayoutManager = false;
    mx.managers.LayoutManager.updateNow();
    mx.core.UIObject.useLayoutManager = temp;
    //pj.orientation == "landscape";
    pj.addPage(msgnonvisual4,{xMin:0,xMax:900,yMin:0,yMax:700});
    }else if(countpj==6)
    msgnonvisual5.text=printtext.substring(pj_array[srtidx]+1,actendindex);
    mx.core.UIObject.useLayoutManager = false;
    mx.managers.LayoutManager.updateNow();
    mx.core.UIObject.useLayoutManager = temp;
    //pj.orientation == "landscape";
    pj.addPage(msgnonvisual5,
    {xMin:0,xMax:900,yMin:0,yMax:700});
    srtidx=srtidx+48;
    countpj++;
    if(countindex > 48)
    var arrlen:Number=pj_array.length;
    // var lendiff:Number=arrlen-srtidx;
    // mx.controls.Alert.show("Length Diff"+lendiff,"CCS");
    --arrlen;
    var actendindex:Number=pj_array[arrlen];
    actendindex++;
    msgnonvisual6.text=printtext.substring(pj_array[srtidx]+1,actendindex);
    mx.controls.Alert.show(pj_array[srtidx]+"\n"+actendindex,"CCS");
    var temp = mx.core.UIObject.useLayoutManager;
    mx.core.UIObject.useLayoutManager = false;
    mx.managers.LayoutManager.updateNow();
    mx.core.UIObject.useLayoutManager = temp;
    //pj.orientation == "landscape";
    pj.addPage(msgnonvisual6,
    {xMin:0,xMax:900,yMin:0,yMax:700});
    }else
    msgnonvisual6.text=printtext;
    var temp = mx.core.UIObject.useLayoutManager;
    mx.core.UIObject.useLayoutManager = false;
    mx.managers.LayoutManager.updateNow();
    mx.core.UIObject.useLayoutManager = temp;
    //pj.orientation == "landscape";
    pj.addPage(msgnonvisual6,
    {xMin:0,xMax:900,yMin:0,yMax:700});
    pj.send();
    }finally
    msgnonvisual.height=tempHeight;
    msgnonvisual1.height=tempHeight;
    msgnonvisual2.height=tempHeight;
    msgnonvisual3.height=tempHeight;
    msgnonvisual4.height=tempHeight;
    msgnonvisual5.height=tempHeight;
    msgnonvisual6.height=tempHeight;
    var temp = mx.core.UIObject.useLayoutManager;
    mx.core.UIObject.useLayoutManager = false;
    mx.managers.LayoutManager.updateNow();
    mx.core.UIObject.useLayoutManager = temp;
    msgnonvisual.text="";
    msgnonvisual1.text="";
    msgnonvisual2.text="";
    msgnonvisual3.text="";
    msgnonvisual4.text="";
    msgnonvisual5.text="";
    msgnonvisual6.text="";
    msgnonvisual.scaleX=currentScaleX;
    msgnonvisual.scaleY=currentScaleY;
    msgnonvisual1.scaleX=currentScaleX1;
    msgnonvisual1.scaleY=currentScaleY1;
    msgnonvisual2.scaleX=currentScaleX2;
    msgnonvisual2.scaleY=currentScaleY2;
    msgnonvisual3.scaleX=currentScaleX3;
    msgnonvisual3.scaleY=currentScaleY3;
    msgnonvisual4.scaleX=currentScaleX4;
    msgnonvisual4.scaleY=currentScaleY4;
    msgnonvisual5.scaleX=currentScaleX5;
    msgnonvisual5.scaleY=currentScaleY5;
    msgnonvisual6.scaleX=currentScaleX6;
    msgnonvisual6.scaleY=currentScaleY6;
    delete pj;
    msgnonvisual,msgnonvisual1, msgnonvisual2, msgnonvisual3,
    msgnonvisual4,msgnonvisual5,msgnonvisual6 are the non visual
    TextArea 's filled at runtime.
    can anyone guide me?
    thanks in advance!
    vinay

    hv anyone managed to see the code?

  • Printing multiple pages in Java...

    I have created a JEditorPane that needs to print multiple pages of html text. I have it printing out the first page but that's it. Also, text that is print out is cut off on the right hand side. Can anyone help me with this? My code is below. I left out the import statements for space.public class
    Browser_1 extends JFrame implements ActionListener//, HyperlinkListener
    public static void main(String[] args)
    new Browser_1("http://www.cnn.com/");
    protected JEditorPane htmlViewer;
    protected String initialURL;
    public Browser_1(String initialURL)
    setTitle("Browser_1");
    //this.initialURL = initialURL;
    //setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    JButton openButton = new JButton("Open");
    openButton.addActionListener(this);
    JButton printButton = new JButton("Print");
    printButton.addActionListener(this);
    JPanel buttonPanel = new JPanel();
    buttonPanel.add(openButton);
    buttonPanel.add(printButton);
    getContentPane().add(buttonPanel, BorderLayout.SOUTH);
    try
    htmlViewer = new JEditorPane(initialURL);
    htmlViewer.setEditable(false);
    htmlViewer.addHyperlinkListener(new _LinkListener());
    JScrollPane scrollPane = new JScrollPane(htmlViewer);
    getContentPane().add(scrollPane, BorderLayout.CENTER);
    catch (IOException ioe)
    warnUser("Can't build HTML pane for " + initialURL + ": " + ioe);
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    int width = screenSize.width * 8 /10;
    int height = screenSize.height * 8/10;
    setBounds(width/8, height/8, width, height);
    setVisible(true);
    //openDocument(new File("./htdocs/index.html"));
    private void openDocument(File doc)
    try {
         htmlViewer.setPage(doc.toURL());
    catch(MalformedURLException e)
         e.printStackTrace();
    catch(IOException e)
         e.printStackTrace();
    public void actionPerformed(ActionEvent event)
    String command = event.getActionCommand();
    if(command.equals("Open"))
    JFileChooser chooser = new JFileChooser();
    chooser.setFileFilter(new _FileFilter());
    if(chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION)
         openDocument(chooser.getSelectedFile());
    else if(command.equals("Print"))
    PrintUtilities.printComponent(htmlViewer);
    private void warnUser(String message)
    JOptionPane.showMessageDialog(this, message, "Error", JOptionPane.ERROR_MESSAGE);
    // Inner class implements the FileFilter interface for '.html' files
    class _FileFilter extends javax.swing.filechooser.FileFilter
    public boolean accept(File f)
    return(f != null && (f.isDirectory() || f.getName().endsWith(".html")));
    public String getDescription()
    return("HTML Documents (*.html)");
    // Inner class implements the HyperlinkListener interface
    class _LinkListener implements HyperlinkListener
    public void hyperlinkUpdate(HyperlinkEvent event)
    if(event.getEventType() != HyperlinkEvent.EventType.ACTIVATED)
    return;
    if(event instanceof HTMLFrameHyperlinkEvent)
    HTMLDocument doc = (HTMLDocument)htmlViewer.getDocument();
    doc.processHTMLFrameHyperlinkEvent((HTMLFrameHyperlinkEvent)event);
    else
    try {htmlViewer.setPage(event.getURL());}
    catch(IOException e) {e.printStackTrace();}
    class PrintUtilities implements Printable
    protected Component componentToBePrinted;
    public static void printComponent(Component c)
    new PrintUtilities(c).print();
    public PrintUtilities(Component componentToBePrinted)
    this.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 pageFormat, int pageIndex)
    double height = pageFormat.getImageableHeight();
    double width = pageFormat.getImageableWidth();
    int totalNumPages = (int)Math.ceil(componentToBePrinted / height);
    if (pageIndex >= totalNumPages)
    { return(NO_SUCH_PAGE); }
    else
    Graphics2D g2d = (Graphics2D)g;
    g2d.translate(pageFormat.getImageableX(), pageFormat.getImageableY());
    disableDoubleBuffering(componentToBePrinted);
    componentToBePrinted.paint(g2d);
    enableDoubleBuffering(componentToBePrinted);
    return(PAGE_EXISTS);
    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);

    A recent article in JavaPro has a nice solution for this problem. Check out
    http://www.fawcette.com/javapro/2002_12/online/print_kgauthier_12_10_02/
    It describes a way of using Views to break down the pages.

  • Need to Print "Terms and conditions" on every back side of the page

    Hi All,
    i have requirement like need to print "Terms and Conditions" text on every back side of page using adobe form.
    i have tried options like created created 4 pages in master page and defined flow content page1->page3, page2->page4(terms and conditions). but when we execute less items of the billing number got the 3 pages i.e page1 having item data, remaining 2 pages displays the  "terms and conditions" text.
    if any worked on the same kind of requirement please let me know and it would be great helpful to me.
    Thanks,
    Ramana

    Hi,
    One of the option is that you can create 3 pages in the Smartforms, e.g. A, B and C.
    A has print mode "D" (duplex) and next page "B"
    B has print mode " " (unchanged) and next page "A"
    C has print mode " " (unchanged) and next page " " (blank)
    B and C do not have a MAIN window - they just contain the Terms & Conditions  in a secondary window.
    At the end of the MAIN window on page A, insert the command NEW PAGE <C>.
    This will give you a print out that will be in a sequence
    A,B,A,B,...A,B,A,C.
    Regards,
    PP

  • Print multiple pages on one page in Preview?

    I tried to print a PDF in OSX Lion and I was unable to find the option to print multiple pages on one Page. Instead there is an option to print multiple copies of pages on one page. Does anybody know where I can find the old option from (as in Snow Leopard, Leopard, Tiger..)? (See screenshot.)
    Thanks!
    roboter

    Look under the "Vorschau" menu for the Layout menu, and then choose "Seiten pro Blatt."
    Hope this helps.

  • How do you get rid of white space when you are printing multiple pages to one sheet of paper?

    How do you get rid of extra white space when you are printing multiple pages to one sheet of paper?  When printing multiple pages to one sheet of paper Acrobat won't let you select the "zoom" for printing.
    Thanks

    Take a look at Quite Imposing.

  • How do I print multiple pages (2) to one A4 page?

    Hi folks,
    How do I print multiple pages (2) to one A4 page (as you can in a PDF) ?
    There is no option when I try to print & I have checked advanced etc. I have tried opening as a PDF. I have tried printing to PDF but it won't allow.
    Any ideas or suggestions would be greatly welcomed - I don't fancy printing the whole 188 pages, but I need them all!
    Thanks,

    Hi Chris,
    Try this, and if you have any trouble get back and we'll trouble shoot, but I think it will work for you.
    Open System Preferences.
    Select Print & Scan
    Click on your printer under Printers in the left pane
    Click "Open Print Queue", on the right
    The print queue app will appear on your Dock
    Open a Finder window containing your files to be printed and select them all
    Drag the files from Finder to Print Queue icon in Dock
    Regards,
    Jerry

  • Print multiple pages on a single page in word or from a PDF

    I need to print multiple pages on a single page from a PDF (ie: pages 1 and 2 onto a single page, pages 3 and 4 on a single page etc.)
    Does anyone know how to do this? Thanks

    (near the middle in a pull down menu - if you have the small print window click on the triangle next to the printer name to expand the window
    In preview the menu shows "preview" until you open it to see more - and
    if you have the small print window click on the triangle next to the printer name to expand the window
    LN

  • Any way to get more than 100% zoom on print jobs when printing multiple pages?

    I know how to increase the size of a print job, when I am printing one page at a time. But when I go to print 2 pages at once (the multiple page print function), there are always large margins around the page. I'm ok with saving paper and printing up two pages, but it seems silly to see small print and wide blank margins. Is there any way to increase the print zoom, when printing multiple pages per sheet of paper?

    I once overshot the limit by marking too many photos to fit within 99 pages, but I could never figure out how to fool the application and had to give up trying to add those 14 extra photos.
    I asked a friend (who practically lives in Terminal) if he had any way of modifying that limit, but he reminded me that if their printing services are set up to bind books and bill for only 99 pages, fooling the application might be useless if the service only prints me a 99 page book and discards the additional pages.
    I can understand that you wouldn't want to let people print 1000 page books, but I sent feedback anyway to allow me to increase the limit. Anyone know of any service that lets you print beyond iPhoto's limits?

Maybe you are looking for

  • PL/SQL throwing errors! trying to alter dates

    the following code keeps throwing errors, I was wondering if it is due to me getting confused when to use ":" before a variable and also ":=" when setting values? Can anyone see what I am doing wrong? Here is the code, at the moment it is throwing an

  • How do I hide an ap div tag or layer in order to access the table or image under it?

    Since Dreamweaver CC 2014 has gotten rid of the layers features I can't find out how to 'hide' my existing layers made in an older version in order to select the images or tables under it. I'm not a professional web designer, I just do this for my ow

  • Connect Macbook to Westinghouse Monitor - ?

    I am looking to buy a cable to connect my Macbook to an lcd monitor to get an extended display. I have a Macbook I bought in 2008 running on Mac OSX 10.5.8 and I want to connect it to a Westinghouse LCD Monitor model L1928NV. What cable/adaptor shoul

  • Video problem help quickly please

    i've downloaded a video and it doesn't work on my 5th gen iPod but i also downloaded a programe that converts videos that don't work on ipod to files that works on iPod like mp4 and mov stuff like that but the video i've downloaded is not a format th

  • Ipod classic error unknown -50

    I have a 160gb ipod classic,  when  synced with itunes and try to tranfer 8000 songs to it it will tranfer about 5500 (random number of songs) the it will show "unknown error -50 or -63", itunes will freeze and nothing would happen.  I've tried diffe