Copy and paste from internet

Discuss the word processor
Post Reply
DaleM
Posts: 6
Joined: Mon Oct 31, 2016 5:44 pm

Copy and paste from internet

Post by DaleM »

When using MS Word, it is possible to copy and paste web page text and pics with no problem. However, when using Writer, frequently the pic/graph/image does not show up but rather only a link. Is there any "reasonable" means that this problem can be solved? That is, will this copy and paste feature every be added to OpenOffice Writer? It's a very useful feature for those collecting research articles.
OpenOffice 4.1.2 on Windows 8.1
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: [Solved] Copy and paste sans ALL origin formatting

Post by Villeroy »

This topic was about how to transfer web content without any formatting. If I would suffer from such problems (in fact I would use Writer for the formatting of the raw data) then I would try https://libreoffice.org/ rather than OpenOffice.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
DaleM
Posts: 6
Joined: Mon Oct 31, 2016 5:44 pm

Re: [Solved] Copy and paste sans ALL origin formatting

Post by DaleM »

Thanks. I'll give it a shot.
OpenOffice 4.1.2 on Windows 8.1
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: [Solved] Copy and paste sans ALL origin formatting

Post by John_Ha »

I cannot use a PC without Steve Miller's wonderful PureText utility.

Paste with ctrl+V and it pastes normally. Paste with Windows_key+V and it strips all the formatting from what is on the clipboard, and picks up the formatting at the cursor location. It's absolutely magic.

Even better, it works in any application. Got an email with mixed formatting? Highlight all > ctrl+X > Windows_key+V and it's fixed.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
DaleM
Posts: 6
Joined: Mon Oct 31, 2016 5:44 pm

Re: [Solved] Copy and paste sans ALL origin formatting

Post by DaleM »

Sounds interesting. May give it a try also in case libreoffice can't handle what I need. Thank you.
OpenOffice 4.1.2 on Windows 8.1
DaleM
Posts: 6
Joined: Mon Oct 31, 2016 5:44 pm

Re: [Solved] Copy and paste sans ALL origin formatting

Post by DaleM »

Vicroy suggested, "If I would suffer from such problems (in fact I would use Writer for the formatting of the raw data) then I would try https://libreoffice.org/ rather than OpenOffice."

I have now tried LibreOffice and although it seems to have significant potential, it's a cranky program not yet ready for prime time. Every "close" (of a new document) results in a crash and Help seems nonexistent (I can't even get permission to go into their forum).
Hopefully OpenOffice will address the weakness of not being able to copy and paste both text and graphics from Internet pages or LibreOffice will take their "crashes" seriously enough to address and correct the problem.
However, again thanks for the response and information.
OpenOffice 4.1.2 on Windows 8.1
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: [Solved] Copy and paste sans ALL origin formatting

Post by Villeroy »

It is a major technical problem that is not trivial to solve. Use MS Office.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
Hagar Delest
Moderator
Posts: 32657
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Copy and paste from internet

Post by Hagar Delest »

I've split the topic from the initial one.

AOO has always been slow/bad at importing pics from the net when pasting.
Honestly, I would paste as unformatted text and then import the pics from the HD once you've saved them on it. It would at least remove all the tables that are used to display pages on the web.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Copy and paste from internet

Post by John_Ha »

I think the problem is that some web images are coded differently from others so that some import and some do not.

I wholeheartedly agree that it is far better to import web text unformatted, and format it; and to bring in the images separately (often after processing them with an image editor before bringing them in).
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
soby
Volunteer
Posts: 150
Joined: Sat Oct 29, 2016 10:49 am

Re: Copy and paste from internet

Post by soby »

wish browser you use
i have no problem with copying and past web text/pictures in AOO and LO writer
the only thing was its was sometimes slow
Libre Office 6.1 dev homebuild Open Office 4.1.5 on Slackware64 current
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Copy and paste from internet

Post by John_Ha »

