Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WordEmitter, DOCX: Improve current docx-output to simplify the created wpml-structure of docx #1957

Closed
speckyspooky opened this issue Nov 1, 2024 · 1 comment
Assignees
Labels
Milestone

Comments

@speckyspooky
Copy link
Contributor

The current word emitter has currently some challenges if the user tries to work with the result.
From user side the BIRT-docx isn't like a standrad word-document and it is not easy to change the word-documents based on the created huge count of grids and empty lines (paragraphs).

The main topics are:

  • The emitter creates for each HTML-text-element a wrapped grid.
  • Multiple specialized empty paragraphs will be used.
  • Based on this systematic of used wmpl-grids the additional empty paragraphs are necessary to avoid exceptions if docx-document will be opend.
  • The the header and the container area get a grid by default
  • The list element get for (BIRT-)styling reason a grid (which is fine) but with additional empty paragraph

Discussions were done before:

#1352 DOCX with additional lines add header and footer

#1879 DOCX grid arround all HTML-wrapped text paragraphs

Reserach result:

  • HTML-text grid-wrapped: The main reason is that the grid will be used for margin-padding implementation. And further investigations (debugging) shows that the main cause of the usage is the usage of the MHT-file for HTML-text and the wrong usage of supported HTML-style-attributes for MHT-HTML which can be converted/understand by Word.
    When the correct attributes will be used the margin is given like on my implementation of the Label-element.

  • Header-Footer-grind: Is not longer necessary because it has no specific effect (comfirmation of Word emitter generates extra paragraph markers in footer and header #1352). Different style tests had no negative effect if the container wasn't added. The positiv effect was the structure is easier and the empty paragraph won't be added.

  • List-element need the additional grid to implements the border effect. So it won't be changed but the empty paragraph isn't necessary.

Upcoming changes:

  1. Improve the MHT-file handling to activate the standard margin
  2. Allow the combination of margin & padding handling (point 1) to simulate the current handling
  3. Avoid the additional grid and paragraph on header & footer
  4. Avoid the empty paragraph of the list grid cell
  5. Add new standard option for WordEmitter-user properties
  6. All options can be controlled by user properties to change back the behavior because the docx-structure will be changed

Planned timeline:
I will implements these changes and will create a PR for BIRT 4.18

@speckyspooky speckyspooky added this to the 4.18 milestone Nov 1, 2024
@speckyspooky speckyspooky self-assigned this Nov 1, 2024
speckyspooky added a commit to speckyspooky/birt that referenced this issue Nov 4, 2024
wimjongman pushed a commit that referenced this issue Nov 6, 2024
* Optimization of docx emitter output (#1957)
* Optimized attribute handling and fixed review comments
@speckyspooky
Copy link
Contributor Author

This change is merged to the master with PR #1958

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant