TCPDF Настройка фиксированной границы - PullRequest
0 голосов
/ 06 июня 2011

Я конвертирую HTML в PDF, используя tcpdf, используя PHP.

Пожалуйста, просмотрите выходные данные для указанного ниже содержимого.

enter image description here

<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>&nbsp;</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.&nbsp;The study of acceleration provides an important link between kinematics (the study of motion) and dynamics (the study of the causes of motion).&nbsp;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.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.&nbsp;&nbsp; You will measure the position of at&nbsp;various&nbsp;time intervals as it moves down an&nbsp; inclined track due to the force of &nbsp;&nbsp;&nbsp;&nbsp;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;">&nbsp;</div>
<div style="text-align: justify; text-indent: -13.5pt;"><span style="font-size: 9pt;">2. Next, you will determine the average&nbsp;&nbsp; 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;">&nbsp;</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 ... Что нужно сделать, чтобы решить эту проблему?

Заранее спасибо ....

1 Ответ

0 голосов
/ 08 июня 2011

Кажется, это игнорирование поля.Вы пытались указать все поля, как это (иногда TCPDF имеет тенденцию игнорировать вещи):

margin-top: 0in;
margin-right: 54.9pt;
etc...

Еще одна вещь, которая приходит мне в голову: вы уверены, что TCPDF поддерживает 0in в качестве записи?до 0pt?

...