Nem csináltam, de hallottam róla, hogy az ilyen esetek miatt php-val tex-et készítenek, majd abból pdf-t.