Re: How to Create Internal Hyperlinks in Apache POI

Dominik Stadler <[email protected]> Fri, 10 May 2024 06:48:20 +0200
Newsgroups gmane.comp.jakarta.poi.user
Message-ID <CABdJj57bQkwf8wMEPaqiHpLT3GwmY0oTBtG-3vn9HOBy3wJVNA@mail.gmail.com>
--0000000000006f31b00618123f5d
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi,

you can create two minimal example documents, one with and one without the
hyperlink and then unzip the "docx" files (they are actually compressed
zip-files) and compare the files.

There is a tool in Apache POI sources called
"org.apache.poi.ooxml.dev.OOXMLPrettyPrint" which can help to make the two
files easier to compare.

Regards... Dominik.

On Wed, May 8, 2024 at 11:25=E2=80=AFAM =E4=B8=B6=E5=8F=B6=E8=90=BD <984149=
[email protected]> wrote:

> Hi Apache POI Community,
>
> I'm currently working with Apache POI 5.0.0 to manipulate Word documents
> and I'm facing a challenge with creating internal hyperlinks that point t=
o
> bookmarks within the same document.
>
> I've tried using XWPFHyperlinkRun and other related classes/methods, but
> it seems that these are interpreted as external links rather than interna=
l.
> I've searched through the documentation and various forums, but I couldn'=
t
> find a definitive solution that supports internal hyperlinks.
>
> Is there any way to create internal hyperlinks using Apache POI, or is
> there a patch or workaround available that I might not be aware of? Any
> guidance or examples would be greatly appreciated.
>
> Thank you!
>
> Best regards, [kaiwei]
>
>
>
> =E4=B8=B6=E5=8F=B6=E8=90=BD
> [email protected]
>
>
>
> &nbsp;

--0000000000006f31b00618123f5d--