anki-search-inside-add-card icon indicating copy to clipboard operation
anki-search-inside-add-card copied to clipboard

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

Open EngAhmed91za opened this issue 4 years ago • 7 comments
trafficstars

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

EngAhmed91za avatar Dec 17 '20 21:12 EngAhmed91za

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.

fonol avatar Dec 18 '20 07:12 fonol

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

p4nix avatar Dec 18 '20 07:12 p4nix

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

fonol avatar Dec 18 '20 07:12 fonol

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

p4nix avatar Dec 18 '20 10:12 p4nix

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

EngAhmed91za avatar Dec 20 '20 09:12 EngAhmed91za

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 avatar Dec 20 '20 09:12 p4nix

image

Seems fine to me.

p4nix avatar Dec 20 '20 09:12 p4nix