Skip to content

Commit eb1da66

Browse files
authored
Update page.rst
1 parent e2bfdb5 commit eb1da66

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/page.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,9 @@ In a nutshell, this is what you can do with PyMuPDF:
428428

429429
:arg dict linkdict: the link to be modified.
430430

431+
.. warning:: If updating / inserting a URI link (``"kind": LINK_URI``), please make sure to start the value for the ``"uri"`` key with an unambiguous string like ``"http://"``, ``"https://"``, ``"file://"``, ``"ftp://"``, ``"mailto:"``, etc. Otherwise -- depending on the browser -- unexpected default assumptions may lead to unwanted behaviours.
432+
433+
431434

432435
.. method:: get_label()
433436

@@ -1596,7 +1599,7 @@ Each entry of the :meth:`Page.get_links` list is a dictionay with the following
15961599

15971600
* *file*: a string specifying the destination file. Required for *LINK_GOTOR* and *LINK_LAUNCH*, else ignored.
15981601

1599-
* *uri*: a string specifying the destination internet resource. Required for *LINK_URI*, else ignored.
1602+
* *uri*: a string specifying the destination internet resource. Required for *LINK_URI*, else ignored. You should make sure to start this string with an unambiguous substring, that classifies the subtype of the URL, like ``"http://"``, ``"https://"``, ``"file://"``, ``"ftp://"``, ``"mailto:"``, etc. Otherwise your browser will try to interpret the text and come to unwanted / unexpected conclusions about the intended URL type.
16001603

16011604
* *xref*: an integer specifying the PDF :data:`xref` of the link object. Do not change this entry in any way. Required for link deletion and update, otherwise ignored. For non-PDF documents, this entry contains *-1*. It is also *-1* for **all** entries in the *get_links()* list, if **any** of the links is not supported by MuPDF - see the note below.
16021605

0 commit comments

Comments
 (0)