bugtex4ht - 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 <liob>
Submitted on:  Sat May 25 13:39:11 2013  
 
Category: NonePriority: 5 - Normal
Severity: 5 - NormalStatus: Fixed
Privacy: PublicAssigned to: CV Radhakrishnan <cvr>
Open/Closed: Closed

Sun May 26 15:15:28 2013, 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

CV Radhakrishnan <cvr>
Project AdministratorIn charge of this item.
Sun May 26 12:55:50 2013, 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 May 26 12:36:29 2013, comment #2:

Thank you for your reply Radhakrishnan,

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.

(file #138)

Liob <liob>
Sun May 26 03:08:44 2013, 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
xlink:href="Pictures/}}
{\ht:special{t4ht=" \Hnewline
xlink:type="simple"
xlink:show="embed"
xlink:actuate="onLoad"
/><!--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.

Radhakrishnan

(file #137)

CV Radhakrishnan <cvr>
Project AdministratorIn charge of this item.
Sat May 25 13:39:11 2013, 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?
    If so, you can click here to add your encouragement to it.
    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 Jun 28 09:38:57 2013cvrOpen/ClosedOpen=>Closed
    Sun May 26 12:36:29 2013liobAttached File-=>Added htlatex_test.tgz, #138
    Sun May 26 03:08:44 2013cvrAttached File-=>Added test.odt, #137
      StatusNone=>Fixed
      Assigned toNone=>cvr
    Sat May 25 13:39:11 2013liobAttached File-=>Added htlatex_test.tex, #133
      Attached File-=>Added img.png, #134
      Attached File-=>Added htlatex_test.odt, #135
      Attached File-=>Added htlatex_test.pdf, #136
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray