Save a JSF page as word document

Hi All,
I have a simple JSF page with some generated content. In that page, there is a button as "save as word". When the link is clicked , i need the save dialog to appear and prompt the user to save the content in the JSP page as word document.How can i do this in JSF.
Please guide me in this regard.
Thanks & Regards,
Pals

I don't think this is easily achieveable, if even possible
A web page as you see it is the result of a web browser rendering the html in its own way. Different browsers can display the same html differently. So what gets displayed to the user is dependent on their browser.. In order to produce an image of what they see, you would need to somehow render the image differently depending on the value of the User-Agent header.
Maybe by hacking around the hotjava browser you could start to do something like this, but I'd imagine it would be quite messy and again different to what the user views.

Similar Messages

  • I am typing 3 page of Word Document.  It has locked up and has this round multi colored circle going around when mouse is on the document....help!!!  Why is it doing this

    I am typing 3rd page of Word Document.  It has locked up and a round multi colored ring turning when the mouse is on the document.  It will not allow me to save it or move forward?   Help!!!

    Hopefully Word's auto-save feature will have saved most of your work.
    If Word will not allow you to do anything, you have to force-quit the evil thing:  > Force Quit...

  • Im trying to save my cv as a word document and its not giving me the option to do when i save as

    im trying to save my cv as a word document and its not giving me the option to do when i save as

    Nathan,
    You don't say what version of Pages you are using or what version of the OS you are using. In general though, you can Export to Word format either from the File menu or the Share menu, and under some circumstances, when you Save, you can check a box to Save a Copy as: Word. Export is the best option from the point of view of being reliably available in either File or Share menus.
    Jerry

  • How do I save a pdf as a word document so I can type in it?

    how do I save a pdf as a word document so I can type in it?

    Hey David, add some security to it. You can even keep people from printing it if you want to, or even need a password to open it.
    J.R.

  • How to get number of pages in word document

    I am developing an OCR application where I need to get number of pages of word documents. I am currently assuming that each page consists of 46 lines but some how, I am not getting convinced with this logic. Is there any simplest way to get this information?
    Let me tell you that in the OCR system I am converting tiff iamges to .txt file and again reading txt file and counting number of pages based on number of lines.
    regards,
    Ranjan

    The number of pages depends on the font size, length of each line and any page break in between.
    You could just say, one page per 46 lines, it depends on how accurate you must be.
    Why not count the number of pages you scanned?

  • Why when i save my indesign file down to an earlier version does it only save the first page of my document?

    why when i save my indesign file down to an earlier version does it only save the first page of my document?

    This forum is about the Cloud as a delivery process, not about using individual programs
    If you start at the Forums Index http://forums.adobe.com/index.jspa
    You will be able to select a forum for the specific Adobe product(s) you use
    Click the "down arrow" symbol on the right (where it says ALL FORUMS) to open the drop down list and scroll

  • Is there a way to set the default Initial View to Bookmarks Panel and Page on word documents that I save as PDF?

    When I save my word 2013 documents as Adobe PDF I have to open the PDF up, go to File>Properties>Initial View>Navigation Tab and then set the initial view as Bookmark Panel and Page; it gets pretty tedious.
    I use Save as Adobe PDF rather than Print to Adobe PDF Printer because I like being able to have the security settings automatically set.
    I just want to be able to save my word document as Adobe PDF with the initial view already set as Bookmark Panel and Page, and with security, so I can send it out immediately.
    Is this possible?
    Thank you.

    Use the Firefox Android Addon - Phony
    *https://addons.mozilla.org/en-US/android/addon/phony
    for more
    *https://addons.mozilla.org/en-US/android/

  • Save content of a JSP page to word document

    I am using jsp page to fill data to the page & download the page as a word file
    response.setContentType("application/vnd.ms-word");
    response.setHeader("content-disposition","attachment; filename=Application.doc");
    This page download asking open save dialog box.
    when we open this it gives other save dialog box.
    Can u help me.
    Thanks

    Hello Boris!
    You can use the WordRpt_NewPage function to add a new page into an opened word document.
    Here is some documentation about this function: http://zone.ni.com/reference/en-XX/help/370051Y-01​/toolslib/functionreference/cviwordrpt_newpage/
    You'll also find useful hints on how to use it in the sample program that ships with CVI: <samples>\activex\word\wordrpt.prj.
    Best regards!
    - Johannes

  • Writing html page into word document

    HI,
    I want to write the HTML document using java code in to a word document.
    When I save the webpage as word document. It's properly saving the font...
    I almost did it with following code but the font is missing it is just writing all the text in single font.I want the exact replica of the html page in to the word document.Plz help me out with some input.
    Thanx in advance.
    Regards,
    Ashok.
    public String readContent(){
    String contText="";
    EditorKit kit = new HTMLEditorKit();
    Document doc = kit.createDefaultDocument();
    // The Document class does not yet
    // handle charset's properly.
    doc.putProperty("IgnoreCharsetDirective",Boolean.TRUE);
    try {
    // Create a reader on the HTML content.
    Reader rd = getReader(fileName);
    // Parse the HTML.
    kit.read(rd, doc, 0);
    // Iterate thsrough the elements
    // of the HTML document.
    //ElementIterator it = new ElementIterator(doc);
    //javax.swing.text.Element elem;
    //while ((elem = it.next()) != null) {
    //SimpleAttributeSet s = (SimpleAttributeSet)elem.getAttributes().getAttribute(HTML.Tag.A);
    // code to read the content
    int nleft = doc.getLength();
    Segment text = new Segment();
    int offs = 0;
    text.setPartialReturn(true);
    while (nleft > 0) {
    contText+=doc.getText(offs,nleft);
    System.out.println(contText);
    // do someting with text
    nleft -= text.count;
    offs += text.count;
    if(nleft > 0)break;
    /*if (s != null) {
    //System.out.println(s.getAttribute(HTML.Attribute.HREF));
    System.out.println(s.getAttribute(HTML.Attribute.HREF));
    } catch (Exception e) {
    e.printStackTrace();
    //System.exit(1);
    return contText;
    } //end of reading content method
    static Reader getReader(String uri)
    throws IOException {
    if (uri.startsWith("http:")) {
    // Retrieve from Internet.
    URLConnection conn = new URL(uri).openConnection();
    return new InputStreamReader(conn.getInputStream());
    } else {
    // Retrieve from file.
    return new FileReader(uri);

    Maybe Im missing something here, but where are you doing anything using MS Word? I see you write the text to std out but where does it go to a word document? How do you create the word document, using JNI or is it a java API?

  • How to insert a new page to word document

    Does anybody knows how i can insert  a new page to the opened word document ?
    I am searching for the documentation for the activex word functions and i have no idea where i can find it ?
    I am using LabWindows CVI 8.5.

    Hello Boris!
    You can use the WordRpt_NewPage function to add a new page into an opened word document.
    Here is some documentation about this function: http://zone.ni.com/reference/en-XX/help/370051Y-01​/toolslib/functionreference/cviwordrpt_newpage/
    You'll also find useful hints on how to use it in the sample program that ships with CVI: <samples>\activex\word\wordrpt.prj.
    Best regards!
    - Johannes

  • Trying to e-mail a 'page' but it claims it is 60MB size if sent as page or word document. By PDF it is 350KB?

    I have created two pages of Newsletter. Unfortunately when I try to e-mail it to a friend the attachment says the size is 62MB if I share it using Pages or Word. However if I e-mail using PDF format the attchment is 355KB only. What is wrong?

    In Pages, there are two menu items: Format/Image/Reduce Image File Size and File/Reduce File Size. If you have some very large images that you have shrunk down or masked, your Pages file still has the original large images as part of the file.  The first menu item reduces the size of a selected image, the other reduces the size of all images.  But once you've done it, you can't go back (or maybe with Revert Document you can).  I don't know exactly how this works in the latest version of Pages, whether it keeps the previous version and the file still remains huge or whether it works as advertised as it did in the older versions.  Duplicate your file then try it and see what happens.
    I assume Pages does the resizing and cropping when creating a PDF version of your document, which is why it is a much smaller file.

  • Importing a 900 page MS-Word document to InDesign CS 6

    The Word document has course descriptions of all the classes offered at a community college. The need is to have two columns(textboxes of equal size)
    in each page of the InDesign document and then bring the information from the Word document to InDesign so that when it is printed, it can be like information in a telephone directory as
    Page 1
    Column 1 data Column 2 data
    Page 2
    Column 1 data Column 2 data
    and so on.
    The Word document is like
    Page 1
    Page 1 data
    Page 2
    Page 2 data
    I understand using the Place option in File menu, the Word document can be imported, but how can the information be
    brought over so that it flows in the two columns of each InDesign page. If I do an import now, the InDesign pages are like
    Page 1
    Page 1 data
    Page 2
    Page 2 data
    I selected the Import options while using the Place option in File menu and chose
    Use Indesign formatting in case of a conflict.
    1. Is there a way to bring the information from the Word document so that it flows in the two columns of each InDesign page without loss of formatting? The MS-Word document has bold text, headings, sub-headings etc.
    I would appreciate any suggestions.

    Thanks Peter,
    I found it in Story Editor View, took the text(Cut) and tried pasting it in the next line, but did not work. I pasted the text to Notepad so that formatting is removed, then tried pasting it in InDesign, but it still did not paste.
    How can I find out what is causing it and how can it be fixed?
    The Word document has all the information in a table(with no borders). I cannot get ID to import it. I tried "Remove styles and formatting from text and tables" option in Show Import Options, "Remove styles and formatting from text and tables" option with Preserve Local overrides checked so that tables can be converted to unformatted tables or unformatted tabbed text, but it did not work.
    Thanks a lot for your prompt responses and time in this thread.

  • Pages reformats Word documents

    I'm going to be purchasing a new MacBook Pro in the next few weeks, so I stopped by the Apple Store at The Grove to check whether Pages reformats Word .docs.  Upon importing one of my three archaeological research papers, which consist of text and hundreds of images, Pages reformatted the entire document.  Short of going through and resizing the images, is there a way of importing a Word .doc into Pages so it does not reformat my documents, as I'd really like to dump Word.

    Tom, thanks for the reply.  Tried the 'Fresh' & 'Stable' versions of Open/LibreOffice, and both reformated my documents almost as much if not more so than 'Pages', on top of which the images are washed out, as compared to how they look in 'Word'.  I also couldn't find a way to print them as compressed .pdf files in Open/LibreOffice as I can in 'Word'.  For example, my 1st paper 'Orthostat, the Mound of the Hostages' is 24.5mb 'Word' .doc.  When printed as a .pdf, it's 38.7mb, whereas the compressed .pdf is 3.6mb, although the labeling on some of the images in the compressed files are slightly blurry.  The reason for compressing the files, is that no one wants to download a 146.2mb document, as in the case of my 3rd paper 'Petroglyphs, the Art of Ancient Landscapes', which when compressed is only 12.6mb.
    You can see what I'm referring to as far as the images are concerned by viewing my papers on Academia.edu.
    https://independent.academia.edu/SeanMoriarty
    That being said, it's quite apparent I'm going to have to stick with 'Word' 2008, which I'm hoping is compatible with 'Mavericks' and Apple's next version of OS 10, 'Yosemite', otherwise I'm going to have to shell out another $100+ for Office 2011.

  • Delete a Page in Word Document

    I want to run a macro to delete the 3rd (and it is also the last) page of a document.  I've found the following code in the forum:
    Selection.HomeKey wdStory
    Selection.Goto What:=wdGoToPage, Count:=3
    Selection.Bookmarks("\Page").Select
    Selection.Delete
    However, when the macro hits the first line, it gets a run-time error 438 Object doesn't support this property or method.
    Interestingly, others responded that this code worked fine. 
    What am I missing?
    Thanks,
    AGI_MEG

    Where is the cursor when you run the macro?
    The problem when attempting to delete 'pages' in a Word document is that Word is not a page layout application. There are no 'pages' in a Word document, only text flowed into a document container which comprises a variety of story ranges. When attempting
    to delete a 'page' it helps to know what is on that 'page'.
    However if you want to delete the last 'page' of a document, then the following may work for you. Ensure the cursor is in the body text of the document.
    Sub Delete LastPage()
    Dim PageCount As Long
    Dim orng As Range
        Selection.EndKey wdStory
        PageCount = Selection.Information(wdActiveEndPageNumber)
        Selection.GoTo What:=wdGoToPage, Count:=PageCount
        Set orng = Selection.Bookmarks("\Page").Range
        orng.End = orng.End + 1 'ensures no empty page at the end after removal.
        orng.Delete
    End Sub
    Graham Mayor - Word MVP
    www.gmayor.com

  • Pages vs Word Documents

    I created a document in pages and saved it as a word document. When i tried to open the same document in pages, it opened a dialogue box "the document test123 cannot be opened"

    Prior to Pages 3 there was just a single mode. It's clear that lots of people were very confused by the merging of word processor and page layout modes - people found themselves with all kinds of weird things happening in their documents directly as a result of this program design. It was a power feature of Pages but until the concept was firmly grasped by the user bad and confusing things could (and did) happen. Thus, the decision by Apple to separate the two.
    For old and experienced Pages users, it looks like you can keep using Pages pretty much as you have in the past. What's called Word Processor mode is basically the old Pages. If you want to know how to get at the old Pages 2 templates, let me know. The new Pages 3 page layout templates use the new page layout mode.
    Speaking of which, the new Pages 3 layout mode is a blank canvas - there is absolutely nothing there until you begin inserting things onto it. (In Pages 1 and 2 the empty document had a full page text entry block in it.) For AW users, think of the page layout mode as an empty AW draw module.
    You cannot shift between the two modes, once you've made your design decision you are stuck with it. Since the Word Processor mode is just like the old versions of Pages, if you aren't sure what you intend to wind up with, start there.

Maybe you are looking for

  • Can I get apps back on boyfriends phone after iTunes deleted and replaced with mine after syncing and upgrading to iOS 5?

    Hi, PLEASE HELP!!  Last night my boyfriend asked me to sync his phone as he had purchased a new app and it was required to connect to iTunes to finish installing, so we did this, it took forever!!  It also prompted us to upgrade to iOS5, which we did

  • Confused about pointers

    how do pointers work in java? for example - does a linked list just store pointers to objects? so if you add the same object to 2 linked lists, and then use get(index) in the first list to change that object somehow, would the object in the other lis

  • Today's iOS update did not fix purchased apps from crashing

    Guess we have to continue waiting.

  • NSMatrix  Radio Group Problem

    Hello ! I have a problem . I created two radio box and associated this object to an action (call radio) Here's my code : -(IBAction)radio:(id)sender { NSButtonCell *selCell = [sender selectedCell]; if([selCell tag] == 1) [trans setEnabled:YES]; [load

  • Using CSS for portal theme

    Hi, I have 1 css file which I should use to build the EP theme. This theme will be used by all the web dynpro applications deployed on this portal. Is there any way i can use the CSS file directly rather than using the theme editor in NW developer st