English 中文(简体)
TCPDF: 使用写 HTML 而不是直线, 以“ 楼梯” 形状而不是以直线显示图像 。
原标题:TCPDF: Writing multiple images after eachother using writeHTML renders images in a "staircase" shape instead of in a straight line

我正使用 PHP 类 TPDF s writeHTML 方法创建 PDF 文档。 它效果很好, 似乎涵盖了我所需要的内容, 但当我试图用 HTML 元素在一条序列中以直线创建多个图像时, 图像不会在我所期望的直线中设定。 相反, 每个相继图像的位置会增加( 在某些情况下会减少) 几个像素在 y 轴上, 使图像的序列看起来像一个“ 楼梯 ” :

我所期望的(每x一幅图):

x x x

我得到的是:

x
 x
  x

有时我得到它相反的方式 周围:

  x
 x
x

HTML 标记看起来像这个:

<img src="x.png"><img src="x.png"><img src="x.png"><img src="x.png">

HTML 通常不这样做, 我找不到任何 Googling 的解决方案。 任何帮助都会受到欢迎! 谢谢 。

最佳回答

你考虑过把它放在桌子上吗?

<table>
  <tr>
   <td>
     <img src="x.png">
   </td>
   <td>
     <img src="x.png">
   </td>
   <td>
     <img src="x.png">
   </td>
   <td>
     <img src="x.png">
   </td>
 </tr>
</table>
问题回答

暂无回答




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签