dolanmiu / docx

Easily generate and modify .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.
https://docx.js.org/
MIT License
4.44k stars 486 forks source link

PageReference returns with 1 at all. #2686

Closed idavidka closed 6 months ago

idavidka commented 6 months ago

Adding bookmarks and using internal hyperlinks works as intended. If I try to add a PageReference to any Paragraph, it always returns with 1, even if the bookmark is on other page.

Tested with latest docx, 8.5.0. Issue also happening with your sample code. OS: macOS Ventura 13.5

https://github.com/dolanmiu/docx/blob/022b25cfcd33cd2ab9456f4b16cbc01ec3a1ed63/demo/21-bookmarks.ts#L69

Screenshot 2024-05-14 at 9 47 28