kiwix / kiwix-desktop

Kiwix for Windows and GNU/Linux desktops
https://download.kiwix.org/release/kiwix-desktop/
GNU General Public License v3.0
746 stars 97 forks source link

Implement "Save page" #77

Closed jargony closed 2 weeks ago

jargony commented 5 years ago

It is not possible to save pages in Kiwix now. When you click "Save page" nothing happens.

kelson42 commented 5 years ago

I confirm, no filepicker is even open.

kelson42 commented 4 years ago

The problem seems a bit more complex to do that it should. We should just mask the menu item for now.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.

ShaopengLin commented 3 months ago

So from what I have tried, sources with "zim://" and surprisingly "https://" and local files are all not downloaded. I have tried creating Zim files with different types of resources and the behavior is rather inconsistent... Only the QWebEngineViews opened with a real online website seems to work ok-ish.

I believe we will need to do our own parsing of the Html and downloading. We can download all the resources needed in the parsed HTML and then, replace the "zim://" paths with the download path in the final HTML. I confirm we can download those resources in Qt.

@veloman-yunkan @kelson42 What are your opinions on this?

kelson42 commented 3 months ago

@ShaopengLin From your comment it seems there is a big misunderstanding (because the issue is so badly underspecified). The goal of this issue is to export an article to a PDF file. There should be a builtin tool to do that.

ShaopengLin commented 3 months ago

I thought we already have the print feature? It seems to work fine.

Screenshot from 2024-06-16 01-27-24

kelson42 commented 3 months ago

@ShaopengLin It is more a usability issue. It's not straight to click on print tomsave a file. But yes, this would be the same behaviour as printing to a PDF.

ShaopengLin commented 3 months ago

Just to clarify, we want a more straight-forward "Save As .." action that, prints the article as PDF to the user's selected location.

kelson42 commented 3 months ago

@ShaopengLin Yes, "Save page..." should open a filepicker dialogbox straight and propose to save the page. The filename should come from the title of the page. Default location should be the same as the last time (so location should be remembered) and "Documents" default directory. This shoudl work with HTML content, if this is an other content which is displayed then we should save the file straight.

ShaopengLin commented 3 months ago

@kelson42 I am not aware that we have other content display formats.Do you mean like Zims that have videos? Also by saving the file straight, do you mean the zim file?

kelson42 commented 3 months ago

@kelson42 I am not aware that we have other content display formats.Do you mean like Zims that have videos? Also by saving the file straight, do you mean the zim file?

You can perfectly open a PNG image (or a video file) directly in a tab.

ShaopengLin commented 3 months ago

This shoudl work with HTML content, if this is an other content which is displayed then we should save the file straight.

I believe I would need some clarification on what "an other content" means, as well as what "saving the file straight" implies. We already have Save Meida when user open videos in fullscreen so I believe you didn't mean that.

kelson42 commented 3 months ago

@ShaopengLin I have explained everything earlier, I don't know what to say more. Please implement what is clear and ask precise question otherwise.

kelson42 commented 2 months ago

See https://github.com/kiwix/kiwix-apple/issues/814