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

Using different docx based libraries do not function well together. #2988

Open
mayank1513 opened this issue Mar 11, 2025 · 4 comments
Open

Comments

@mayank1513
Copy link
Contributor

The root cause is some sort of internal mapping when new nodes are craeted.

For example

new Documnet({
   sections: [
    children: {
       Object.assign({}, new Paragraph("some text"));
    }
  ]
})

Produced an invalid document.

@mayank1513
Copy link
Contributor Author

@mayank1513
Copy link
Contributor Author

Possible solution - move relationship tracking logic to packer. Keep the rest of the classes free from relationship ids

@mayank1513
Copy link
Contributor Author

@mayank1513
Copy link
Contributor Author

@dolanmiu, any action plan for this? Can you help me understand how to fix this? It seems the compiler is heavily using the relationships created at the time of creating the elements, i.e., new Paragraph, new Run, etc.

Instead, if we could count/create fresh relationships at packer step, I could generate elements anywhere and add them to the document.

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

No branches or pull requests

1 participant