## tex4ht - Bugs: bug #183, Images after odt conversion are...

Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

## bug #183: Images after odt conversion are only shown in post stamp size

 Submitted by: Liob Submitted on: Sat 25 May 2013 04:39:11 PM EEST Category: None Priority: 5 - Normal Severity: 5 - Normal Status: Fixed Privacy: Public Assigned to: CV Radhakrishnan Open/Closed: Closed

Sun 26 May 2013 06:15:28 PM EEST, comment #4:

In my tests, TeX4ht generated output correctly. I can see both the image files correctly flagged in the XML with correct path. The *.odt archive has both the images files also. I believe, it is not a problem of TeX4ht as it has not done anything wrong here. Only Libreoffice says, it has read error for the second image which has a path of "Pictures/fig/img.png" while the file is very much available as expected in the .odt.

Let others investigate, I am out of wits.

Regards

Sun 26 May 2013 03:55:50 PM EEST, comment #3:

After toying around with content.xml I get the impression that images in a subfolder of "Pictures" are not supported. The resulting odt, however, contains the second image in "Pictures/fig/img.png"

Liob <liob>
Sun 26 May 2013 03:36:29 PM EEST, comment #2:

I did also test eps but got strange read errors from libreoffice so I discarded it. Further looking into the matter I now see that the problem is the images being in a subfolder. I did attach a working example as tgz (htlatex_test.tgz) because of eps files being huge uncompressed.

Regards.

Liob <liob>
Sun 26 May 2013 06:08:44 AM EEST, comment #1:

Dear Liob,

You may kindly try the following modified version of your test document:

%---------------> start <------------------

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{blindtext}
%\DeclareGraphicsExtensions{.png}
\begin{document}

\makeatletter
\catcode\:=11
\Configure{graphics*}
{eps}
{\xdef\svg:width{\the\Gin@req@width}%
\xdef\svg:height{\the\Gin@req@height}%
\Picture[pict]{\csname Gin@base\endcsname.png
width="\expandafter\the\csname Gin@req@width\endcsname"
height="\expandafter\the\csname Gin@req@height\endcsname"
}%
}

\Configure{IMG}
{\ht:special{t4ht>\PictureFile.4og}%
\ht:special{t4ht*>}%
\ht:special{t4ht<\PictureFile.4og}%
\OOmanifest{<manifest:file-entry
manifest:full-path="Pictures/\PictureFile"/>\Hnewline
}%
%
\ht:special{t4ht=<draw:frame
draw:name="\PictureFile"
text:anchor-type="as-char"
svg:width="\svg:width"
svg:height="\svg:height"
draw:z-index="0"
>%
<draw:image\Hnewline
{\ht:special{t4ht=" \Hnewline
/><!--draw:name="}}
{" }
{\ht:special{t4ht=" }}
{\ht:special{t4ht=--></draw:frame>}}

\catcode\:=12
\makeatother

\blindtext

\includegraphics[width=3in,keepaspectratio=true]{img}
\end{document}

%---------------> end <------------------

You need to keep an eps version of the graphic (apart from your preferred graphic format) since TeX4ht makes use of only dvips driver and cannot get bounding box of other graphic file formats.

I have copied the output, test.odt for your checking. Hope this helps.

Sat 25 May 2013 04:39:11 PM EEST, original submission:

Hi,

I have some trouble regarding htlatex converting to odt. Included images of all types I have tested (png, jpg, eps) are included in the resulting odt but are only post stamp size while the actual image data, that is included in the odt document, has a sufficient size. Looking at content.xml I recognized that there are no svg:width and svg:height entries in the draw:frame node.

I have included a minimal latex example file with the expected result as pdf and the actual result as odt. The command line arguments to create the odt file were:
htlatex htlatex_test.tex 'xhtml,ooffice,bib-,mathml-,' 'ooffice/! -cmozhtf' '-coo' '-cvalidate'

Regards.

Liob <liob>

Attached Files
file #138:  htlatex_test.tgz added by liob (67kB - application/x-gzip)
file #137:  test.odt added by cvr (17kB - application/vnd.oasis.opendocument.text)
file #133:  htlatex_test.tex added by liob (230B - application/x-tex)
file #134:  img.png added by liob (11kB - image/png)
file #135:  htlatex_test.odt added by liob (17kB - application/vnd.oasis.opendocument.text)
file #136:  htlatex_test.pdf added by liob (26kB - application/pdf)

Depends on the following items: None found

Items that depend on this one: None found

Carbon-Copy List
• -unavailable- added by cvr (Updated the item)
• -unavailable- added by liob (Submitted the item)
•

Do you think this task is very important?
This task has 0 encouragements so far.

Only logged-in users can vote.

Please enter the title of George Orwell's famous dystopian book (it's a date):

9 latest changes follow.

Date Changed By Updated Field Previous Value => Replaced By
Fri 28 Jun 2013 12:38:57 PM EESTcvrOpen/ClosedOpenClosed
Sun 26 May 2013 03:36:29 PM EESTliobAttached File-Added htlatex_test.tgz, #138
Sun 26 May 2013 06:08:44 AM EESTcvrAttached File-Added test.odt, #137
StatusNoneFixed
Assigned toNonecvr
Sat 25 May 2013 04:39:11 PM EESTliobAttached File-Added htlatex_test.tex, #133