我正在使用PHP使用tcpdf转换PDF格式的HTML。
请在此处查看以下给定内容的输出。
<div style="text-indent: -76.5pt; margin: 0in 54.9pt 0pt 76.5pt;"><strong><span style="font-size: small;"><span style="text-transform: uppercase;">Motion with Constant Acceleration</span></span></strong> </div>
<p style="text-indent: -76.5pt; margin: 0in 54.9pt 0pt 76.5pt;"><span style="text-transform: uppercase;">Overview<br />
</span><br />
The concepts of displacement, velocity, and acceleration are very important to master. The study of acceleration provides an important link between kinematics (the study of motion) and dynamics (the study of the causes of motion). The study of acceleration also plays a key role in understanding such concepts as gravity, circular motion, harmonic motion, electricity and magnetism. The simplest case of acceleration to analyze mathematically is that for an object moving with a constant acceleration. This is the situation for any object experiencing a constant force. </p>
<div style="text-indent: -76.5pt; margin: 0in 54.9pt 0pt 76.5pt;" class="rteindent1">
<div style="text-indent: -76.5pt;"><span style="font-size: 9pt;"> 1. You will measure the position of at various time intervals as it moves down an inclined track due to the force of gravity. A tape timer will be used to measure time intervals of 0.1 s and the corresponding displacement in position.</span></div>
<div style="text-indent: -76.5pt;"> </div>
<div style="text-align: justify; text-indent: -13.5pt;"><span style="font-size: 9pt;">2. Next, you will determine the average velocity and time for several points along the carts path of motion from the tape timer data.</span></div>
<div style="text-indent: -76.5pt;"> </div>
<div style="text-align: justify; text-indent: -13.5pt;"><span style="font-size: 9pt;">3. Finally, you will determine the acceleration of the cart down the track from a plot of the average velocity vs. time. Using trigonometric principles, you will verify that the acceleration is due to the force of gravity.</span></div>
</div>
请注意输出内容中的超出边界。我发现通过 给出了文字缩进:-76px样式,这种情况正在发生。 Even *if i give that style* content should not go out of the page
...应该用Wat来解决这个问题吗?
提前致谢....
答案 0 :(得分:0)
似乎忽略了保证金。 您是否尝试过指定所有这样的边距(有时TCPDF会忽略一些事情):
margin-top: 0in;
margin-right: 54.9pt;
etc...
我想到的另一件事是:您确定TCPDF支持0作为符号吗?您是否尝试将其更改为0pt?