LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-29-2017, 04:51 AM   #1
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,649

Rep: Reputation: 255Reputation: 255Reputation: 255
How to convert ODT to HTML with Images (png,jpg,...)?


Hello

How to convert ODT to HTML with Images (png,jpg,...)?

Libreoffice will not save external pictures.

Best regards
 
Old 06-29-2017, 08:17 AM   #2
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Supposedly the latest versions of LibreOffice work in the way you require:

https://ask.libreoffice.org/en/quest...ted-html-file/
 
Old 06-29-2017, 12:57 PM   #3
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,649

Original Poster
Rep: Reputation: 255Reputation: 255Reputation: 255
Quote:
Originally Posted by hydrurga View Post
Supposedly the latest versions of LibreOffice work in the way you require:

https://ask.libreoffice.org/en/quest...ted-html-file/
maybe to be tested:
Code:
soffice --convert-to html:HTML:EmbedImages file.odt

Likely there are some other programms under linux that could do such a tricky operation??
 
Old 06-29-2017, 03:40 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,921

Rep: Reputation: 3618Reputation: 3618Reputation: 3618Reputation: 3618Reputation: 3618Reputation: 3618Reputation: 3618Reputation: 3618Reputation: 3618Reputation: 3618Reputation: 3618
Are you exporting the project in the gui?

When you say external do you mean you are using links in the original document?
 
Old 06-29-2017, 04:48 PM   #5
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,649

Original Poster
Rep: Reputation: 255Reputation: 255Reputation: 255
Quote:
Originally Posted by jefro View Post
Are you exporting the project in the gui?

When you say external do you mean you are using links in the original document?
I prefer by far command line, but still today, there aren't much tools in Linux for that. Libreoffice is rather GUI oriented, by chance, in spite of small possibilities of comamnd line inputs, as stated above.
 
Old 06-29-2017, 04:51 PM   #6
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,649

Original Poster
Rep: Reputation: 255Reputation: 255Reputation: 255
Quote:
Originally Posted by hydrurga View Post
Supposedly the latest versions of LibreOffice work in the way you require:

https://ask.libreoffice.org/en/quest...ted-html-file/


I want to have external images, not embedded into a htmlg messy code, but external.
This way I can make my own latex document out of the ODT file.
 
Old 06-29-2017, 04:58 PM   #7
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by Xeratul View Post
I want to have external images, not embedded into a htmlg messy code, but external.
This way I can make my own latex document out of the ODT file.
That is what I was saying. If you fully read the link, supposedly the latest fresh versions of LibreOffice save the images as separate files, as opposed to embedding them in the HTML.

Quote:
The newer versions of Writer create one .html file with gobs of .jpg files with long names with long strings of numbers in them
 
Old 06-29-2017, 05:28 PM   #8
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,649

Original Poster
Rep: Reputation: 255Reputation: 255Reputation: 255
Quote:
Originally Posted by hydrurga View Post
That is what I was saying. If you fully read the link, supposedly the latest fresh versions of LibreOffice save the images as separate files, as opposed to embedding them in the HTML.
hopefully, which means that I have to upgrade to testing a linux distro.

I am experimenting libreoffice + writer2latex, in the menu, export > which actually a possible workaround.

latex is needed!
 
Old 06-30-2017, 12:34 PM   #9
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,099
Blog Entries: 6

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
I was able to make a .html file out of a .odt file with an image in it.
Code:
libreoffice --headless --nologo --convert-to html:HTML --print-to-file file.odt
Code:
file file.odt
file.odt: OpenDocument Text

file file.html
file.html: HTML document, ASCII text
That gave me file.html and a file_html1234.jpg

Code:
libreoffice --headless --nologo --convert-to html:HTML:EmbedImages --print-to-file file.odt
Gave me a file.html with the image embeded.
Code:
file file.html
file.html: HTML document, ASCII text, with very long lines
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to convert files from HTML to .odt gordont8 Linux - Software 7 09-28-2014 04:25 PM
convert .jpg to .png qrange Linux - Software 3 09-15-2011 06:21 AM
how do i convert to from gd2 (png, jpg) whysyn Linux - Software 3 09-18-2009 02:40 PM
convert odt or .doc into html linuxmandrake Linux - Software 6 02-23-2008 03:48 AM
Convert move frames (avi/dvi/etc) to images(png/jpg/etc) 3saul Linux - Software 1 03-05-2006 09:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration