Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-12035

PDF printing/export of links is broken




      I use QTextEdit and its anchor/link functionality provided by QTextCharFormat::

      {anchor, anchorHref, anchorName}

      The PDF printout/export writes out any link information as "PDF external link object".
      So it works only for (web) links with a known scheme or for files with absolute path.

      It does not work and produces corrupted links in any other/the following cases:

      All local links targets - QTextCharFormat cfmt.anchor() == true and cfmt.anchorName() == "anchorname"
      are written as links with empty URL (not as targets/anchors in the document).
      You can click them (it is a bug too) but they lead to an error message.

      All links to local targets QTextCharFormat cfmt.anchor() == true and cfmt.anchorHref() == "anchorname"
      with empty scheme and file (only URL fragment) are written as "external" link with "anchorname".
      Adobe Acrobat Reader interprets them as link to the file "anchorname" in the current directory, other viewers not.

      How about file links? Does PDF support file links with relative paths? Otherwise it makes not really sense.

      Especially the local links/link targets are expected to be exported properly.

      A look into PDF files supposes that local links are written as two absolute rectangles (source/target) of the layouted document.

      What I want:
      A way (any way) to create local links inside an exported PDF document.
      (If PDF provides it A way to produce file links with relative paths.


        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.



              johnlayt John Layt
              juergen.billing Jurgen Billing
              5 Vote for this issue
              9 Start watching this issue



                Gerrit Reviews

                  There are no open Gerrit changes