soby wrote:wish browser you use
Firefox
soby wrote:i have no problem with copying and past web text/pictures in AOO and LO writer
I think it depends on the coding behind the image. Visit https://www.lonelyplanet.com/usa/san-francisco and copy as shown. The top two images copy, the third does not.
Attachments
Clipboard01.png
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
Arineckaig
Volunteer
Posts: 828
Joined: Fri Nov 30, 2007 10:58 am
Location: Scotland

Re: Copy and paste from internet

Post by Arineckaig »

DaleM posted:
However, when using Writer, frequently the pic/graph/image does not show up but rather only a link. Is there any "reasonable" means that this problem can be solved? That is, will this copy and paste feature every be added to OpenOffice Writer?
In relation to this specific point, the benefit is a smaller and faster file when AOO Writer merely includes a Link as opposed to a copy of the related graphic(s). The latter can always be readily obtained from the menu bar Edit>>Links and clicking on Break link after selecting the graphics to be inserted and saved in the file. The connection to the web page must still be open and there may be some delay in the downloading and insertion of the graphic files.
When this issue has been resolved, it would help other users of the forum if you add the word - [Solved] - to the Subject line of your 1st post (edit button top right).
AOOo 4.1.5 & LO 6 on MS Windows 10 MySQL and HSQLDB
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Copy and paste from internet

Post by John_Ha »

Before you break the link, r-click the image > Picture ..., the Hyperlink tab shows the page from which the image came and the Picture tab shows the file name.

After you break the link, the Hyperlink tab still shows the page from which the image came but the Picture tab no longer shows the file name.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Copy and paste from internet

Post by Villeroy »

The San Francisco page crashes my OpenOffice when I paste the whole page from Firefox (Ctrl+A, Ctrl+C) into Writer.

This is what I get when pasting into LibreOffice:
http://www.mediafire.com/file/u5kyk14a9 ... asteSF.odt
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Copy and paste from internet

Post by John_Ha »

Villeroy

That is strange as it works fine for my AOO. See attached sf.odt where I went to the page (in Firefox) > Edit > Select All > Edit > Copy. Open a new, empty text document in AOO 4.1.3 > Paste. It takes quite a few seconds to pull down all the images. Save. Note my file is only 25kBytes as the images are linked.

When I break the links, the file is, like your LO file, much bigger at 139 kBytes, but it still saves with no problem. See sf copy.odt

I note that LO did not pull down the third image either suggesting it is a "page coding difference".

When did your AOO crash? On pasting the page? or on breaking the links? One difference is I am on W7, you are on Ubuntu.
Attachments
sf.odt
(24.99 KiB) Downloaded 310 times
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
soby
Volunteer
Posts: 150
Joined: Sat Oct 29, 2016 10:49 am

Re: Copy and paste from internet

Post by soby »

i have visit the page you mention
i have used Ctrl+A then Ctrl+C and have past without any problem in AOO and LO
all the pictures where there with the links
Last edited by soby on Mon Jan 16, 2017 6:46 pm, edited 1 time in total.
Libre Office 6.1 dev homebuild Open Office 4.1.5 on Slackware64 current
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Copy and paste from internet

Post by John_Ha »

soby wrote:i have visit the page you mention ... all the pictures where there with the links
Even the Valencia image as in the image above????
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Copy and paste from internet

Post by Villeroy »

John_Ha wrote: When did your AOO crash? On pasting the page? or on breaking the links? One difference is I am on W7, you are on Ubuntu.
It crashed while I switched back to my browser window because the import took so long. When I switched back to the office window, I found a crash message of my OS instead. AOO is not functional on my Ubuntu 16.4. machine. Apart from frequent crashes, it can not open files on Windows shares. Yes, I have the latest vanilla version with an almost blank, new profile folder. It used to work fine with Ubuntu 14.4 so it might the fault of my OS changing too many interfaces. I'm too lazy for distro hopping right now and "my girls" at work prefer the green one (LO) over the blue one (OO) anyway so I stopped using AOO for now although I always prefered the blue one over the green one.

