Giter Site home page Giter Site logo

Comments (6)

flaminestone avatar flaminestone commented on May 22, 2024

SetSpacingLine.docx
second example
docx.elements.first.spacing.line its too wrong

from ooxml_parser.

ShockwaveNN avatar ShockwaveNN commented on May 22, 2024

Implemented #202

from ooxml_parser.

flaminestone avatar flaminestone commented on May 22, 2024

SetSpacingBefore.docx
docx.elements[1].spacing.before is float again

from ooxml_parser.

ShockwaveNN avatar ShockwaveNN commented on May 22, 2024

Use docx.elements[1].paragraph_properties.spacing.before
not docx.elements[1].spacing.before

from ooxml_parser.

flaminestone avatar flaminestone commented on May 22, 2024

I think, you keep spacing in element objects for save compatibility. In this case, all properties in elements[1].paragraph_properties.spacing to be equal elements[1].spacing, but i have example, where its wrong
ApiParagraph.docx
docx.elements.first.spacing.after = 2.54 (not OoxmlSize object, but it is other history)
docx.elements.first.paragraph_properties.spacing.after = 0 (not OoxmlSize object too)
Maybe i missed something?

from ooxml_parser.

ShockwaveNN avatar ShockwaveNN commented on May 22, 2024

Actually in your example docx.elements.first.paragraph_properties.spacing.after is 1440 dxa
But generally speaking - DocxParagraph#spacing and DocxParagraph#paragraph_properties#spacing is not the same.
DocxParagraph#spacing use default values, so it always set, and other do not use default values, so if there is no spacing in document.xml second spacing will be nil. Need to parse spacing from styles.xml. Wait for implementation #140

from ooxml_parser.

Related Issues (20)

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.