简体   繁体   English

Docbook,图像已调整大小

[英]Docbook, images already resized

I have an issue with my docbook xmls. 我的docbook xml文件有问题。 The basic problem is that I couldn't find yet any solution to keep the inline/mediaobject images original size (height/width). 基本问题是,我找不到任何解决方案来保持行内/媒体对象图像的原始大小(高度/宽度)。 All of the images are displayed oversized in the PDF output. 所有图像在PDF输出中显示为超大尺寸。

The images have already been resized so there is no reason for defining the image size at every image. 图像已经调整大小,因此没有理由在每个图像上定义图像大小。 I want to keep the original size of the images. 我想保持图像的原始大小。

Tools I use: 我使用的工具:
- Apache FOP v1.0 -Apache FOP v1.0
- xsltproc (cygwin) -xsltproc(cygwin)
- Docbook XSL Stylesheet (v1.76.1) -Docbook XSL样式表(v1.76.1)

Is there any way to keep the original size of the images? 有什么办法可以保持图像的原始尺寸?

If all you want is to get the original size of the image, you'd have to do something like this: 如果您只想获得图像的原始大小,则必须执行以下操作:

<mediaobject>
    <imageobject>
        <imagedata fileref="path/to/image/file" format="image_format" scalefit="1" width="100%" contentdepth="100%" />
    </imageobject>
</mediaobject>

The part to take note of is the imagedata tag with it's attribute. 需要注意的部分是带有其属性的imagedata标签。 Please note that I used dummy values for these attributes and so you must update them to reflect your environment :D 请注意,我为这些属性使用了伪值,因此您必须更新它们以反映您的环境:D

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM