Code Monkey home page Code Monkey logo

docx-builder's People

Contributors

raulbojalil avatar

Stargazers

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

Watchers

 avatar  avatar

docx-builder's Issues

Problem merging tables : changing format

Hi,
I'm trying to merge a single document with the "insertDocxSync" function and the merge seems to mess with my tables format (and font).

Here's the code :

let builder = require('docx-builder')

var docx = new builder.Document();

docx.insertDocxSync(__dirname + '/Test/test.docx');

docx.save(__dirname + "/Test/output.docx", function (err) {
  if (err) console.log(err);
  console.log('done');
});

and here is my test file :
test.docx

and my output file :
output.docx

I am using word 2013, Windows 10 x64 and node v6.11.2<

Thanks! :)

Problem with section breaks and multiple columns

Hi @raulbojalil, I didn't know if you saw that comment after you closed #2 , so i created this new issue :

I ran into two small issues that concerns sections breaks and columns :

  1. When I insert a continuous section break into a .docx document and i merge it into a new one, it generates an invalid result. When i try to open it with Microsoft Word I see this :
    image

And when i inspect the generated document.xml file, there are 2 closing xml tags missing at the very end (plus the content is missing (I guess the two are related)):
image

Here's the test file :
test.docx

And the obtained result :
result.docx

  1. When I try to merge a document that has 2 columns initially, it gets back to a single column document in the generated file (and the column break acts like a page break).

Here's the test file :
test.docx

And the result :
result.docx

And here's what i found while investigating this issue :
image

Hopefully this will help :)

Problem with merge specific file

013.docx
When I try to merge this file this error appears:

TypeError: Cannot read property '_data' of null
    at exports.Document.getExternalDocxRawXml (/*****/node/node_modules/docx-builder/index.js:293:28)
    at exports.Document.insertDocxSync (/*****/node/node_modules/docx-builder/index.js:314:18)

Problem merging section break with Page layout changing (Horizontal / Vertical)

Hi @raulbojalil, hope you're doing well!

I ran into this issue while trying to merge a document which contains a section break with a page layout change (one page with vertical layout, the next one with horizontal layout) into an empty builder.document().

Here's my sample code :

var builder = require('docx-builder')
var docx = new builder.Document()

docx.insertDocxSync(__dirname + '/test.docx')

docx.save(__dirname + '/result.docx', function(err) {
  if (err) console.log(err)
})

and the test file :
test.docx

Here's the result file :
result.docx

and here's what I obtain when I open the result.docx document :
image

Thanks for your help!

This tool doesn't work with images.

Merging Word documents (.docx) with images in them does not work. It creates a placeholder (like an empty white space) in the final file, but the original image does not appear.

Here's what the final document looks like:

screen shot 2017-07-27 at 2 32 01 pm

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.