I have a header on each page with some lines of text. I write this
text with $pdf->text(...).
How do I insert line breaks? Now I'm writing every line of text with a
separate $pdf->text(...) command like this:
$pdf->text(550, 40, $text1, $font, 9, array(0,0,0));
$pdf->text(550, 42, $text2, $font, 9, array(0,0,0));
$pdf->text(550, 51, $text3, $font, 9, array(0,0,0));
$pdf->text(550, 61, $text4, $font, 9, array(0,0,0));
I hope this can be done easier.
--
You received this message because you are subscribed to the Google Groups "dompdf" group.
To post to this group, send email to dom...@googlegroups.com.
To unsubscribe from this group, send email to dompdf+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/dompdf?hl=en.
On Mar 23, 10:32 am, João Cândido de Souza Neto
<joaovargi...@gmail.com> wrote:
> As far as I know, DOMPDF reads a HTML code and generates a PDF file of it. So, if you want a line break, its better to use "<br>" in your HTML code.23/03/10 13:16:52, frenkieb <fren...@gmail.com>:Hi,
On Mar 23, 8:09 pm, Ryan Masten <ryan.mas...@gmail.com> wrote:
> He is talking about in the HEADER which doesn't use HTML.
>
> On Tue, Mar 23, 2010 at 1:15 PM, psychoactive <psychoact...@gmail.com>wrote:
>
> > yeah why aren't you just using html?
>
> > On Mar 23, 10:32 am, João Cândido de Souza Neto
> > <joaovargi...@gmail.com> wrote:
> > > As far as I know, DOMPDF reads a HTML code and generates a PDF file of
> > it. So, if you want a line break, its better to use "<br>" in your HTML
> > code.23/03/10 13:16:52, frenkieb <frenk...@gmail.com>:Hi,
> > > I have a header on each page with some lines of text. I write this
> > > text with $pdf->text(...).
> > > How do I insert line breaks? Now I'm writing every line of text with a
> > > separate $pdf->text(...) command like this:
> > > $pdf->text(550, 40, $text1, $font, 9, array(0,0,0));
> > > $pdf->text(550, 42, $text2, $font, 9, array(0,0,0));
> > > $pdf->text(550, 51, $text3, $font, 9, array(0,0,0));
> > > $pdf->text(550, 61, $text4, $font, 9, array(0,0,0));
> > > I hope this can be done easier.
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > "dompdf" group.
> > > To post to this group, send email to dom...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > dompdf+un...@googlegroups.com<dompdf%2Bunsu...@googlegroups.com>
> > .
> > > For more options, visit this group athttp://
> > groups.google.com/group/dompdf?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "dompdf" group.
> > To post to this group, send email to dom...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > dompdf+un...@googlegroups.com<dompdf%2Bunsu...@googlegroups.com>
Yeah, these line of text are in the header. I tried '<br>' and '\n\r'
etc. but that didn't break the line. Or is it possible to use html in
the header?
On Mar 23, 8:09 pm, Ryan Masten <ryan.mas...@gmail.com> wrote:
> He is talking about in the HEADER which doesn't use HTML.
>
> On Tue, Mar 23, 2010 at 1:15 PM, psychoactive <psychoact...@gmail.com>wrote:
>
> > yeah why aren't you just using html?
>
> > On Mar 23, 10:32 am, Jo�o C�ndido de Souza Neto
To unsubscribe from this group, send email to dompdf+un...@googlegroups.com.
You could programmatically figure out where to break the line.
Something similar to what's discussed in this thread (but you'll have
to modify it to work with the header instead of footer):
http://groups.google.com/group/dompdf/browse_thread/thread/70a373b42d6e4cde
If you're up to hacking your code a little, you could add support for
fixed positioning. A proposed patch has been submitted that will add
fixed-positioning support. This would allow you to define your header/
footer in your actual HTML document instead of using inline script.
See the following:
http://code.google.com/p/dompdf/issues/detail?id=49