Graph content?format=pdf drops hyperlinks when the document is 2 or 3 pages long

Luke Niesink 0 Reputation points
2026-10-29T09:13:54.6233333+00:00

We convert DOCX files to PDF server-side with GET /users/{id}/drive/items/{item-id}/content?format=pdf. Hyperlinks go missing in the PDF, but only for documents of 2 or 3 pages:

Pages Link annotations per page (2 expected on every page)
1 2
2 0, 2
3 2, 0, 0
4 2, 2, 2, 2
5 2, 2, 2, 2, 2
6 2, 2, 2, 2, 2, 2

The test files are minimal DOCX files built from scratch: one heading and two ordinary hyperlinks (w:hyperlink, external relationship) per page, pages separated by a hard page break. They differ only in page count. The text renders fine; only the link annotations are missing.

A real 3-page document (headers/footers, images, no hard page breaks) shows the same pattern: only the links on page 1 survive, and adding a fourth page fixes it. Desktop Word (Microsoft 365 Apps 16.0.20527.20088, Save As PDF) keeps all links for the same files.

This looks like the page-count-dependent link loss that was reported for desktop Word in 2021–2022 (for example https://learn.microsoft.com/en-us/answers/questions/5155032/word-save-as-pdf-breaks-hyperlinks), but now in the server-side conversion.

Questions:

  1. Is this a known issue in the Graph / OneDrive conversion service?
  2. Is there any supported way to preserve hyperlinks with this endpoint, since it accepts no conversion options?

Minimal repro files and a curl script are available on request.

Microsoft Security | Microsoft Graph
0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.