fonol / anki-search-inside-add-card

An add-on providing full-text-search and PDF reading functionality to Anki's Add card dialog
https://ankiweb.net/shared/info/1781298089
GNU Affero General Public License v3.0
179 stars 24 forks source link

the add on doesn't show full parts of a webpage #188

Open EngAhmed91za opened 3 years ago

EngAhmed91za commented 3 years ago

image image hello, there is an issue with the add on where if the page is too wide parts of the converted url will not be shown unless i convert it via a third-party solution or use landscape after printing in chrome

windows 10

thanks

fonol commented 3 years ago

Hi, there are two possible solutions to that, either do it like web browsers do it, and show a print preview dialog, where you can pick the size and page orientation, or pick a larger page size by default. I guess the first solution would be more flexible, but means more extra work and also means extra clicks when you just want to quickly create a PDF from a URL. I quickly checked with an increased page size, A3 instead of A4, and the page now fits into the document. I guess for now, this will be the way to go. The change will be included with the next update if I don't find any problems.

p4nix commented 3 years ago

Oh, you ninja'd me, I was already working on a landscape mode. But as A3 works, I guess we will take that 👍🏽

fonol commented 3 years ago

@p4nix If you have any more flexible/comprehensive solution, I'd happily accept a PR :)

p4nix commented 3 years ago

Perhaps, but got some more important tasks to do first - for example, the documentation :)

EngAhmed91za commented 3 years ago

Hi, there are two possible solutions to that, either do it like web browsers do it, and show a print preview dialog, where you can pick the size and page orientation, or pick a larger page size by default. I guess the first solution would be more flexible, but means more extra work and also means extra clicks when you just want to quickly create a PDF from a URL. I quickly checked with an increased page size, A3 instead of A4, and the page now fits into the document. I guess for now, this will be the way to go. The change will be included with the next update if I don't find any problems.

Thanks, yeah that is a solution I tried (although it cuts a part of the table and shows the rest on another page which can be annoying) but the point of URL to pdf conversion is to do fewer clicks, doing that solution defects the purpose of the add on feature, nevertheless, I also tried to copy the entire page into a text dialog in the add on and it shows the table normally like in the websites like this image however, after saving it and creating it instead no image files and shown and the table got messed up image

thanks

p4nix commented 3 years ago

Have you tried if Url->PDF is working with your latest update now? - should work in the newest update now, with paper size being increased to A3.

The reason why text gets messed up is because of conversion to markdown notation, which cleans the HTML code, as it bloats the SQL database and messes with searches. However, the table should still be a valid markdown table, which can be viewed in the add-on by using the Previewer function (both in the editor of Create Note and in the review modal).

p4nix commented 3 years ago

image

Seems fine to me.