Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Libreoffice and copying web pages
Date: Tue, 30 Apr 2019 23:07:44
Message-Id: 54432adf-2733-5701-38ee-030f2b537c18@gmail.com
In Reply to: Re: [gentoo-user] Libreoffice and copying web pages by Jack
1 Jack wrote:
2 > On 2019.04.30 18:12, Dale wrote:
3 >> Howdy,
4 >>
5 >> As some know, I got a printer.  Now I'm trying to get some info and
6 >> print it using LOo for the most part.  This is the way I do this.  I go
7 >> to a web page, sites will vary, and I highlight what I want and copy it
8 >> to the clipboard.  I then go to LOo and paste it as HTML, since that is
9 >> what it is.  At that point, LOo fetches things like pics and such to
10 >> place on the document.  It takes a little time and I avoid copying
11 >> videos since it can't print a video.  For the most part, this works
12 >> great.  It takes a minute or so to fetch the pics and such and
13 >> everything looks fine.  I remove anything I don't want such as ads and
14 >> such.  Basically, it looks like the web page but I can edit it to make
15 >> fonts larger etc.  However, sometimes it doesn't work.
16 >
17 > [snip ......]
18 >
19 > One important thing to remember is that when you copy/paste part of a
20 > web page, it is not a complete HTML document, but only part of one. 
21 > There are lots of things you probably didn't copy, many of which are
22 > not actually visible, such as css definitions, for example.  You may
23 > also end up with invalid HTML if what you copied does not have
24 > correctly matched opening and closing tags for all the parts you
25 > copied.  When I do this type of thing to get a good print, I do a
26 > "Save as..." in the browser, and then open the HTML doc in LO and
27 > delete what I don't want.  I also sometimes try saving as a plain LO
28 > doc, instead of HTML, but always saving a copy before I make that
29 > change, as I've found it has an inconsistent effect - depending
30 > (probably) on how the original HTML was created.  A lot of web pages
31 > seem to have been created by tools which create very convoluted HTML,
32 > often with lots of javascript assisting in the layout, and I don't
33 > believe that LO can do anything with js (although I'm not absolutely
34 > certain about that.)
35 >
36 > I'm sure others will have more concrete suggestions.
37 >
38 > Jack
39 >
40
41
42 That may explain why a lot of pages work and others don't.  Some pages
43 may not contain things that LOo has trouble figuring out while other
44 pages have things that just plain doesn't work.  I'm trying to save a
45 page and opening it locally, assuming it will store the pics and such
46 locally as well.  Maybe that will also help LOo to load things up
47 correctly. 
48
49 I noticed something on a page I tried since I started this thread.  When
50 I scroll to something that isn't loaded, it starts to downloading
51 whatever is missing and freezes up.  Thing is, it downloads for a long
52 time but never actually fetches the pic that is missing.  If things are
53 broken from LOo's point of view as you point out, that may explain why
54 it is having trouble rendering the doc since it can't fetch some info on
55 certain pages. 
56
57 Let me try this and see if that helps.  You gave me a couple different
58 ways to test out.  I hadn't thought of doing it those ways.  It's extra
59 steps but once I get it, I got it for good. 
60
61 Thanks.
62
63 Dale
64
65 :-)  :-)