And yes, I noted the same problem as you did with the attachment in viewtopic.php?f=7&t=86946&p=407371#p407107 (I made the fist version of it using LO because AOO crashed).
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
soby
Volunteer
Posts: 150
Joined: Sat Oct 29, 2016 10:49 am

Re: Copy and paste from internet

Post by soby »

see here the attachment

i use firefox 50.1.0
Attachments
826 Valencia.odt
(26.79 KiB) Downloaded 303 times
sf_valencia.odt
(19.05 KiB) Downloaded 268 times
Libre Office 6.1 dev homebuild Open Office 4.1.5 on Slackware64 current
User avatar
RoryOF
Moderator
Posts: 34612
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Copy and paste from internet

Post by RoryOF »

I recollect a problem being reported about AOO not running on Ubuntu 16.04; the same problem does not show up on Xubuntu 16.04 (and 16.04.01), which I run on all my computers. The change from the Ubuntu Desktop to the Xubuntu desktop might not please you; personally, I prefer the simplicity of Xubuntu.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Copy and paste from internet

Post by John_Ha »

soby wrote:see here the attachment
The Valencia image is missing from your .odt file as well.
web page
web page
Clipboard01.png (39.93 KiB) Viewed 20911 times
your file
your file
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
soby
Volunteer
Posts: 150
Joined: Sat Oct 29, 2016 10:49 am

Re: Copy and paste from internet

Post by soby »

yes its missing thanks to point it
but i think the image is not on the server or the website of lonelyplanet
maybe a missing link in there source page
in the source page there is just no link to a image for valencia
look at source with your browser
Libre Office 6.1 dev homebuild Open Office 4.1.5 on Slackware64 current
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Copy and paste from internet

Post by John_Ha »

soby

I am not interested in fixing the web page. I just want AOO users to understand that images are coded differently and while some are pulled in, some are not.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
MrProgrammer
Moderator
Posts: 4905
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Copy and paste from internet

Post by MrProgrammer »

John_Ha wrote:I just want AOO users to understand that images are coded differently and while some are pulled in, some are not.
Absolutely. Web browsers make the page display look simple, but it is unbelievably complex. That webpage is (currently) 1575 lines of HTML, which the browser interprets to display the page. Some of the lines are very long; if I download the raw HTML and paste it into Writer, it is more than 100 pages of text! It is really amazing that the web browser can download, interpret, and display it so quickly.

But the situation here is even more complicated than that because this page uses Javascript to download and execute additional instructions to format the page. If I disable Javascript in my browser, none of the three images appears. On this page, Javascript provides different HTML for the Valencia image than it does for the previous two:
<a class=​"sights__item" href=​"/​usa/​san-francisco/​sights/​historic/​alcatraz">​
<img src=​"https:​/​/​lonelyplanetimages.imgix.net/​mastheads/​shutterstock_239675278.jpg?​fit=min&​h=60&​sharp=10&​vib=20&​w=80" alt>​
… irrelevant lines …
</a>

<a class=​"sights__item" href=​"/​usa/​san-francisco/​sights/​museums-galleries/​exploratorium">​
<img src=​"https:​/​/​lonelyplanetimages.imgix.net/​mastheads/​184795465_full.jpg?​fit=min&​h=60&​rect=3297,0,2752,4082&​sharp=10&​vib=20&​w=80" alt>​
… irrelevant lines …
</a>

<a class=​"sights__item" href=​"/​usa/​san-francisco/​sights/​arts-culture-literary/​826-valencia">​
<div class=​"sights__image topic__image topic__image--sight">​
     ::before
