From: Michael F. <fuz...@vo...> - 2009-07-23 14:06:29
|
Raphael Walker wrote: >> Raphael - >> >> Hmmm. I do not see that behavior with the odf_odt writer. >> >> You might try explicitly specifying the width and height with >> something like the following: >> >> {{{ >> above text >> >> |image| >> >> below text >> >> .. |image| image:: snapshot.png >> :height: 55 >> :width: 60 >> }}} >> >> then try adjusting the width and height. Perhaps then you can get >> the results you want. >> >> Question: Do you have PIL (Python Imaging Library) installed on the >> machine where you are running odf_odt writer? The odf_odt writer >> uses PIL, if it is available, to try to determine the size of the >> image. Even if PIL is installed, you may be better off explicitly >> specifying the width and height. >> >> - Dave >> >> -- >> >> >> Dave Kuhlman >> http://www.rexx.com/~dkuhlman >> >> > Hello Dave, > > Yes, i have PIL installed. > > Your right, specifying the width and height fixes the problem in the > odf_odt writer. In the pdfwriter(rst2pdf/createpdf), the problem is not > fixed by giving width and height. > > PDF writers don't know what to do with pixel units for height / width unfortunately. This could be at the root of this problem. Michael > I found out that the the pseudoxml/doctree for the two examples above > are not the same. > The image of substitution directive is adding a paragraph to the image. > > image OK: > --------- > > rst > {{{ > some text > > .. image:: snapshot.png > :height: 55 > :width: 60 > > some text > }}} > pseudoxml > {{{ > <document source="image.rst"> > <paragraph> > some text > <image uri="snapshot.png"> > <paragraph> > some text > }}} > > image "Wrong": > -------------- > rst > {{{ > some text > > |image| > > > some text > > .. |image| image:: snapshot.png > }}} > > pseudoxml > {{{ > <document source="image.rst"> > <paragraph> > some text > <paragraph> > <image alt="image" uri="snapshot.png"> > <paragraph> > some text > <substitution_definition names="image"> > <image alt="image" uri="snapshot.png"> > }}} > > Kind regards, > Raphael > > ------------------------------------------------------------------------------ > _______________________________________________ > Docutils-users mailing list > Doc...@li... > https://lists.sourceforge.net/lists/listinfo/docutils-users > > Please use "Reply All" to reply to the list. > -- http://www.ironpythoninaction.com/ |