Giter Site home page Giter Site logo

officetohtml's People

Contributors

meshesha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

officetohtml's Issues

pptx with linked video error

the powerpoint generated with office365 works fine with other pptx conversion engines like pdf2htmlex and libreoffice backends. I have a single slide with a youtube, vimeo and directly embedded mp4 file (otherwise blank)

pptxjs.js:7130 Uncaught TypeError: Cannot read property 'asArrayBuffer' of null
    at processPicNode (pptxjs.js:7130)
    at processNodesInSlide (pptxjs.js:618)
    at processSingleSlide (pptxjs.js:540)
    at processPPTX (pptxjs.js:306)
    at convertToHtml (pptxjs.js:177)
    at Object.load (pptxjs.js:142)
    at FileReader.reader.<computed> (filereader.js:369)

(ps. Have you considered upgrading your JSZip to version 3 ?)

The slide xml looks like this

            <p:pic>
                <p:nvpicpr>
                    <p:cnvpr id="3" name="Online Media 2" title="Installing a new driveway">
                        <a:hlinkclick action="ppaction://media" r:id="">
                        </a:hlinkclick>
                        <a:extlst>
                            <a:ext uri="{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}">
                                <a16:creationid id="{A134D3CB-B0C9-40B7-86DD-239265D1B5E2}" xmlns:a16="http://schemas.microsoft.com/office/drawing/2014/main">
                                </a16:creationid>
                            </a:ext>
                        </a:extlst>
                    </p:cnvpr>
                    <p:cnvpicpr>
                        <a:piclocks nochangeaspect="1" norot="1">
                        </a:piclocks>
                    </p:cnvpicpr>
                    <p:nvpr>
                        <a:videofile r:link="rId3">
                        </a:videofile>
                    </p:nvpr>
                </p:nvpicpr>

and the rels has these properties

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
    <relationship id="rId8" target="../media/image2.jpeg" type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image">
    </relationship>
    <relationship id="rId3" target="https://www.youtube.com/embed/ey_NEoM2SpM?feature=oembed" targetmode="External" type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/video">
    </relationship>

looks like

            var vdoNode =  getTextByPathList(node, ["p:nvPicPr","p:nvPr","a:videoFile"]);
            var vdoRid,vdoFile,vdoFileExt,vdoMimeType,uInt8Array,blob,vdoBlob,mediaSupportFlag=false;
            var mediaProcess = settings.mediaProcess;
            if(vdoNode !== undefined & mediaProcess){
                vdoRid = vdoNode["attrs"]["r:link"];
                vdoFile = warpObj["slideResObj"][vdoRid]["target"];
                uInt8Array = zip.file(vdoFile).asArrayBuffer();
                vdoFileExt = extractFileExtension(vdoFile).toLowerCase();
                if(vdoFileExt=="mp4" || vdoFileExt=="webm" || vdoFileExt=="ogg"){

doesn't take into account that the matching vdoRid might be a hyperlink not a relative path. You probably need to account for that before you try grabbing the array buffer of the zip file object.

Error in opening pptx

I was trying to open a valid pptx. I cloned the repo and replaced the demo.pptx with the pptx that I have. When I opened the demos.html, I'm getting the below error in my console.

pptxjs.js:7256 Uncaught TypeError: Cannot read property 'slideMasterTextStyles' of undefined
at genTextBody (pptxjs.js:7256)
at genTable (pptxjs.js:7825)
at processGraphicFrameNode (pptxjs.js:7217)
at processNodesInSlide (pptxjs.js:621)
at processSingleSlide (pptxjs.js:540)
at processPPTX (pptxjs.js:306)
at convertToHtml (pptxjs.js:177)
at Object.load (pptxjs.js:142)
at FileReader.reader. (filereader.js:369)

The pptx that I've is valid and openable with microsoft powerpoint.

Adding header value to document request

Hello, when reading a remote file is it possible to add a header value to the request made?

var file_path = "path/to/file.pptx";
$("#resolte-contaniner").officeToHtml({
url: file_path
});

l10n support for unknownMsg

hi, firstly thank you for the great project.
PDF content supports l10n for localization, but if the content is invalid or unknown, the error message is not translated.

Looking forward to your reply, thanks!

pdf.js not found in magento2

$("#resolte-contaniner").officeToHtml({
url: file_path,
pdfSetting: {
setLang: "",
setLangFilesPath: "" /"include/pdf/lang/locale" - relative to app path/
}
});

require.js:168 Uncaught Error: Module name "mixins!undefined/pdf/pdf.js" has not been loaded yet for context: _. Use require([])

how to use in magento2 please give steps.

'moz-chunked-arraybuffer' error

I keep getting error as follows:
"The provided value 'moz-chunked-arraybuffer' is not a valid enum value of type XMLHttpRequestResponseType."

I guess that pdf.js that has been updated in the original repo but has not been updated here is the culprit.
Could you please check the error.

Numbering Restarted From 1

I wrote a docx document with numbering as heading but when it rendered with officetohtml, the numbering restarted from 1 (not continued).

Support for other office file format

First of all let me thanks to you for making such useful library, This is really nice library I found on internet which is supporting .docx, .pptx, .xlsx.
While I'm curious about if you are planning for supporting other format like .doc, .ppt, .xls. Right now when selecting these files showing error that it is not supported.

This type of error for other documents.
image

Just let me know if there is plan for supporting other documents? or any method to convert doc to docx, ppt to pptx, xls to xlsx?

Locale properties and certain files not being found in Jquery with Django

I am getting the 404 errors for locale properties, pdf.worker.js when running it in Django. The pdf.worker.js is in the same director with pdf.js but it seems pdf.js requires the locale.properties and pdf.worker.js in a certain directory like /include/....

The files are placed in the static folder such as app/static/app/css or js. Do those files have to be placed in a certain way? How can those be worked around in this case?

The formatting of the HTML is not same as the word document

First off, this tool is amazing. I am able to read the office docx file and its converted to HTML on to by aspx web page. But it looks like the html content of the word is not of the same format of the docx file. Like the spacing, size of the images(images come in full size on the html). Is it the expected behavior of the plugin ? or am I missing something ?

Confusing dependencies

In the usage page, The first step includes multiple dependencies, and the links for downloading those dependencies are not provided. It would be great if someone could point me in the right direction.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.