Bug 167490 - PDF export: extend PDFViewSelection parameter with value to remove external links
Summary: PDF export: extend PDFViewSelection parameter with value to remove external l...
Status: ASSIGNED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
26.2.0.0 alpha0+ master
Hardware: All All
: medium enhancement
Assignee: Floris
URL:
Whiteboard:
Keywords: needsUXEval
Depends on:
Blocks: PDF-Export-Options-Dialog
  Show dependency treegraph
 
Reported: 2025-07-13 10:34 UTC by Floris
Modified: 2025-07-13 18:24 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Floris 2025-07-13 10:34:34 UTC
Description:
In PDFWriter, we currently already have a parameter (called PDFViewSelection in the cli, DefaultLinkAction in the code) that can be used to configure how hyperlinks to locations outside the document should be emitted.

I would like to extend it with an option to tell it to NOT emit pdf link annotations at all for external links, effectively removing all external links from the document.

Actual Results:
Current available CLI options for PDF generation ( https://help.libreoffice.org/latest/en-US/text/shared/guide/pdf_params.html?&DbPAR=SHARED&System=MAC#links ):


PDFViewSelection

Specifies the way the exported PDF will be viewed (experienced) by the user. Possible values are:

0: Specifies that the PDF will be exported with all the links external to the document treated as URI. This is the Default

1: Specifies that the PDF will be exported in order to be viewed through a PDF reader application only. Valid only if not exporting to PDF/A-1 (e.g. SelectPdfVersion not set to 1).

2: Specifies that the PDF will be exported in order to be viewed through an Internet browser, using the PDF plug-in provided with it. The bookmark of the URI will be rendered compatible with the target bookmark generated with LibreOffice PDF Export feature (see ExportBookmarksToPDFDestination).


Expected Results:
Would like to change the available options to:


PDFViewSelection

Specifies the way the exported PDF will be viewed (experienced) by the user. Possible values are:

0: Specifies that the PDF will be exported with all the links external to the document treated as URI. This is the Default

1: Specifies that the PDF will be exported in order to be viewed through a PDF reader application only. Valid only if not exporting to PDF/A-1 (e.g. SelectPdfVersion not set to 1).

2: Specifies that the PDF will be exported in order to be viewed through an Internet browser, using the PDF plug-in provided with it. The bookmark of the URI will be rendered compatible with the target bookmark generated with LibreOffice PDF Export feature (see ExportBookmarksToPDFDestination).

3: Specifies that the PDF will be exported without links external to the document.



Reproducible: Always


User Profile Reset: No

Additional Info:
-
Comment 1 Buovjaga 2025-07-13 13:14:34 UTC
Patch: https://gerrit.libreoffice.org/c/core/+/187800
Comment 2 Buovjaga 2025-07-13 13:15:19 UTC
Let's involve UX as this adds a new option.