Giter Site home page Giter Site logo

swestmoreland / office-document-properties Goto Github PK

View Code? Open in Web Editor NEW
11.0 11.0 6.0 196 KB

Read document properties from Microsoft Office Open XML documents.

Home Page: https://stevenwestmoreland.com/projects/office-document-properties.html

License: MIT License

JavaScript 100.00%
metadata microsoft node nodejs office xml

office-document-properties's People

Contributors

swestmoreland avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

office-document-properties's Issues

Vulnerable to prototype pollution

Hi,

I am expericing an issue with my build pipeline which runs an NPM Audit and fails with the message below. I have updated the xml2js package to v0.5.0 as indicated but the problem persists.

My version of office-document-properties is 1.1.0.

I sense that the issue lies in the dependency between these 2 pacakges and am hoping you can offer some advice on how to test/check/resolve?

NPM Audit:

Moderate xml2js is vulnerable to prototype pollution
Package xml2js
Patched in >=0.5.0
Dependency of office-document-properties
Path office-document-properties > xml2js
More info GHSA-776f-qx25-q3cc

node -v = v14.21.1

If i uninstall office-document-properties, then the npm audit passes fine.

Thanks

Chris

Getting Advance Properties/Custom

Can this be modified to read a property from the advanced custom area? If I am using a custom named property, how might I retrieve this information, Thanks in advance.

It returns an empty object

Hi, and thanks for sharing,

I have created a .docx document on Google Docs, and downloaded it,

I have run the following test:

  it.only('should detect meta data from .docx', (done) => {
    getDocumentProperties.fromFilePath(join(__dirname, 'test.docx'), (data, err) => {
      console.log(err);
      console.log(data);
      expect(true).toEqual(false);
    });
  });

I have the following result:

  ● convert docx to latex › should detect meta data from .docx

    expect(received).toEqual(expected) // deep equality

    Expected: false
    Received: true

      12 |       console.log(err);
      13 |       console.log(data);
    > 14 |       expect(true).toEqual(false);
         |                    ^
      15 |     });
      16 |   });
      17 | 

      at toEqual (src/docx2latex/tests/convert-docx2latex.test.js:14:20)
      at ZipFile.<anonymous> (node_modules/office-document-properties/index.js:63:9)
      at Immediate.<anonymous> (node_modules/yauzl/index.js:246:12)

  console.log src/docx2latex/tests/convert-docx2latex.test.js:12
    {}

  console.log src/docx2latex/tests/convert-docx2latex.test.js:13
    null

It seems not to be OK.

Read document properties from document created in Word online.

Hi,
First of all thanks for this cool library, works like a charm with the Word desktop version.
When I try to extract document properties from file created in the Word online I receive an empty object {}

Is it possible to have this feature in near future ot is there any known workaround?

Thanks.

Error when try to get document property

The errors are mainly:
invalid comment length. expected: 34010. found: 0
and
end of central directory record signature not found

Don't know why this happened. The doc files are all normal files. Nothing special.
error

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.