Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. How to open PDF files per link in Qt5-Assistant-Help?
QtWS25 Last Chance

How to open PDF files per link in Qt5-Assistant-Help?

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
pdfqt assistant
2 Posts 2 Posters 517 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SemP
    wrote on last edited by
    #1

    Are there some help or working examples for *.qhcp *.qhp files with links to PDF files?

    What possibilities are supported (local PDF files with relative or absolute paths to them, PDF files on the web, Qt internal PDF Rendering, call of external Viewer like okular...)? Syntax? Do I need any system/os settings outside of Qt-Assistant, e.g. permissions?

    My experience on Ubuntu 22: files obtained by conversion from old Qt4 *.adp files -> *.qhcp+qhp -> *.qch+qhc show empty frame, if I click on PDF links. These links are relative, in qthelp:// 'style'. All files, html, pdf, qhc.. are in the same directory, and I call assistant in this directory. If I include PDF files in <files>-block in *.qhp, I see "Frame load interrupted by policy change. Failed to load URL qthelp://site/proj/f.pdf WebKit Error 102". Trying 'absolute paths' did not help. The 'policy change' message let me guess, Qt-Assistant thinks, it is not allowed to start external program. If so, where can I change this? Should I be a member of some special unix group?

    My system is aware about pdf file type:
    $ xdg-mime query filetype f.pdf
    application/pdf
    $ xdg-mime query default application/pdf
    okularApplication_pdf.desktop
    $ okular f.pdf # works, also click in filemanager is Ok

    QtAssistant/Menu/About -> Qt Assistant Version 5.15.3 Browser: Qt WebKit

    I've seen bug reports https://bugreports.qt.io/browse/QTBUG-95269 and https://bugreports.qt.io/browse/QTBUG-95282. Are they related to this issue? Should I really update to 5.15.7 or maybe even to 6.2?
    I must ask this, because I cannot find out what is 'the right way', is it my mistake in qhcp, dhp files, or is it a bug in the App, what are the options and how to choose between them (e.g. internal PDF rendering and external PDF viewer)...

    S 1 Reply Last reply
    1
    • S SemP

      Are there some help or working examples for *.qhcp *.qhp files with links to PDF files?

      What possibilities are supported (local PDF files with relative or absolute paths to them, PDF files on the web, Qt internal PDF Rendering, call of external Viewer like okular...)? Syntax? Do I need any system/os settings outside of Qt-Assistant, e.g. permissions?

      My experience on Ubuntu 22: files obtained by conversion from old Qt4 *.adp files -> *.qhcp+qhp -> *.qch+qhc show empty frame, if I click on PDF links. These links are relative, in qthelp:// 'style'. All files, html, pdf, qhc.. are in the same directory, and I call assistant in this directory. If I include PDF files in <files>-block in *.qhp, I see "Frame load interrupted by policy change. Failed to load URL qthelp://site/proj/f.pdf WebKit Error 102". Trying 'absolute paths' did not help. The 'policy change' message let me guess, Qt-Assistant thinks, it is not allowed to start external program. If so, where can I change this? Should I be a member of some special unix group?

      My system is aware about pdf file type:
      $ xdg-mime query filetype f.pdf
      application/pdf
      $ xdg-mime query default application/pdf
      okularApplication_pdf.desktop
      $ okular f.pdf # works, also click in filemanager is Ok

      QtAssistant/Menu/About -> Qt Assistant Version 5.15.3 Browser: Qt WebKit

      I've seen bug reports https://bugreports.qt.io/browse/QTBUG-95269 and https://bugreports.qt.io/browse/QTBUG-95282. Are they related to this issue? Should I really update to 5.15.7 or maybe even to 6.2?
      I must ask this, because I cannot find out what is 'the right way', is it my mistake in qhcp, dhp files, or is it a bug in the App, what are the options and how to choose between them (e.g. internal PDF rendering and external PDF viewer)...

      S Offline
      S Offline
      Steve O.
      wrote on last edited by
      #2

      @SemP I have the exact same issue. Still looking for an answer. I tried using ‘file://‘ in my html href on PDFs, but it tries to open the PDF in a text editor.

      Older versions of Assistant had a PDF tab in preferences with a default PDF viewer configurable field, but not in this one…

      Still looking for a solution… I might start an http server and use http://localhost/pdffile.pdf because it will open http links in a web browser.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved