dompdf positioning errors
This may have been asked multiple times, but is there a good HTML-to-PDF creator for PHP?
I'm currently using dompdf, and there is a whole list of unsupported things (such as postion:absolute
inside a position:relative
container, and float:right
) which make my PDF render incorrectly.
dompdf forces me to make tables in order to align stuff the way I want. I made an HTML page using floats and relative+absolute positioning, but dompdf ignores this and overlaps all my text and positions them wrong.
It also randomly put a blank 2nd page even though I have both page-break-before
and page-break-after
set to av开发者_JAVA百科oid.
So, can anyone tell me a good PHP PDF creator, or tell me a workaround for dompdf's lack of floats or relative+absolute positioning (I hate tables)?
P.S. I am using dompdf 0.6.0beta1
I just decided to re-write my HTML using tables, so dompdf will render it the way I want. mPDF looked nice, I may switch to that in the future.
精彩评论