mwoffliner icon indicating copy to clipboard operation
mwoffliner copied to clipboard

External link is shown with black background when exporting a page

Open kelson42 opened this issue 7 months ago • 8 comments

@HiroyasuNishiyama cloned issue kiwix/kiwix-apple#973 on 2024-09-09:

External link is shown with black background when exporting or printing a page as shown below.

スクリーンショット 2024-09-09 20 56 17

kelson42 avatar May 02 '25 18:05 kelson42

@kelson42 commented on 2024-09-09:

@BPerlakiH Is that a problem with the content itself?

kelson42 avatar May 02 '25 18:05 kelson42

@BPerlakiH commented on 2024-09-09:

@HiroyasuNishiyama Thank you for reporting this!

@kelson42 it does seems to be a content issue, there are some strange background properties set in css for the external link:

Screenshot 2024-09-10 at 00 47 21

when I disabled them, the PDF looks good:

Screenshot 2024-09-10 at 00 51 54

Also on non wiki content, the external links looks OK:

Screenshot 2024-09-10 at 00 53 13

kelson42 avatar May 02 '25 18:05 kelson42

@HiroyasuNishiyama commented on 2024-09-10:

@BPerlakiH That CSS appears to be checking for SVG support and falling back to PNG. Please look at here.

In my opinion, this seems to be a bug of WKWebView.

kelson42 avatar May 02 '25 18:05 kelson42

@BPerlakiH commented on 2024-09-13:

I did some further investigation on this, and force-loaded the current Wikipedia content into the app (not from a ZIM file), and exported that to PDF, and that looks good. So I think it is purely a content issue:

wikipedia_export

kelson42 avatar May 02 '25 18:05 kelson42

@kelson42 commented on 2024-09-18:

I will move the issue to openzim/mwoffliner

kelson42 avatar May 02 '25 18:05 kelson42

@HiroyasuNishiyama please provide details about which ZIM and which path / article we are dealing with, otherwise I'm concerned we are not looking at the same thing.

Your device is configured to use dark mode by default, correct?

benoit74 avatar May 05 '25 10:05 benoit74

@benoit74 It has been quite a while since I reported this issue, so I don’t remember which ZIM file or article I was using at the time. I believe the issue occurs with any ZIM file or article.

For example, I just tried it now on the "Kixix" page of "Computer by Wikipedia" ZIM file, and the same phenomenon occurred.

Regarding the device, as you pointed out, I am using dark mode.

HiroyasuNishiyama avatar May 05 '25 12:05 HiroyasuNishiyama

Thank you @HiroyasuNishiyama for this valuable information.

I confirm that:

  • I see same behavior on my Mac in dark mode on Kiwix page of wikipedia_en_computer_nopic_2025-05
  • Issue is gone with 1.15-dev0 and ActionParse API

This means that issue will be gone once we've released 1.15 and switched to ActionParse API (if we confirm the move).

benoit74 avatar May 05 '25 13:05 benoit74