</div>
… irrelevant lines …
</a>
Alcatraz and Exploratorium supply images with an <img> block. Valencia has a <div> block instead. I am not an HTML expert but I believe the block directs the browser to use these lines in the page's style sheet:
.topic__image--sight {
    background-image: url("https://assets.staticlp.com/destination ... sights.jpg");
    background-repeat: no-repeat
}
That supplies a background image, which is apparently treated differently by the paste into Writer. The Valencia image is also missing if I disable Styles in my browser. Alcatraz and Exploratorium are displayed.

Writer is a document processor and cannot be expected to handle all the complexity of HTML, and Cascading Style Sheets, and Javascript in the exact same way that a web browser does. There are hundreds of posts here about people who have run into problems with copy/paste from a web browser to Open Office. I can say from experience that It does not work the way people think it does, and I feel safe in saying that it will never work with 100% fidelity because Open Office is not intended to display webpages. Likewise one would not expect web browsers to, say, generate a Table or Contents or evaluate a Calc formula. Some web pages can attempt this, but it isn't likely to happen with 100% fidelity. The obstacle is that copy/paste of a web page looks simple, but isn't. After copying content from a web page I find that using Edit → Paste Special → Unformatted Text, then making manual adjustments as needed, will produce acceptable results more quickly than Edit → Paste.

Actually, any copy/paste between applications is far more complicated than people realize, but that discussion would get off topic.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
User avatar
soby
Volunteer
Posts: 150
Joined: Sat Oct 29, 2016 10:49 am

Re: Copy and paste from internet

Post by soby »

thanks MrP
you have understand what i was trying to say
also thanks for the info you give use
Libre Office 6.1 dev homebuild Open Office 4.1.5 on Slackware64 current
Marc.Cox
Posts: 1
Joined: Fri May 25, 2018 4:58 am

Re: Copy and paste from internet

Post by Marc.Cox »

:crazy: I have the same :crazy: issue.

Suggest you Try Copy PlainText - it is a tiny FIREFOX extension and the
New Copy code which should work on all sites.
Copy PlainText also removes the formatting from the selection before saving to the Clipboard

https://addons.mozilla.org/en-US/firefo ... plaintext/

Per the developer :
Let me know if you want other functions added.
And Note: None of my extensions contain any tracking, advertising or privacy infringement.

Features :

-- New Copy code which should work on all sites (v1.7)
-- 2 Keyboard Shortcuts: F7 and original Ctrl+Shift+F7 (FF53+) (v1.2)
-- OR Highlight text in Firefox then Right Mouse / RM

-- Removes the spaces from the start and end of the selection
-- Removes the formatting from the selection before saving to the Clipboard (Firefox restricts some functions on some URLs.)
-- Removes multiple spaces

:super: Works for me.

and

HTH you,
Marc.Cox
OpenOffice v5.1 on Ubuntu 14.10
SVries
Posts: 1
Joined: Tue Aug 28, 2018 7:28 pm

Re: Copy and paste from internet

Post by SVries »

Was having the same problem. I could past into Thunderbird email worked fine, but not OO writer. Finally I closed about ten documents I had open and restated OO. It worked! :D
Apache Open Office 4.1.5
oneota
Posts: 35
Joined: Sun Sep 07, 2008 8:11 am

Re: Copy and paste from internet

Post by oneota »

I have the same problem as the original poster. I tried the suggestions (e.g., edit>links...), but I still don't get a picture. All I get is a rectangle with (or without) a URL. I am using Google Chrome on Windows 7.
OOo 4.1.5 on Ms Windows 10
oneota
Posts: 35
Joined: Sun Sep 07, 2008 8:11 am

Re: Copy and paste from internet

Post by oneota »

I have just come up with an awkward work-around: I copy the images to Microsoft Word Pad and then C&P it to my .odt document. I'm still looking for a direct route, though.
OOo 4.1.5 on Ms Windows 10
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Copy and paste from internet

Post by John_Ha »

See Item 13. Copying and pasting text and images from the internet - the images don't appear or things go funny in [Tutorial] Some useful hints on using images.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
Post Reply