Reg:Convert DOCX to HTML

Hi,
I want to convert a microsoft word document(docx) to html using code. Can anyone help me in this context ... The doc which I am trying to convert will have Bullets,bold,italic,Images etc ...
I am able to get the text but not the images and bullets ..
And also I need to convert the Whole Document whichj includes pictures,images,......etc.. to HTML as I need to embed that HTML while sending an EMAIL.
Please help me in this context
Thanks

Hi Vijay,
Thanks for the info.
I am using DOCX4J to convert the DOCX to HTML .I have successfully done the conversion and got the html format.I will be using the html format to embed it as EMAIL body to send an email.But I have some issues which are listed below....
Unable to display Images in EMAIL Body
Losing the Spaces and Bullets
Please find the code I used below,
WordprocessingMLPackage wordMLPackage;
wordMLPackage = Docx4J.load(new java.io.File(resourcePath2));
HTMLSettings htmlSettings = Docx4J.createHTMLSettings();
htmlSettings.setImageDirPath(imageFolder + resourcePath2 + "_files");
htmlSettings.setImageTargetUri(imageFolder +resourcePath2.substring(resourcePath2.lastIndexOf("/")+1) + "_files");
htmlSettings.setWmlPackage(wordMLPackage);
OutputStream os;
os = new ByteArrayOutputStream();
Docx4jProperties.setProperty("docx4j.Convert.Out.HTML.OutputMethodXML", true);
Docx4J.toHTML(htmlSettings, os, Docx4J.FLAG_SAVE_FLAT_XML);
DOCX = ((ByteArrayOutputStream)os).toString();
Please help me in this as this is very urgent.
Thanks..

