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: -
Patch: https://gerrit.libreoffice.org/c/core/+/187800
Let's involve UX as this adds a new option.
Floris Bos committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/32aa68a652007a718f9e3f41b49e191f0527d518 tdf#167490: PDF export: add option to disable external links in PDF It will be available in 26.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
This milk has been spilt. Another item in the list of radio buttons is a bit odd because it could be the default mode too following the UI. Better layout would be an extra checkbox that disables the radio buttons, if checked. Anyway, keep the implemented solution IMO as is not totally wrong.