Bug 400120

Summary: Feature Request: PDF View Support
Product: [Applications] Falkon Reporter: Marian Arlt <marianarlt>
Component: generalAssignee: David Rosca <nowrep>
Status: RESOLVED UPSTREAM    
Severity: wishlist CC: brendon, cristian.adam, jplx256, jsardid, jurajoravec, kde, null, peebhat, tarptaeya, wbauer1
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Marian Arlt 2018-10-21 18:05:20 UTC
SUMMARY

As of v3.0.1 Falkon does not support viewing PDF files directly in the browser. This is a pretty standard feature in almost any major navigator and important probably not only to me.

STEPS TO REPRODUCE
1. Open Falkon
2. Open any URL which is in a .PDF format

OBSERVED RESULT

The target file of the URL in .PDF format will be prompted to download.

DESIRED RESULT

The target file of the URL in .PDF format will open in a new tab and rendered directly in the browser.

SOFTWARE VERSIONS
(available in About System)
KDE Plasma Version: 5.14.1
KDE Frameworks Version: 5.51.0
Qt Version: 5.11.2

ADDITIONAL INFORMATION

Arch 4.17.3
Comment 1 Anmol Gautam 2018-10-31 06:34:18 UTC
You can try https://github.com/Tarptaeya/PDFReader to view pdf directly in Falkon.
Comment 2 avlas 2018-10-31 12:10:45 UTC
What about embedding okular as in konqueror? I would very much like that in contrast to pdf.js
Comment 3 Cristian Adam 2018-10-31 12:18:25 UTC
What about QtLabs's PDF module? http://blog.qt.io/blog/2017/01/30/new-qtpdf-qtlabs-module/
Comment 4 David Rosca 2018-10-31 12:21:36 UTC
This should be implemented in QtWebEngine, where it would "just" need to enable Chromium PDF support. There was some work done to support it, but I am not sure about the current state.
Comment 5 Juraj 2019-02-08 18:25:57 UTC
Just for a record,
PDF viewer was added to QtWebEngine.

See link:
https://github.com/qt/qtwebengine/commit/e3968360b4f1b7b0603b97d50244b18c92207f21
Comment 6 Jan Przybylak 2019-11-04 23:47:00 UTC
As of Falkon 3.1.0 and QtWebEngin 5.13.2, PDFs can be viewed directly in the browser.
However, it's quite clunky and there a still multiple problems:
- The PDFs can't be downloaded from the viewer, the 'save as' dialog wants to save an HTML file, which is confusing
- There is no setting to enable/disable the viewer. Im sure some people don't want this feature. It does not appear in the 'Extensions' tab of the settings window.
Comment 7 Juraj 2019-11-04 23:53:34 UTC
(In reply to Jan Przybylak from comment #6)
> - There is no setting to enable/disable the viewer. Im sure some people
> don't want this feature. It does not appear in the 'Extensions' tab of the
> settings window.

There is a way to disable it.
Go to [Preferences > Browsing] and disable "Allow pepper plugins (flash player)"
The side-effect is that it will disable flash player and maybe some other plugins.


> - The PDFs can't be downloaded from the viewer, the 'save as' dialog wants
> to  save an HTML file, which is confusing

I can swear that I saw that option there in the past, but it is gone now.
Well it is QtWebEngine part, best to go bug them.
Comment 8 lod 2020-02-05 17:04:53 UTC
Another annoying problem, if you open a website with an embedded PDF, Falkons PDFviewer will only show the PDF file in full size, but not the rest of the page
Comment 9 Brendon Higgins 2020-07-09 19:54:34 UTC
Just yesterday while submitting a paper to arxiv.org I found that the built-in viewer would not render the PDF which their server generated. The screen was just grey. Of course, I was logged in and the submission is private, so I couldn't just wget the URL. I had to use Firefox (which does allow me to turn their built-in viewer off) instead.

Good to know about the "disable pepper plugins" workaround. From my point of view, though, Falkon desparately needs an on/off toggle, and a "Save" button, for the built-in PDF viewer. (My experience with these continues to be hit-or-miss, and I was quite happy to just use Okular for PDF viewing in the past...)
Comment 10 Parameshwara Bhat 2020-07-21 03:18:39 UTC
It is not just one URL and one pdf link.Any website and any pdf link,falkon goes to open in it's own tab, then the page remains blank.

I have this behaviour since about June after an update.May be the fault lie in some other KDE piece as falkon itself seems not to have been updated.

Today had a new update to 5.19,but this bug is persisting.
Comment 11 Wolfgang Bauer 2020-07-30 18:00:03 UTC
(In reply to Parameshwara Bhat from comment #10)
> It is not just one URL and one pdf link.Any website and any pdf link,falkon
> goes to open in it's own tab, then the page remains blank.
I assume you are using Qt 5.15.0?

The known issues page states that "The embedded PDF viewer in qtwebengine is non-functional. Fixed for 5.15.1."
https://wiki.qt.io/Qt_5.15.0_Known_Issues

So not a bug in Falkon.
Comment 12 Wolfgang Bauer 2020-07-30 18:08:00 UTC
Regarding the original request (ignoring the bug in QtWebEngine 5.15.0):
Viewing PDF files directly in the browser should be possible since Qt(WebEngine) 5.13, so I think this can be closed?

Recently, also an option to enable/disable this has been added to Falkon's settings:
https://invent.kde.org/network/falkon/-/commit/90664879c51167eac792139ae65a48da11268244
(before it was enabled unconditionally)
There hasn't been a new release yet that contains this change though.
Comment 13 Parameshwara Bhat 2020-07-31 09:07:57 UTC
On Thursday, 30 July, 2020 11:30:03 PM IST Wolfgang Bauer wrote:
> https://bugs.kde.org/show_bug.cgi?id=400120
> 
> Wolfgang Bauer <wbauer@tmo.at> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |wbauer@tmo.at
> 
> --- Comment #11 from Wolfgang Bauer <wbauer@tmo.at> ---
> (In reply to Parameshwara Bhat from comment #10)
> > It is not just one URL and one pdf link.Any website and any pdf link,falkon
> > goes to open in it's own tab, then the page remains blank.
> I assume you are using Qt 5.15.0?
> 
> The known issues page states that "The embedded PDF viewer in qtwebengine is
> non-functional. Fixed for 5.15.1."
> https://wiki.qt.io/Qt_5.15.0_Known_Issues
> 
> So not a bug in Falkon.
> 
> 

@ Wolfgang Bauer
Thank you for the update. Hope this fix (in Qt) will soon be available.
Comment 14 Wolfgang Bauer 2020-07-31 11:55:38 UTC
(In reply to Parameshwara Bhat from comment #13)
> @ Wolfgang Bauer
> Thank you for the update. Hope this fix (in Qt) will soon be available.
According to https://wiki.qt.io/Qt_5.15_Release, the 5.15.1 release is planned for August 2020.
Comment 15 Wolfgang Bauer 2020-09-15 12:09:05 UTC
(In reply to Wolfgang Bauer from comment #14)
> (In reply to Parameshwara Bhat from comment #13)
> > @ Wolfgang Bauer
> > Thank you for the update. Hope this fix (in Qt) will soon be available.
> According to https://wiki.qt.io/Qt_5.15_Release, the 5.15.1 release is
> planned for August 2020.

5.15.1 has been released last week, and I can confirm that Falkon now properly displays PDF files with the embedded PDF viewer for me again.
Comment 16 Christoph Feck 2020-10-12 06:25:18 UTC
Setting status according to comment 15.