Does anyone knows how to set a paragraph on a footer made with <script
type="text/php">:
Got a very long text and I'm using $pdf->text: is there any method to
determine where the text has to do a page break, like using \n...??
I try different ways... but no succes.
Thnx!!!
Gorka Leguina.
This is something you'll have to do manually. The best the methods
available through inline scripting can do is tell you how wide your
line is. You basically would need to test the width of a substring of
your text at the desired font size, split the string at that point,
then do again with the remainder of the text.
I wrote up some code that will do what you want. It's a bit messy (I
wrote it over lunch), but it appears to work.
Check out the HTML document, which contains the inline script:
http://eclecticgeek.com/dompdf/debug_tests/70a373b42d6e4cde.htm
and here's the resulting PDF:
http://eclecticgeek.com/dompdf/index.php?input_file_http=&input_file=70a373b42d6e4cde.htm&paper=&orientation=&dompdf_ver=trunk&load_method=1&submit=submit
-b
Yes, that's the solution I implemented. Different from yours, but with
the result I wanted.
Thank you anyway Bryan.
Gorka Leguina.
> and here's the resulting PDF:http://eclecticgeek.com/dompdf/index.php?input_file_http=&input_file=...
>
> -b