Similar Messages

  • Convert Docx and doc to HTML in unix environment with CFMX7

    I have a web app that allows user to upload doc or docx files and converts it to HTML. I have CFMX 7 in a unix environment. Is there a custom tag that I could use for this conversion? I tried the cfx_word2html tag .. it converts .doc not docx. Please let me know. Thanks...

    I've been pleased with Aspose's Words component.  I use the .NET version, but a Java version is also available.  You could try using CFOBJECT plus the Words Java component to handle document conversion on your server.
    http://www.aspose.com/categories/file-format-components/aspose.words-for-.net-and-java/def ault.aspx

  • Converting docx to doc files using wordconv.exe

    Hello,
    I have a requirement wherein I need to convert the docx files to doc files. I looked around and found the "Microsoft Office Compatibility Pack for Word, Excel, and PowerPoint 2007 File
    Formats" ("http://www.microsoft.com/downloads/details.aspx?FamilyId=941B3470-3AE9-4AEE-8F43-C6BB74CD1466&displaylang=en"). Installing this would place a bunch of files in the C:\Program Files\Microsoft Office\Office12\ directory. This folder also contains an executable named "Wordconv.exe" which according to http://www.oooninja.com/2008/02/office-compatibility-pack-review.html converts the docx files to doc files if you use the execute something like the following in the command prompt:-
    "C:\Program Files\Microsoft Office\Office12\wordconv.exe" -oice -nme <input file> <output file>
    I downloaded the compatibility pack and tried the above command. Nothing happens. No error message,no output,nothing. I wonder what is the problem. In the above link,some guys have suggested to download the latest windows updates from Windows.
    Well,I tried this in my Windows XP (with Service Pack 2) and only thing I am left to install in service pack 3. Is that required? This WIndows XP machine does not have the Office 2007 installed. Is it required?
    Also,I tried this on a Windows server 2003 machine which also has the compatibility pack and result is same.This machine does have the Office 2007 installed.
    Am I missing anything? If yes,please let me know as I am kinda stuck in this. I dont want to use a commercial product like "Aspose.Words" for this.
    Is there any other tool available from Microsoft to convert docx to doc files? Please let me know. 
    I am cuurently looking into the Office tools.
    Thanks in Advance,
    Ashish

    Hello!
    I've got the same problem. I've tried to google it, and found this topic.
    Have you found the solution?
    Thanks, Victor.

  • Can I convert an existing html file to muse file?

    can I convert an existing html file to muse file?

    Hi,
    As of now Muse does not offer this option to convert an existing HTML file into a Muse file.
    However, I would request you to post this as a feature request on Ideas for features in Adobe Muse
    Regards,
    Rohit Nair

  • Error while converting document to html

    "ORA-06502: PL/SQL: numeric or value error: invalid LOB locator specified: ORA-22275"
    I use the procedure to convert the documents if it is not already converted before using procedure as follows
    PROCEDURE "STARDOC"."HTMLOUTPUT" (
    "DOCID" IN NUMBER) IS
    mklob clob;
    doccount number;
    errorcode number;
    errormessage varchar2(200);
    BEGIN -- executable part starts here
    SELECT COUNT(document_id) INTO doccount FROM docviewhtml where document_id=docid;
    --dbms_output.put_line(doccount);
    if doccount=0 then
         dbms_output.put_line('Document Not Found: Converting '||docid);
         --If document is not found run document coversion routine
         ctx_doc.filter('idxdocuments',docid, mklob,FALSE);
         INSERT INTO docviewhtml(document_id, html) VALUES (docid, mklob);
         COMMIT;
    elsif doccount=1 then
         --return;
         dbms_output.put_line('Document Found');
         --if document id found then return the document content
         null;
    else
         --dbms_output.put_line('Error occured');
         --need to deal with duplicate documents
         null;
    end if;
    dbms_lob.freetemporary(mklob);
    EXCEPTION
    --rollback when an exception occurs
         WHEN OTHERS THEN
              errorcode:=SQLCODE;
              errormessage:=SQLERRM;     
              dbms_output.put_line(sqlcode || ':' ||sqlerrm);
              ROLLBACK;
              LOGERROR(errorcode,errormessage);
    END "HTMLOUTPUT";
    i get the error when i convert large documents
    "ORA-06502: PL/SQL: numeric or value error: invalid LOB locator specified: ORA-22275"
    Also if there are any converion errors while converting documents to html. how to find them is there a log o fany sort.
    what is wrong. please help!
    Message was edited by:
    connect2sandeep

    You free your temporary lob, but never create it.

  • Page Size when converting .docx to pdf

    I am having an issue converting .docx to pdf. I am using a custom page size in word 2007 and saving it, but when i convert to pdf it uses the default 8"/11" format. I have seen it done, but can't get it to work consistently. I am using acrobat 8 pro. Can anyone help?

    What OS? Have you tried to make a custom page size for the Acrobat PDF printer drive?

  • Error in converting Spool to HTML format.

    Hi Gurus,
    I am reading SPool and converting that into HTML formt. Please do find below code for the same.
    Submit report to convert the spool to HTML format
      SUBMIT rspolst2 EXPORTING LIST TO MEMORY AND RETURN
      WITH rqident = p_spoolno.
      CALL FUNCTION 'LIST_FROM_MEMORY'
        TABLES
          listobject = gt_listobj
        EXCEPTIONS
          not_found  = 1
          OTHERS     = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Convert the spool to HTML format
      CALL FUNCTION 'WWW_HTML_FROM_LISTOBJECT'
       EXPORTING
       REPORT_NAME         =
         template_name       = 'WEBREPORTING_REPORT'
        TABLES
          html                = p_html_tab
          listobject          = gt_listobj.
    >>>>>>>>>>>>>>>>>>>
    And i send p_html_tab as attachement to email.
    When I opened the attachement, i can view only half page in htm.
    How can i get the full page in htm.

    First convert the spool to internal table by using FM
    RSPO_RETURN_ABAP_SPOOLJOB
    Next from internal table to HTML....
    Link: /people/rammanohar.tiwari/blog/2006/01/29/abap-utility-print-screen-to-html
    or try the following
    Please try the follwoing:
    1. define HTML internal table with ref to type W3HTML
    2. download it as BIN type and give total lenght of the strings as a parameter in the down load.
    See the code extract below:
    describe table html lines entries.
    read table html into w_html index entries.
    size = ( entries - 1 ) * 255 + strlen( w_html ).
    concatenate p_path file into file.
    call function 'WS_DOWNLOAD'
    exporting
    bin_filesize = size
    filename = file
    filetype = 'BIN'
    tables
    data_tab = html

  • Acrobat 9- convert pdf to html, not retaining format as original pdf.

    I'm needing to upload a completed irs form to my website. I have the pdf, but when i export or save as an html file, the image looks different. It is not retaining the original look/format of the pdf form.
    Alternatively, is there a way to export multiple pages into one single jpg, png or tiff file? my document is 34 pages.
    Any help is appreciated.
    Thanks,
    Amy

    HTML by its very nature has a varying format to meet the needs of the browser and screen. It should never be expected to see the same format when converting to HTML. Actually I am surprised you could even convert it to HTML since most IRS forms are secure and do not allow such operations. If you want to post it to your site for some reason, just post the PDF file itself.

  • Is there any way to convert psd to html through dreamweaver

    I am very new in websites and i want to know if is there any way to create themes for wordpres or convert psd to html with adobe dreamweaver?
    i have this website but i would like to create a new one.
    lajme

    With all the folks using mobile devices on the web now, the web trend has shifted significantly from heavy use of graphics to the power of CSS3 rgba, linear-gradients, border-radius, box- / text-shadows, transitions,  and SVG graphics.  
    CSS3 Generator
    http://css3generator.com/
    Ultimate CSS Gradient Generator
    http://www.colorzilla.com/gradient-editor/
    The upshot to all this is faster page loads with less bandwidth.  Of course, you must build to your target audience.  If that includes older, inferior browsers like IE8, then images might be a better choice for you.
    PSD to WordPress?  I'm not aware of any software that can do this for you.  It requires good coding skills and experience with WordPress Theme Development.
    http://codex.wordpress.org/Theme_Development
    Nancy O.

  • Conversion from .pdf to .docx: I have converted a text in Slovenian in .pdf, but all the accents are missing in the converted .docx. version

    Conversion from .pdf to .docx:
    I have converted a text in Slovenian in .pdf, but all the accents are missing in the converted .docx. version.
    Does Adobe have a converter for texts with European-language accents, or shall I cancel my subscription?

    Subscription for what: ExportPDF or Acrobat?
    [topic moved to Acrobat.com Services forum]

  • Dynamic Converter Not Returning HTML

    Hi,
    I'm trying to call get_dynamic_conversion service using RIDC on a word document to convert it to HTML. However, the service is not returning HTML but instead hda that starts as follows:
    <?hda version="11gR1-11.1.1.4.0-idcprod1-101229T001824" jcharset=UTF8 encoding=utf-8?>
    @Properties LocalData
    computedTemplateName=
    FileFormat=application/vnd.openxmlformats-officedocument.wordprocessingml.document
    RIDC Call:
    IdcClientManager manager = new IdcClientManager();
    IdcClient idcClient = manager.createClient("idc://localhost:4444");
    IdcContext userContext = new IdcContext("weblogic");
    DataBinder binder = idcClient.createBinder();
    binder.putLocal ("IdcService", "GET_DYNAMIC_CONVERSION");
    binder.putLocal ("dDocName", dDocName);
    binder.putLocal ("RevisionSelectionMethod", "LatestReleased");
    ServiceResponse respuesta = idcClient.sendRequest (userContext, binder);
    String html = respuesta.getResponseAsString();
    I can see the content item is been converted to HTML in the UCM and labelled as "Get Conversion". I'm also getting the html output when I access the content item as follows in the browser but in the application via RIDC.
    http://localhost:16200/cs/idcplg?IdcService=GET_DYNAMIC_CONVERSION&RevisionSelectionMethod=LatestReleased&dDocName=xxx_002
    Thanks,
    Raj

    Hi
    IdcService", "GET_DYNAMIC_CONVERSION need to be accompanied by the dID of the content that has to be HTML formatted .
    Thanks
    Srinath

  • I want to convert pdf to html

    Hello
    My English ability is ver poor sorry
    I want to read pdf and display in web page (use jsp)
    I have two problem
    first, read pdf by html (not just text, jpedal is good)
    sencond, save image(jpedal can do)
    but I can't know image position....
    anyway, I want to convert pdf to html
    plz recommend good library.

    codingMonkey wrote:
    DanCrintea wrote:
    HTML to PDF with Java, using OpenOffice.org - example here: [http://www.dancrintea.ro/html-to-pdf/|http://www.dancrintea.ro/html-to-pdf/]
    You can use OpenOffice.org, running as a server and command it remotely for document convertion.
    Besides HTML to PDF, there are also possible other convertions:
    doc --> pdf, html, txt, rtf
    xls --> pdf, html, csv
    ppt --> pdf, swf
    Code example:
    import officetools.OfficeFile; // this is my tools package
    FileInputStream fis = new FileInputStream(new File("c:/test.html"));
    FileOutputStream fos = new FileOutputStream(new File("c:/test.pdf"));
    // suppose OpenOffice.org runs on localhost, port 8100
    OfficeFile f = new OfficeFile(fis,"localhost","8100", true);
    f.convert(fos,"pdf");
    -----------------------------------------------------------------------------------------------------------------------------------------Methinks someone is close to getting their account blocked for resurrecting hordes of zombies.Indeed. Abuse already reported

  • Converted WinHelp to HTML Help and context-sensitive topics aren't working.

    Converted WinHelp to HTML Help and context-sensitive topics
    aren't working. Anyone run across this?

    I am a developer and we have big project that needs to be
    converted from winhelp to HTML help. I received only the .CHM help
    file from the help auther. I added the HTMLhelp.lib file and
    HTMLhelp.h file in to my project. I tried to change atleast one
    page of the dialog. I added on helpinfo function htmlhelp function
    call and hard coded the .chm file path and for the right click I as
    well did the same thing. But I am getting "No Help topic is
    associated with this item" upon F1 key and crash after the right
    click with wincore.cpp error.
    The code is as below.
    BOOL CCnvCfgGenNRecPage::OnHelpInfo(HELPINFO* pHelpInfo)
    // TODO: Add your message handler code here and/or call
    default
    if (pHelpInfo->iContextType == HELPINFO_WINDOW)
    int nCtrlId = pHelpInfo->iCtrlId;
    DWORD dwContextId = pHelpInfo->dwContextId;
    //THE NEW HTMLFUNCTION CALL
    ::HtmlHelp((HWND)pHelpInfo->hItemHandle,
    "D:\\vista_setup\\Patmob\\PatMob.chm",
    HH_TP_HELP_WM_HELP,
    (DWORD)&IDARRAY(nCtrlId, dwContextId)) ;
    THE OLD CODE
    ::WinHelp ((HWND)pHelpInfo->hItemHandle,
    AfxGetApp()->m_pszHelpFilePath,
    HELP_WM_HELP,
    // HELP_WM_HELP flag brings up pop-up help and expects an
    array
    // of DWORD pairs of the control ID and the context help ID
    (DWORD)&IDARRAY(nCtrlId, dwContextId));
    return TRUE;
    DO I NEED ANY OTHER FILE? Should I checked out the dialog h
    file and .hm file which compling the html related code?
    Regards,
    Kreena

  • How to convert pdf into html?

    Hi,
    I am an amateur ASP developer. I want to create a pdf viewer like http://www.scribd.com. But I want to convert PDF into HTML on the server and then display it to the client. I want to convert into HTML so that it can be browsed from mobile devices also. And I need the text to be searched client side.
    Can anyone help me? Give me any direction or hint on how to achieve this or where to start? Have anyone done this before?

    Irosenth,
    Thank you very much for your kind reply.
    Well, can you give me a clue from where to start? Is there any server component? or can ASP.NET help? Or from where I can get some information on converting PDF into html on server side?
    Look, everybody was a starter sometime. I want to do this.

  • How to convert XML or Html to Templates MS Word

    Now I have to do one job that convert XML or Html to MS Word (template).
    Does anyone have better ideas? Would you like share with me?
    Thanks.
    Joaquin Alem

    You can read both an XML and a well defined HTML document, using an XML parser. Although some HTML docs aren't well defined, ie. they don't strictly have matching begin & end tags, so an XML parser might reject them.
    Check out http://jakarta.apache.org/poi/ for Java interfaces to Ms Word functionality. It's basically a wrapper to the Ms Word COM objects.
    regards,
    Owen

Maybe you are looking for

  • Tv shows "music videos" still in library but do not transfer when syncing

    I have 2 music videos in my "tv shows" category on the iPod. When I sync the iPod, they do not transfer over. I can download them again and then I have them. I have done this 3 times. Now I have 3 of each of these two videos in my "tv shows" part of

  • How to convert 2 or more Excel files as tables in One Application

    Hi I have created one application according to apex demo using excel spreedsheet in which copying data is converted to table then when run application form and reports are produced. Now i created file in a similar way but it is taking only one sheet

  • Rebate relevance and Billing index recompilation

    Hello I am in the process of building the configuration for the system, particularly rebates. Initially the sales org was marked for rebate relevance, later unchecked and now checked once again. No rebate agreements have been created in system. 3 bil

  • Safari 4.0.2 page loading takes 3 minutes

    I just upgraded to Mac OS X 10.5.8 and Safari 4.0.2 can't load any page in less than 3 minutes. In addition, I get the message "You are not connected to Internet" on about 1 out 5 sites I try to open.

  • Is there a version for amd 64bit on windows 7 ultimate

    i am interested in knowing that if you provide a version of firefox on windows 7 ultimate with a amd 64bit? if you do how do i install this without losing my previous stuff from my 32bit version?